Merge lp:~jonas-drange/ubuntu-system-settings/rtm-1378812-fix-tech-pref into lp:ubuntu-system-settings/rtm-14.09

Proposed by Jonas G. Drange
Status: Merged
Approved by: Ken VanDine
Approved revision: 945
Merged at revision: 949
Proposed branch: lp:~jonas-drange/ubuntu-system-settings/rtm-1378812-fix-tech-pref
Merge into: lp:ubuntu-system-settings/rtm-14.09
Prerequisite: lp:~ken-vandine/ubuntu-system-settings/rtm-1378812
Diff against target: 67 lines (+30/-27)
1 file modified
plugins/cellular/Components/MultiSim.qml (+30/-27)
To merge this branch: bzr merge lp:~jonas-drange/ubuntu-system-settings/rtm-1378812-fix-tech-pref
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Touch System Settings Pending
Review via email: mp+244013@code.launchpad.net

Commit message

[cellular] Use a repeater to lay out two separate ItemSelectors for modems, making sure it works well between connMan power cycles

Description of the change

[cellular] Use a repeater to lay out two separate ItemSelectors for modems, making sure it works well between connMan power cycles

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

QA has signed this off, but code-wise there is no approval so can't publish yet. Please top-approve.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/cellular/Components/MultiSim.qml'
2--- plugins/cellular/Components/MultiSim.qml 2014-12-08 16:06:48 +0000
3+++ plugins/cellular/Components/MultiSim.qml 2014-12-08 16:06:48 +0000
4@@ -102,33 +102,36 @@
5 }[tech]
6 }
7
8- ListItem.ItemSelector {
9- id: radio
10- expanded: true
11- text: i18n.tr("Connection type:")
12- model: poweredSim ? poweredSim.radioSettings.modemTechnologies : []
13- delegate: OptionSelectorDelegate {
14- objectName: poweredSim.path + "_radio_" + modelData
15- text: techToString(modelData)
16- }
17- enabled: poweredSim ?
18- (poweredSim.radioSettings.technologyPreference !== "") : false
19- visible: poweredSim
20- selectedIndex: poweredSim ?
21- model.indexOf(poweredSim.radioSettings.technologyPreference) : -1
22- onDelegateClicked: {
23- poweredSim.radioSettings.technologyPreference = model[index];
24- }
25- }
26-
27- Connections {
28- target: poweredSim ? poweredSim.radioSettings : null
29- onTechnologyPreferenceChanged: {
30- radio.selectedIndex =
31- poweredSim.radioSettings.modemTechnologies.indexOf(preference)
32- }
33- ignoreUnknownSignals: true
34- }
35+ Repeater {
36+ model: sims
37+
38+ ListItem.ItemSelector {
39+ id: radio
40+ property var sim: modelData
41+ property var rSettings: sim.radioSettings
42+ property string techPref: rSettings.technologyPreference
43+ property var modemTechs: rSettings.modemTechnologies
44+ expanded: true
45+ text: i18n.tr("Connection type:")
46+ model: modemTechs || []
47+ delegate: OptionSelectorDelegate {
48+ objectName: sim.path + "_radio_" + modelData
49+ text: techToString(modelData)
50+ }
51+ enabled: techPref !== ""
52+ visible: sim.connMan.powered
53+ selectedIndex: techPref !== "" ? model.indexOf(techPref) : -1
54+ onDelegateClicked: rSettings.technologyPreference = model[index];
55+ Connections {
56+ target: rSettings
57+ onTechnologyPreferenceChanged: {
58+ radio.selectedIndex = modemTechs.indexOf(preference)
59+ }
60+ ignoreUnknownSignals: true
61+ }
62+ }
63+ }
64+
65
66 GSettings {
67 id: phoneSettings

Subscribers

People subscribed via source and target branches