Merge lp:~jonas-drange/ubuntu-system-settings/apl into lp:ubuntu-system-settings
- apl
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Ken VanDine |
Approved revision: | 1767 |
Merged at revision: | 1754 |
Proposed branch: | lp:~jonas-drange/ubuntu-system-settings/apl |
Merge into: | lp:ubuntu-system-settings |
Prerequisite: | lp:~jonas-drange/ubuntu-system-settings/lp1644268 |
Diff against target: |
2257 lines (+770/-248) 59 files modified
debian/control (+1/-1) plugins/about/DevMode.qml (+3/-1) plugins/about/PageComponent.qml (+6/-6) plugins/about/Software.qml (+3/-1) plugins/about/Storage.qml (+2/-5) plugins/background/MainPage.qml (+13/-18) plugins/background/Preview.qml (+2/-2) plugins/battery/PageComponent.qml (+6/-6) plugins/bluetooth/DevicePage.qml (+12/-7) plugins/bluetooth/PageComponent.qml (+11/-3) plugins/brightness/PageComponent.qml (+3/-2) plugins/brightness/WifiDisplays.qml (+1/-0) plugins/cellular/Components/MultiSim.qml (+3/-4) plugins/cellular/Components/SingleSim.qml (+2/-3) plugins/cellular/PageApnEditor.qml (+1/-2) plugins/cellular/PageCarrierAndApn.qml (+6/-3) plugins/cellular/PageCarriersAndApns.qml (+6/-3) plugins/cellular/PageChooseApn.qml (+9/-6) plugins/cellular/PageChooseCarrier.qml (+1/-1) plugins/cellular/PageComponent.qml (+1/-0) plugins/hotspot/PageComponent.qml (+1/-0) plugins/language/KeyboardLayouts.qml (+1/-0) plugins/language/PageComponent.qml (+15/-27) plugins/language/PageHardwareKeyboard.qml (+8/-4) plugins/language/SpellChecking.qml (+2/-0) plugins/launcher/PageComponent.qml (+1/-0) plugins/notifications/PageComponent.qml (+11/-8) plugins/phone/CallForwarding.qml (+1/-1) plugins/phone/MultiSim.qml (+19/-13) plugins/phone/Services.qml (+6/-1) plugins/phone/SingleSim.qml (+7/-4) plugins/security-privacy/AppAccess.qml (+20/-13) plugins/security-privacy/AppAccessControl.qml (+2/-0) plugins/security-privacy/Location.qml (+1/-1) plugins/security-privacy/PageComponent.qml (+29/-41) plugins/security-privacy/PhoneLocking.qml (+5/-2) plugins/security-privacy/SimPin.qml (+2/-0) plugins/security-privacy/here-terms.qml (+1/-0) plugins/sound/PageComponent.qml (+8/-7) plugins/sound/SoundsList.qml (+3/-5) plugins/system-update/PageComponent.qml (+2/-1) plugins/time-date/ChooseTimeZone.qml (+1/-1) plugins/time-date/PageComponent.qml (+5/-3) plugins/vpn/PageComponent.qml (+4/-2) plugins/wifi/AccessPoint.qml (+3/-9) plugins/wifi/PageComponent.qml (+4/-2) plugins/wifi/PreviousNetworks.qml (+7/-5) src/SystemSettings/CMakeLists.txt (+1/-0) src/SystemSettings/ItemPage.qml (+21/-2) src/SystemSettings/USSAdaptivePageLayout.qml (+40/-0) src/SystemSettings/qmldir (+1/-0) src/qml/CategorySection.qml (+14/-2) src/qml/MainWindow.qml (+61/-11) src/qml/UncategorizedItemsView.qml (+13/-4) tests/autopilot/ubuntu_system_settings/tests/__init__.py (+1/-0) tests/mocks/SystemSettings/MockPluginManager.cpp (+113/-4) tests/mocks/SystemSettings/MockPluginManager.h (+52/-0) tests/mocks/SystemSettings/qmldir (+1/-0) tests/plugins/main/tst_MainWindow.qml (+191/-1) |
To merge this branch: | bzr merge lp:~jonas-drange/ubuntu-system-settings/apl |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Approve | ||
system-apps-ci-bot | continuous-integration | Approve | |
Review via email: mp+313243@code.launchpad.net |
Commit message
migrates uss to apl
Description of the change
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1761
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1762. By Jonas G. Drange
-
fixes vpn and fingerprint issues, as far as USS can fix them
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1762
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1763. By Jonas G. Drange
-
sets flickable on storage page correctly
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1763
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 1764. By Jonas G. Drange
-
fixes broken itempage in hw kbd
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1764
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Ken VanDine (ken-vandine) wrote : | # |
This looks good, one tiny inline comment about copyright years, otherwise good to go
- 1765. By Jonas G. Drange
-
fixes copyright date
- 1766. By Jonas G. Drange
-
merges trunk
- 1767. By Jonas G. Drange
-
merge prereq lp1644268
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:1765
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
system-apps-ci-bot (system-apps-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:1767
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Ken VanDine (ken-vandine) wrote : | # |
Great, thanks!
- 1768. By Jonas G. Drange
-
completes migration to apl for background panel
- 1769. By Jonas G. Drange
-
finalizes migration to apl for bluetooth devicepage
Preview Diff
1 | === modified file 'debian/control' | |||
2 | --- debian/control 2016-11-29 11:11:21 +0000 | |||
3 | +++ debian/control 2017-01-12 12:47:26 +0000 | |||
4 | @@ -95,7 +95,7 @@ | |||
5 | 95 | qml-module-ofono (>=0.90~), | 95 | qml-module-ofono (>=0.90~), |
6 | 96 | qml-module-qtsysteminfo, | 96 | qml-module-qtsysteminfo, |
7 | 97 | qtdeclarative5-ubuntu-content1, | 97 | qtdeclarative5-ubuntu-content1, |
9 | 98 | qtdeclarative5-ubuntu-settings-components (>= 0.11), | 98 | qtdeclarative5-ubuntu-settings-components (>= 0.12), |
10 | 99 | qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584), | 99 | qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584), |
11 | 100 | suru-icon-theme (>= 14.04+15.04.20150813~), | 100 | suru-icon-theme (>= 14.04+15.04.20150813~), |
12 | 101 | whoopsie-preferences (>= 0.9), | 101 | whoopsie-preferences (>= 0.9), |
13 | 102 | 102 | ||
14 | === modified file 'plugins/about/DevMode.qml' | |||
15 | --- plugins/about/DevMode.qml 2016-02-04 15:28:51 +0000 | |||
16 | +++ plugins/about/DevMode.qml 2017-01-12 12:47:26 +0000 | |||
17 | @@ -115,7 +115,9 @@ | |||
18 | 115 | objectName: "lockSecurityItem" | 115 | objectName: "lockSecurityItem" |
19 | 116 | text: i18n.tr("Lock security") | 116 | text: i18n.tr("Lock security") |
20 | 117 | progression: true | 117 | progression: true |
22 | 118 | onClicked: pageStack.push(Qt.resolvedUrl("../security-privacy/LockSecurity.qml")) | 118 | onClicked: pageStack.addPageToNextColumn( |
23 | 119 | devModePage, Qt.resolvedUrl("../security-privacy/LockSecurity.qml") | ||
24 | 120 | ) | ||
25 | 119 | } | 121 | } |
26 | 120 | } | 122 | } |
27 | 121 | } | 123 | } |
28 | 122 | 124 | ||
29 | === modified file 'plugins/about/PageComponent.qml' | |||
30 | --- plugins/about/PageComponent.qml 2016-11-29 11:12:13 +0000 | |||
31 | +++ plugins/about/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
32 | @@ -150,7 +150,7 @@ | |||
33 | 150 | text: i18n.tr("Storage") | 150 | text: i18n.tr("Storage") |
34 | 151 | /* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */ | 151 | /* TRANSLATORS: that's the free disk space, indicated in the most appropriate storage unit */ |
35 | 152 | value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home"))) | 152 | value: i18n.tr("%1 free").arg(Utilities.formatSize(backendInfos.getFreeSpace("/home"))) |
37 | 153 | onClicked: pageStack.push(Qt.resolvedUrl("Storage.qml")) | 153 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Storage.qml")) |
38 | 154 | } | 154 | } |
39 | 155 | 155 | ||
40 | 156 | SettingsItemTitle { | 156 | SettingsItemTitle { |
41 | @@ -173,7 +173,7 @@ | |||
42 | 173 | value: "Ubuntu %1%2" | 173 | value: "Ubuntu %1%2" |
43 | 174 | .arg(deviceInfos.version(DeviceInfo.Os)) | 174 | .arg(deviceInfos.version(DeviceInfo.Os)) |
44 | 175 | .arg(versionIdentifier ? " (%1)".arg(versionIdentifier) : "") | 175 | .arg(versionIdentifier ? " (%1)".arg(versionIdentifier) : "") |
46 | 176 | onClicked: pageStack.push(Qt.resolvedUrl("Version.qml"), { | 176 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Version.qml"), { |
47 | 177 | version: versionIdentifier | 177 | version: versionIdentifier |
48 | 178 | }) | 178 | }) |
49 | 179 | } | 179 | } |
50 | @@ -199,7 +199,7 @@ | |||
51 | 199 | var updatePage = upPlugin.pageComponent | 199 | var updatePage = upPlugin.pageComponent |
52 | 200 | var updatePageItem; | 200 | var updatePageItem; |
53 | 201 | if (updatePage) { | 201 | if (updatePage) { |
55 | 202 | updatePageItem = pageStack.push(updatePage, { | 202 | updatePageItem = pageStack.addPageToNextColumn(root, updatePage, { |
56 | 203 | plugin: upPlugin, pluginManager: pluginManager | 203 | plugin: upPlugin, pluginManager: pluginManager |
57 | 204 | }); | 204 | }); |
58 | 205 | updatePageItem.check(true); // Force a check. | 205 | updatePageItem.check(true); // Force a check. |
59 | @@ -222,7 +222,7 @@ | |||
60 | 222 | SettingsListItems.StandardProgression { | 222 | SettingsListItems.StandardProgression { |
61 | 223 | objectName: "licenseItem" | 223 | objectName: "licenseItem" |
62 | 224 | text: i18n.tr("Software licenses") | 224 | text: i18n.tr("Software licenses") |
64 | 225 | onClicked: pageStack.push(Qt.resolvedUrl("Software.qml")) | 225 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Software.qml")) |
65 | 226 | } | 226 | } |
66 | 227 | 227 | ||
67 | 228 | SettingsListItems.StandardProgression { | 228 | SettingsListItems.StandardProgression { |
68 | @@ -230,14 +230,14 @@ | |||
69 | 230 | pluginManager.getByName("regulatory-information") | 230 | pluginManager.getByName("regulatory-information") |
70 | 231 | text: i18n.tr("Regulatory info") | 231 | text: i18n.tr("Regulatory info") |
71 | 232 | visible: regulatoryInfo | 232 | visible: regulatoryInfo |
73 | 233 | onClicked: pageStack.push(regulatoryInfo.pageComponent) | 233 | onClicked: pageStack.addPageToNextColumn(root, regulatoryInfo.pageComponent) |
74 | 234 | } | 234 | } |
75 | 235 | 235 | ||
76 | 236 | SettingsListItems.SingleValueProgression { | 236 | SettingsListItems.SingleValueProgression { |
77 | 237 | objectName: "devmodeItem" | 237 | objectName: "devmodeItem" |
78 | 238 | text: i18n.tr("Developer mode") | 238 | text: i18n.tr("Developer mode") |
79 | 239 | visible: !isSnap && backendInfos.developerModeCapable || showAllUI | 239 | visible: !isSnap && backendInfos.developerModeCapable || showAllUI |
81 | 240 | onClicked: pageStack.push(Qt.resolvedUrl("DevMode.qml")) | 240 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("DevMode.qml")) |
82 | 241 | } | 241 | } |
83 | 242 | } | 242 | } |
84 | 243 | } | 243 | } |
85 | 244 | 244 | ||
86 | === modified file 'plugins/about/Software.qml' | |||
87 | --- plugins/about/Software.qml 2016-11-28 13:27:33 +0000 | |||
88 | +++ plugins/about/Software.qml 2017-01-12 12:47:26 +0000 | |||
89 | @@ -30,7 +30,9 @@ | |||
90 | 30 | delegate: ListItem.Standard { | 30 | delegate: ListItem.Standard { |
91 | 31 | text: fileName | 31 | text: fileName |
92 | 32 | progression: true | 32 | progression: true |
94 | 33 | onClicked: pageStack.push(Qt.resolvedUrl("License.qml"), {binary: fileName}) | 33 | onClicked: pageStack.addPageToNextColumn( |
95 | 34 | licensesPage, Qt.resolvedUrl("License.qml"), {binary: fileName} | ||
96 | 35 | ) | ||
97 | 34 | } | 36 | } |
98 | 35 | 37 | ||
99 | 36 | } | 38 | } |
100 | 37 | 39 | ||
101 | === modified file 'plugins/about/Storage.qml' | |||
102 | --- plugins/about/Storage.qml 2016-03-29 15:49:29 +0000 | |||
103 | +++ plugins/about/Storage.qml 2017-01-12 12:47:26 +0000 | |||
104 | @@ -53,11 +53,6 @@ | |||
105 | 53 | Loader { | 53 | Loader { |
106 | 54 | id: pageLoader | 54 | id: pageLoader |
107 | 55 | anchors.fill: parent | 55 | anchors.fill: parent |
108 | 56 | onStateChanged: { | ||
109 | 57 | if (state === Loader.Ready) | ||
110 | 58 | storagePage.flickable = scrollWidget; | ||
111 | 59 | } | ||
112 | 60 | |||
113 | 61 | asynchronous: true | 56 | asynchronous: true |
114 | 62 | visible: status == Loader.Ready | 57 | visible: status == Loader.Ready |
115 | 63 | sourceComponent: Item { | 58 | sourceComponent: Item { |
116 | @@ -151,6 +146,8 @@ | |||
117 | 151 | anchors.fill: parent | 146 | anchors.fill: parent |
118 | 152 | contentHeight: columnId.height | 147 | contentHeight: columnId.height |
119 | 153 | 148 | ||
120 | 149 | Component.onCompleted: storagePage.flickable = scrollWidget | ||
121 | 150 | |||
122 | 154 | Column { | 151 | Column { |
123 | 155 | id: columnId | 152 | id: columnId |
124 | 156 | anchors.left: parent.left | 153 | anchors.left: parent.left |
125 | 157 | 154 | ||
126 | === modified file 'plugins/background/MainPage.qml' | |||
127 | --- plugins/background/MainPage.qml 2016-09-26 20:00:30 +0000 | |||
128 | +++ plugins/background/MainPage.qml 2017-01-12 12:47:26 +0000 | |||
129 | @@ -40,13 +40,18 @@ | |||
130 | 40 | 40 | ||
131 | 41 | property var activeTransfer | 41 | property var activeTransfer |
132 | 42 | 42 | ||
133 | 43 | function preview(props) { | ||
134 | 44 | var page = pageStack.addFileToNextColumnSync( | ||
135 | 45 | mainPage, Qt.resolvedUrl("Preview.qml"), props | ||
136 | 46 | ); | ||
137 | 47 | selectedItemConnection.target = page; | ||
138 | 48 | } | ||
139 | 49 | |||
140 | 43 | // Action to import image | 50 | // Action to import image |
141 | 44 | Action { | 51 | Action { |
142 | 45 | id: selectPeer | 52 | id: selectPeer |
143 | 46 | // when action has been activated, push the picker on the stack | 53 | // when action has been activated, push the picker on the stack |
147 | 47 | onTriggered: { | 54 | onTriggered: pageStack.addPageToNextColumn(mainPage, picker) |
145 | 48 | pageStack.push(picker); | ||
146 | 49 | } | ||
148 | 50 | } | 55 | } |
149 | 51 | 56 | ||
150 | 52 | // qml bindings for background stuff | 57 | // qml bindings for background stuff |
151 | @@ -81,10 +86,7 @@ | |||
152 | 81 | backgroundPanel: backgroundPanel | 86 | backgroundPanel: backgroundPanel |
153 | 82 | title: i18n.tr("Ubuntu Art") | 87 | title: i18n.tr("Ubuntu Art") |
154 | 83 | current: welcomeBackground | 88 | current: welcomeBackground |
159 | 84 | onSelected: { | 89 | onSelected: preview({ uri: uri }) |
156 | 85 | pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri}); | ||
157 | 86 | selectedItemConnection.target = pageStack.currentPage; | ||
158 | 87 | } | ||
160 | 88 | } | 90 | } |
161 | 89 | 91 | ||
162 | 90 | WallpaperGrid { | 92 | WallpaperGrid { |
163 | @@ -99,10 +101,7 @@ | |||
164 | 99 | current: welcomeBackground | 101 | current: welcomeBackground |
165 | 100 | editable: true | 102 | editable: true |
166 | 101 | isCustom: true | 103 | isCustom: true |
171 | 102 | onSelected: { | 104 | onSelected: preview({ uri: uri }) |
168 | 103 | pageStack.push(Qt.resolvedUrl("Preview.qml"), {uri: uri}); | ||
169 | 104 | selectedItemConnection.target = pageStack.currentPage | ||
170 | 105 | } | ||
172 | 106 | } | 105 | } |
173 | 107 | 106 | ||
174 | 108 | ListItem.ThinDivider {} | 107 | ListItem.ThinDivider {} |
175 | @@ -172,7 +171,7 @@ | |||
176 | 172 | contentType: ContentType.Pictures | 171 | contentType: ContentType.Pictures |
177 | 173 | 172 | ||
178 | 174 | onPeerSelected: { | 173 | onPeerSelected: { |
180 | 175 | pageStack.pop(); | 174 | pageStack.removePages(picker); |
181 | 176 | // requests an active transfer from peer | 175 | // requests an active transfer from peer |
182 | 177 | function startContentTransfer(callback) { | 176 | function startContentTransfer(callback) { |
183 | 178 | if (callback) | 177 | if (callback) |
184 | @@ -186,15 +185,11 @@ | |||
185 | 186 | // when peer has been selected, request a transfer, providing | 185 | // when peer has been selected, request a transfer, providing |
186 | 187 | // a callback that pushes the preview stack | 186 | // a callback that pushes the preview stack |
187 | 188 | startContentTransfer(function(uri) { | 187 | startContentTransfer(function(uri) { |
193 | 189 | pageStack.push(Qt.resolvedUrl("Preview.qml"), { | 188 | preview({ uri: uri, imported: true }); |
189 | 190 | uri: uri, imported: true | ||
190 | 191 | }); | ||
191 | 192 | // set Connection target | ||
192 | 193 | selectedItemConnection.target = pageStack.currentPage; | ||
194 | 194 | }); | 189 | }); |
195 | 195 | } | 190 | } |
196 | 196 | 191 | ||
198 | 197 | onCancelPressed: pageStack.pop(); | 192 | onCancelPressed: pageStack.removePages(picker) |
199 | 198 | } | 193 | } |
200 | 199 | } | 194 | } |
201 | 200 | 195 | ||
202 | 201 | 196 | ||
203 | === modified file 'plugins/background/Preview.qml' | |||
204 | --- plugins/background/Preview.qml 2016-09-12 15:32:45 +0000 | |||
205 | +++ plugins/background/Preview.qml 2017-01-12 12:47:26 +0000 | |||
206 | @@ -52,7 +52,7 @@ | |||
207 | 52 | StateChangeScript { | 52 | StateChangeScript { |
208 | 53 | script: { | 53 | script: { |
209 | 54 | save(); | 54 | save(); |
211 | 55 | pageStack.pop(); | 55 | pageStack.removePages(preview); |
212 | 56 | } | 56 | } |
213 | 57 | } | 57 | } |
214 | 58 | }, | 58 | }, |
215 | @@ -60,7 +60,7 @@ | |||
216 | 60 | name: "cancelled" | 60 | name: "cancelled" |
217 | 61 | StateChangeScript { | 61 | StateChangeScript { |
218 | 62 | script: { | 62 | script: { |
220 | 63 | pageStack.pop(); | 63 | pageStack.removePages(preview); |
221 | 64 | } | 64 | } |
222 | 65 | } | 65 | } |
223 | 66 | } | 66 | } |
224 | 67 | 67 | ||
225 | === modified file 'plugins/battery/PageComponent.qml' | |||
226 | --- plugins/battery/PageComponent.qml 2016-11-21 14:47:12 +0000 | |||
227 | +++ plugins/battery/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
228 | @@ -297,9 +297,9 @@ | |||
229 | 297 | onClicked: { | 297 | onClicked: { |
230 | 298 | var brightnessPlugin = pluginManager.getByName("brightness"); | 298 | var brightnessPlugin = pluginManager.getByName("brightness"); |
231 | 299 | if (brightnessPlugin) { | 299 | if (brightnessPlugin) { |
235 | 300 | pageStack.push(brightnessPlugin.pageComponent, { | 300 | pageStack.addPageToNextColumn(root, |
236 | 301 | plugin: brightnessPlugin, pluginManager: pluginManager | 301 | brightnessPlugin.pageComponent, { |
237 | 302 | }); | 302 | plugin: brightnessPlugin, pluginManager: pluginManager}); |
238 | 303 | } else { | 303 | } else { |
239 | 304 | console.warn("Failed to get brightness plugin instance"); | 304 | console.warn("Failed to get brightness plugin instance"); |
240 | 305 | } | 305 | } |
241 | @@ -344,9 +344,9 @@ | |||
242 | 344 | SlotsLayout.position: SlotsLayout.First | 344 | SlotsLayout.position: SlotsLayout.First |
243 | 345 | } | 345 | } |
244 | 346 | 346 | ||
248 | 347 | onClicked: pageStack.push( | 347 | onClicked: pageStack.addPageToNextColumn(root, |
249 | 348 | Qt.resolvedUrl("SleepValues.qml"), | 348 | Qt.resolvedUrl("SleepValues.qml"),{ |
250 | 349 | { title: text, lockOnSuspend: lockOnSuspend }) | 349 | title: text, lockOnSuspend: lockOnSuspend }) |
251 | 350 | visible: !isSnap || showAllUI | 350 | visible: !isSnap || showAllUI |
252 | 351 | } | 351 | } |
253 | 352 | 352 | ||
254 | 353 | 353 | ||
255 | === modified file 'plugins/bluetooth/DevicePage.qml' | |||
256 | --- plugins/bluetooth/DevicePage.qml 2016-07-14 13:51:56 +0000 | |||
257 | +++ plugins/bluetooth/DevicePage.qml 2017-01-12 12:47:26 +0000 | |||
258 | @@ -74,14 +74,19 @@ | |||
259 | 74 | } | 74 | } |
260 | 75 | } | 75 | } |
261 | 76 | 76 | ||
267 | 77 | title: backend.selectedDevice ? | 77 | header: PageHeader { |
268 | 78 | backend.selectedDevice.name.length > 0 ? | 78 | title: backend.selectedDevice ? |
269 | 79 | backend.selectedDevice.name : | 79 | backend.selectedDevice.name.length > 0 ? |
270 | 80 | backend.selectedDevice.address | 80 | backend.selectedDevice.name : |
271 | 81 | : i18n.tr("None") | 81 | backend.selectedDevice.address |
272 | 82 | : i18n.tr("None") | ||
273 | 83 | flickable: scrollWidget | ||
274 | 84 | } | ||
275 | 85 | |||
276 | 82 | visible: false | 86 | visible: false |
277 | 83 | 87 | ||
278 | 84 | Flickable { | 88 | Flickable { |
279 | 89 | id: scrollWidget | ||
280 | 85 | anchors.fill: parent | 90 | anchors.fill: parent |
281 | 86 | contentHeight: contentItem.childrenRect.height | 91 | contentHeight: contentItem.childrenRect.height |
282 | 87 | boundsBehavior: (contentHeight > root.height) ? | 92 | boundsBehavior: (contentHeight > root.height) ? |
283 | @@ -153,7 +158,7 @@ | |||
284 | 153 | } | 158 | } |
285 | 154 | 159 | ||
286 | 155 | backend.resetSelectedDevice(); | 160 | backend.resetSelectedDevice(); |
288 | 156 | pageStack.pop(); | 161 | pageStack.removePages(connectedDevicePage); |
289 | 157 | } | 162 | } |
290 | 158 | visible: backend.selectedDevice ? true : false | 163 | visible: backend.selectedDevice ? true : false |
291 | 159 | enabled: backend.selectedDevice && backend.powered ? true : false | 164 | enabled: backend.selectedDevice && backend.powered ? true : false |
292 | @@ -168,7 +173,7 @@ | |||
293 | 168 | onClicked: { | 173 | onClicked: { |
294 | 169 | backend.removeDevice(); | 174 | backend.removeDevice(); |
295 | 170 | backend.resetSelectedDevice(); | 175 | backend.resetSelectedDevice(); |
297 | 171 | pageStack.pop(); | 176 | pageStack.removePages(connectedDevicePage); |
298 | 172 | } | 177 | } |
299 | 173 | enabled: backend.powered && backend.selectedDevice && backend.selectedDevice.path.length > 0 && backend.selectedDevice.paired ? true : false | 178 | enabled: backend.powered && backend.selectedDevice && backend.selectedDevice.path.length > 0 && backend.selectedDevice.paired ? true : false |
300 | 174 | } | 179 | } |
301 | 175 | 180 | ||
302 | === modified file 'plugins/bluetooth/PageComponent.qml' | |||
303 | --- plugins/bluetooth/PageComponent.qml 2016-07-14 13:51:56 +0000 | |||
304 | +++ plugins/bluetooth/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
305 | @@ -31,6 +31,7 @@ | |||
306 | 31 | ItemPage { | 31 | ItemPage { |
307 | 32 | id: root | 32 | id: root |
308 | 33 | title: i18n.tr("Bluetooth") | 33 | title: i18n.tr("Bluetooth") |
309 | 34 | flickable: scrollWidget | ||
310 | 34 | objectName: "bluetoothPage" | 35 | objectName: "bluetoothPage" |
311 | 35 | 36 | ||
312 | 36 | property var dialogPopupId | 37 | property var dialogPopupId |
313 | @@ -205,6 +206,7 @@ | |||
314 | 205 | } | 206 | } |
315 | 206 | 207 | ||
316 | 207 | Flickable { | 208 | Flickable { |
317 | 209 | id: scrollWidget | ||
318 | 208 | anchors.fill: parent | 210 | anchors.fill: parent |
319 | 209 | contentHeight: contentItem.childrenRect.height | 211 | contentHeight: contentItem.childrenRect.height |
320 | 210 | boundsBehavior: (contentHeight > root.height) ? | 212 | boundsBehavior: (contentHeight > root.height) ? |
321 | @@ -299,7 +301,9 @@ | |||
322 | 299 | } | 301 | } |
323 | 300 | onClicked: { | 302 | onClicked: { |
324 | 301 | backend.setSelectedDevice(addressName); | 303 | backend.setSelectedDevice(addressName); |
326 | 302 | pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root}); | 304 | pageStack.addPageToNextColumn(root, |
327 | 305 | Qt.resolvedUrl("DevicePage.qml"), | ||
328 | 306 | {backend: backend, root: root}); | ||
329 | 303 | } | 307 | } |
330 | 304 | } | 308 | } |
331 | 305 | } | 309 | } |
332 | @@ -341,7 +345,9 @@ | |||
333 | 341 | text: getDisplayName(type, displayName) | 345 | text: getDisplayName(type, displayName) |
334 | 342 | onClicked: { | 346 | onClicked: { |
335 | 343 | backend.setSelectedDevice(addressName); | 347 | backend.setSelectedDevice(addressName); |
337 | 344 | pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root}); | 348 | pageStack.addPageToNextColumn(root, |
338 | 349 | Qt.resolvedUrl("DevicePage.qml"), | ||
339 | 350 | {backend: backend, root: root}); | ||
340 | 345 | } | 351 | } |
341 | 346 | } | 352 | } |
342 | 347 | } | 353 | } |
343 | @@ -375,7 +381,9 @@ | |||
344 | 375 | text: getDisplayName(type, displayName) | 381 | text: getDisplayName(type, displayName) |
345 | 376 | onClicked: { | 382 | onClicked: { |
346 | 377 | backend.setSelectedDevice(addressName); | 383 | backend.setSelectedDevice(addressName); |
348 | 378 | pageStack.push(Qt.resolvedUrl("DevicePage.qml"), {backend: backend, root: root}); | 384 | pageStack.addPageToNextColumn(root, |
349 | 385 | Qt.resolvedUrl("DevicePage.qml"), | ||
350 | 386 | {backend: backend, root: root}); | ||
351 | 379 | } | 387 | } |
352 | 380 | } | 388 | } |
353 | 381 | } | 389 | } |
354 | 382 | 390 | ||
355 | === modified file 'plugins/brightness/PageComponent.qml' | |||
356 | --- plugins/brightness/PageComponent.qml 2016-07-06 15:38:55 +0000 | |||
357 | +++ plugins/brightness/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
358 | @@ -43,7 +43,7 @@ | |||
359 | 43 | AethercastDisplays { | 43 | AethercastDisplays { |
360 | 44 | id: aethercastDisplays | 44 | id: aethercastDisplays |
361 | 45 | onEnabledChanged: { | 45 | onEnabledChanged: { |
363 | 46 | /* This is a hack to ensure the aethercast enabled switch stays | 46 | /* This is a hack to ensure the aethercast enabled switch stays |
364 | 47 | * in sync with the enabled property | 47 | * in sync with the enabled property |
365 | 48 | */ | 48 | */ |
366 | 49 | enabledCheck.serverChecked = enabled; | 49 | enabledCheck.serverChecked = enabled; |
367 | @@ -158,7 +158,8 @@ | |||
368 | 158 | text: i18n.tr("Wireless display") | 158 | text: i18n.tr("Wireless display") |
369 | 159 | value: aethercastDisplays.state === "connected" ? i18n.tr("Connected") : i18n.tr("Not connected") | 159 | value: aethercastDisplays.state === "connected" ? i18n.tr("Connected") : i18n.tr("Not connected") |
370 | 160 | progression: true | 160 | progression: true |
372 | 161 | onClicked: pageStack.push(Qt.resolvedUrl("WifiDisplays.qml")) | 161 | onClicked: pageStack.addPageToNextColumn( |
373 | 162 | root, Qt.resolvedUrl("WifiDisplays.qml")) | ||
374 | 162 | } | 163 | } |
375 | 163 | } | 164 | } |
376 | 164 | } | 165 | } |
377 | 165 | 166 | ||
378 | === modified file 'plugins/brightness/WifiDisplays.qml' | |||
379 | --- plugins/brightness/WifiDisplays.qml 2016-07-14 08:31:08 +0000 | |||
380 | +++ plugins/brightness/WifiDisplays.qml 2017-01-12 12:47:26 +0000 | |||
381 | @@ -25,6 +25,7 @@ | |||
382 | 25 | id: wifiDisplays | 25 | id: wifiDisplays |
383 | 26 | objectName: "wifiDisplays" | 26 | objectName: "wifiDisplays" |
384 | 27 | title: i18n.tr("Wireless Display") | 27 | title: i18n.tr("Wireless Display") |
385 | 28 | flickable: pageFlickable | ||
386 | 28 | 29 | ||
387 | 29 | Component.onCompleted: { | 30 | Component.onCompleted: { |
388 | 30 | if (!displays.scanning) | 31 | if (!displays.scanning) |
389 | 31 | 32 | ||
390 | === modified file 'plugins/cellular/Components/MultiSim.qml' | |||
391 | --- plugins/cellular/Components/MultiSim.qml 2016-07-30 01:55:39 +0000 | |||
392 | +++ plugins/cellular/Components/MultiSim.qml 2017-01-12 12:47:26 +0000 | |||
393 | @@ -26,8 +26,8 @@ | |||
394 | 26 | import Ubuntu.Components.ListItems 1.3 as ListItems | 26 | import Ubuntu.Components.ListItems 1.3 as ListItems |
395 | 27 | 27 | ||
396 | 28 | Column { | 28 | Column { |
397 | 29 | id: multiSim | ||
398 | 29 | objectName: "multiSim" | 30 | objectName: "multiSim" |
399 | 30 | |||
400 | 31 | property var sims | 31 | property var sims |
401 | 32 | property var poweredSim: { | 32 | property var poweredSim: { |
402 | 33 | var s = null; | 33 | var s = null; |
403 | @@ -63,9 +63,8 @@ | |||
404 | 63 | progressionVisible: enabled | 63 | progressionVisible: enabled |
405 | 64 | showDivider: false | 64 | showDivider: false |
406 | 65 | onClicked: { | 65 | onClicked: { |
410 | 66 | pageStack.push(Qt.resolvedUrl("../PageCarriersAndApns.qml"), { | 66 | pageStack.addPageToNextColumn(multiSim, |
411 | 67 | sims: sims | 67 | Qt.resolvedUrl("../PageCarriersAndApns.qml"), { sims: sims }); |
409 | 68 | }); | ||
412 | 69 | } | 68 | } |
413 | 70 | } | 69 | } |
414 | 71 | 70 | ||
415 | 72 | 71 | ||
416 | === modified file 'plugins/cellular/Components/SingleSim.qml' | |||
417 | --- plugins/cellular/Components/SingleSim.qml 2016-07-14 13:51:56 +0000 | |||
418 | +++ plugins/cellular/Components/SingleSim.qml 2017-01-12 12:47:26 +0000 | |||
419 | @@ -111,9 +111,8 @@ | |||
420 | 111 | id: chooseCarrier | 111 | id: chooseCarrier |
421 | 112 | objectName: "carrierApnEntry" | 112 | objectName: "carrierApnEntry" |
422 | 113 | value: sim.netReg.name || "" | 113 | value: sim.netReg.name || "" |
426 | 114 | onClicked: pageStack.push(Qt.resolvedUrl("../PageCarrierAndApn.qml"), { | 114 | onClicked: pageStack.addPageToNextColumn(singlesim, |
427 | 115 | sim: sim | 115 | Qt.resolvedUrl("../PageCarrierAndApn.qml"), { sim: sim }) |
425 | 116 | }) | ||
428 | 117 | } | 116 | } |
429 | 118 | 117 | ||
430 | 119 | RadioSingleSim { | 118 | RadioSingleSim { |
431 | 120 | 119 | ||
432 | === modified file 'plugins/cellular/PageApnEditor.qml' | |||
433 | --- plugins/cellular/PageApnEditor.qml 2016-04-01 15:13:06 +0000 | |||
434 | +++ plugins/cellular/PageApnEditor.qml 2017-01-12 12:47:26 +0000 | |||
435 | @@ -67,7 +67,7 @@ | |||
436 | 67 | signal canceled () | 67 | signal canceled () |
437 | 68 | 68 | ||
438 | 69 | title: contextQML ? i18n.tr("Edit") : i18n.tr("New APN") | 69 | title: contextQML ? i18n.tr("Edit") : i18n.tr("New APN") |
440 | 70 | 70 | flickable: scrollArea | |
441 | 71 | state: "default" | 71 | state: "default" |
442 | 72 | states: [ | 72 | states: [ |
443 | 73 | PageHeadState { | 73 | PageHeadState { |
444 | @@ -124,7 +124,6 @@ | |||
445 | 124 | value: false | 124 | value: false |
446 | 125 | } | 125 | } |
447 | 126 | 126 | ||
448 | 127 | flickable: null | ||
449 | 128 | Flickable { | 127 | Flickable { |
450 | 129 | id: scrollArea | 128 | id: scrollArea |
451 | 130 | objectName: "scrollArea" | 129 | objectName: "scrollArea" |
452 | 131 | 130 | ||
453 | === modified file 'plugins/cellular/PageCarrierAndApn.qml' | |||
454 | --- plugins/cellular/PageCarrierAndApn.qml 2016-07-14 13:51:56 +0000 | |||
455 | +++ plugins/cellular/PageCarrierAndApn.qml 2017-01-12 12:47:26 +0000 | |||
456 | @@ -26,11 +26,12 @@ | |||
457 | 26 | id: root | 26 | id: root |
458 | 27 | title: i18n.tr("Carrier & APN") | 27 | title: i18n.tr("Carrier & APN") |
459 | 28 | objectName: "carrierApnPage" | 28 | objectName: "carrierApnPage" |
461 | 29 | flickable: null | 29 | flickable: scrollWidget |
462 | 30 | 30 | ||
463 | 31 | property var sim | 31 | property var sim |
464 | 32 | 32 | ||
465 | 33 | Flickable { | 33 | Flickable { |
466 | 34 | id: scrollWidget | ||
467 | 34 | anchors.fill: parent | 35 | anchors.fill: parent |
468 | 35 | contentWidth: parent.width | 36 | contentWidth: parent.width |
469 | 36 | contentHeight: contentItem.childrenRect.height | 37 | contentHeight: contentItem.childrenRect.height |
470 | @@ -47,7 +48,8 @@ | |||
471 | 47 | enabled: (sim.netReg.status !== "") && | 48 | enabled: (sim.netReg.status !== "") && |
472 | 48 | (sim.netReg.mode !== "auto-only") | 49 | (sim.netReg.mode !== "auto-only") |
473 | 49 | progressionVisible: enabled | 50 | progressionVisible: enabled |
475 | 50 | onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), { | 51 | onClicked: pageStack.addPageToNextColumn(root, |
476 | 52 | Qt.resolvedUrl("PageChooseCarrier.qml"), { | ||
477 | 51 | sim: sim, | 53 | sim: sim, |
478 | 52 | title: i18n.tr("Carrier") | 54 | title: i18n.tr("Carrier") |
479 | 53 | }) | 55 | }) |
480 | @@ -57,7 +59,8 @@ | |||
481 | 57 | text: i18n.tr("APN") | 59 | text: i18n.tr("APN") |
482 | 58 | objectName: "apn" | 60 | objectName: "apn" |
483 | 59 | progressionVisible: enabled | 61 | progressionVisible: enabled |
485 | 60 | onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), { | 62 | onClicked: pageStack.addPageToNextColumn(root, |
486 | 63 | Qt.resolvedUrl("PageChooseApn.qml"), { | ||
487 | 61 | sim: sim | 64 | sim: sim |
488 | 62 | }) | 65 | }) |
489 | 63 | } | 66 | } |
490 | 64 | 67 | ||
491 | === modified file 'plugins/cellular/PageCarriersAndApns.qml' | |||
492 | --- plugins/cellular/PageCarriersAndApns.qml 2016-07-14 13:51:56 +0000 | |||
493 | +++ plugins/cellular/PageCarriersAndApns.qml 2017-01-12 12:47:26 +0000 | |||
494 | @@ -26,11 +26,12 @@ | |||
495 | 26 | id: root | 26 | id: root |
496 | 27 | title: i18n.tr("Carriers & APNs") | 27 | title: i18n.tr("Carriers & APNs") |
497 | 28 | objectName: "carrierApnPage" | 28 | objectName: "carrierApnPage" |
499 | 29 | flickable: null | 29 | flickable: scrollWidget |
500 | 30 | 30 | ||
501 | 31 | property var sims | 31 | property var sims |
502 | 32 | 32 | ||
503 | 33 | Flickable { | 33 | Flickable { |
504 | 34 | id: scrollWidget | ||
505 | 34 | anchors.fill: parent | 35 | anchors.fill: parent |
506 | 35 | contentWidth: parent.width | 36 | contentWidth: parent.width |
507 | 36 | contentHeight: contentItem.childrenRect.height | 37 | contentHeight: contentItem.childrenRect.height |
508 | @@ -59,7 +60,8 @@ | |||
509 | 59 | enabled: (sims[index].netReg.status !== "") && | 60 | enabled: (sims[index].netReg.status !== "") && |
510 | 60 | (sims[index].netReg.mode !== "auto-only") | 61 | (sims[index].netReg.mode !== "auto-only") |
511 | 61 | progressionVisible: enabled | 62 | progressionVisible: enabled |
513 | 62 | onClicked: pageStack.push(Qt.resolvedUrl("PageChooseCarrier.qml"), { | 63 | onClicked: pageStack.addPageToNextColumn(root, |
514 | 64 | Qt.resolvedUrl("PageChooseCarrier.qml"), { | ||
515 | 63 | sim: sims[index], | 65 | sim: sims[index], |
516 | 64 | title: sims[index].title | 66 | title: sims[index].title |
517 | 65 | }) | 67 | }) |
518 | @@ -68,7 +70,8 @@ | |||
519 | 68 | SettingsListItems.StandardProgression { | 70 | SettingsListItems.StandardProgression { |
520 | 69 | text: i18n.tr("APN") | 71 | text: i18n.tr("APN") |
521 | 70 | progressionVisible: enabled | 72 | progressionVisible: enabled |
523 | 71 | onClicked: pageStack.push(Qt.resolvedUrl("PageChooseApn.qml"), { | 73 | onClicked: pageStack.addPageToNextColumn(root, |
524 | 74 | Qt.resolvedUrl("PageChooseApn.qml"), { | ||
525 | 72 | sim: sims[index] | 75 | sim: sims[index] |
526 | 73 | }) | 76 | }) |
527 | 74 | } | 77 | } |
528 | 75 | 78 | ||
529 | === modified file 'plugins/cellular/PageChooseApn.qml' | |||
530 | --- plugins/cellular/PageChooseApn.qml 2016-07-14 13:51:56 +0000 | |||
531 | +++ plugins/cellular/PageChooseApn.qml 2017-01-12 12:47:26 +0000 | |||
532 | @@ -35,6 +35,7 @@ | |||
533 | 35 | ItemPage { | 35 | ItemPage { |
534 | 36 | id: root | 36 | id: root |
535 | 37 | title: i18n.tr("APN") | 37 | title: i18n.tr("APN") |
536 | 38 | flickable: scrollWidget | ||
537 | 38 | objectName: "apnPage" | 39 | objectName: "apnPage" |
538 | 39 | 40 | ||
539 | 40 | property var sim | 41 | property var sim |
540 | @@ -106,11 +107,13 @@ | |||
541 | 106 | iconName: "add" | 107 | iconName: "add" |
542 | 107 | objectName: "newApn" | 108 | objectName: "newApn" |
543 | 108 | onTriggered: { | 109 | onTriggered: { |
549 | 109 | editor = pageStack.push(pageApnEditor, { | 110 | editor = pageStack.addPageToNextColumn(root, |
550 | 110 | mmsModel: mmsContexts, | 111 | pageApnEditor, { |
551 | 111 | internetModel: internetContexts, | 112 | mmsModel: mmsContexts, |
552 | 112 | iaModel: iaContexts | 113 | internetModel: internetContexts, |
553 | 113 | }); | 114 | iaModel: iaContexts |
554 | 115 | } | ||
555 | 116 | ); | ||
556 | 114 | } | 117 | } |
557 | 115 | } | 118 | } |
558 | 116 | ] | 119 | ] |
559 | @@ -306,7 +309,7 @@ | |||
560 | 306 | } | 309 | } |
561 | 307 | 310 | ||
562 | 308 | onClicked: { | 311 | onClicked: { |
564 | 309 | editor = pageStack.push(pageApnEditor, { | 312 | editor = pageStack.addPageToNextColumn(root, pageApnEditor, { |
565 | 310 | contextQML: qml, | 313 | contextQML: qml, |
566 | 311 | mmsModel: mmsContexts, | 314 | mmsModel: mmsContexts, |
567 | 312 | internetModel: internetContexts, | 315 | internetModel: internetContexts, |
568 | 313 | 316 | ||
569 | === modified file 'plugins/cellular/PageChooseCarrier.qml' | |||
570 | --- plugins/cellular/PageChooseCarrier.qml 2015-11-13 13:37:40 +0000 | |||
571 | +++ plugins/cellular/PageChooseCarrier.qml 2017-01-12 12:47:26 +0000 | |||
572 | @@ -31,7 +31,7 @@ | |||
573 | 31 | id: root | 31 | id: root |
574 | 32 | title: i18n.tr("Carrier") | 32 | title: i18n.tr("Carrier") |
575 | 33 | objectName: "chooseCarrierPage" | 33 | objectName: "chooseCarrierPage" |
577 | 34 | flickable: null | 34 | flickable: scrollWidget |
578 | 35 | 35 | ||
579 | 36 | property var sim | 36 | property var sim |
580 | 37 | property bool scanning: true | 37 | property bool scanning: true |
581 | 38 | 38 | ||
582 | === modified file 'plugins/cellular/PageComponent.qml' | |||
583 | --- plugins/cellular/PageComponent.qml 2016-07-14 13:51:56 +0000 | |||
584 | +++ plugins/cellular/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
585 | @@ -30,6 +30,7 @@ | |||
586 | 30 | ItemPage { | 30 | ItemPage { |
587 | 31 | id: root | 31 | id: root |
588 | 32 | title: i18n.tr("Cellular") | 32 | title: i18n.tr("Cellular") |
589 | 33 | flickable: flick | ||
590 | 33 | objectName: "cellularPage" | 34 | objectName: "cellularPage" |
591 | 34 | 35 | ||
592 | 35 | property var modemsSorted: [] | 36 | property var modemsSorted: [] |
593 | 36 | 37 | ||
594 | === modified file 'plugins/hotspot/PageComponent.qml' | |||
595 | --- plugins/hotspot/PageComponent.qml 2016-08-17 12:39:39 +0000 | |||
596 | +++ plugins/hotspot/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
597 | @@ -31,6 +31,7 @@ | |||
598 | 31 | id: root | 31 | id: root |
599 | 32 | objectName: "hotspotPage" | 32 | objectName: "hotspotPage" |
600 | 33 | title: i18n.tr("Hotspot") | 33 | title: i18n.tr("Hotspot") |
601 | 34 | flickable: flick | ||
602 | 34 | 35 | ||
603 | 35 | states: [ | 36 | states: [ |
604 | 36 | State { | 37 | State { |
605 | 37 | 38 | ||
606 | === modified file 'plugins/language/KeyboardLayouts.qml' | |||
607 | --- plugins/language/KeyboardLayouts.qml 2016-01-27 15:32:11 +0000 | |||
608 | +++ plugins/language/KeyboardLayouts.qml 2017-01-12 12:47:26 +0000 | |||
609 | @@ -27,6 +27,7 @@ | |||
610 | 27 | ItemPage { | 27 | ItemPage { |
611 | 28 | id: root | 28 | id: root |
612 | 29 | title: i18n.tr("Keyboard layouts") | 29 | title: i18n.tr("Keyboard layouts") |
613 | 30 | flickable: subsetView | ||
614 | 30 | 31 | ||
615 | 31 | property var plugin | 32 | property var plugin |
616 | 32 | property bool currentLayoutsDraggable: false | 33 | property bool currentLayoutsDraggable: false |
617 | 33 | 34 | ||
618 | === modified file 'plugins/language/PageComponent.qml' | |||
619 | --- plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
620 | +++ plugins/language/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
621 | @@ -34,6 +34,7 @@ | |||
622 | 34 | objectName: "languagePage" | 34 | objectName: "languagePage" |
623 | 35 | 35 | ||
624 | 36 | title: i18n.tr("Language & Text") | 36 | title: i18n.tr("Language & Text") |
625 | 37 | flickable: scrollWidget | ||
626 | 37 | 38 | ||
627 | 38 | InputDeviceManager { | 39 | InputDeviceManager { |
628 | 39 | id: keyboardsModel | 40 | id: keyboardsModel |
629 | @@ -42,30 +43,16 @@ | |||
630 | 42 | 43 | ||
631 | 43 | property bool externalKeyboardPresent: keyboardsModel.count > 0 | 44 | property bool externalKeyboardPresent: keyboardsModel.count > 0 |
632 | 44 | 45 | ||
657 | 45 | property var pluginOptions | 46 | onPushedOntoStack: { |
658 | 46 | Connections { | 47 | if (pluginOptions && pluginOptions['subpage']) { |
659 | 47 | target: pageStack | 48 | switch (pluginOptions['subpage']) { |
660 | 48 | onCurrentPageChanged: { | 49 | case 'hw-keyboard-layouts': |
661 | 49 | // If we are called with subpage=foo, push foo on the stack. | 50 | pageStack.addPageToNextColumn( |
662 | 50 | // | 51 | root, Qt.resolvedUrl('KeyboardLayouts.qml'), { |
663 | 51 | // We need to wait until the PageComponent has been pushed to the stack | 52 | plugin: hwKeyboardPlugin, |
664 | 52 | // before pushing the subpages, otherwise they will be pushed below the | 53 | currentLayoutsDraggable: true |
665 | 53 | // PageComponent. | 54 | }); |
666 | 54 | if (pageStack.currentPage === root) { | 55 | break; |
643 | 55 | if (pluginOptions && pluginOptions['subpage']) { | ||
644 | 56 | switch (pluginOptions['subpage']) { | ||
645 | 57 | case 'hw-keyboard-layouts': | ||
646 | 58 | pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), { | ||
647 | 59 | plugin: hwKeyboardPlugin, | ||
648 | 60 | currentLayoutsDraggable: true | ||
649 | 61 | }) | ||
650 | 62 | break; | ||
651 | 63 | } | ||
652 | 64 | } | ||
653 | 65 | |||
654 | 66 | // Once done, disable this Connections, so that if the user navigates | ||
655 | 67 | // back to the root we won't push the subpages again | ||
656 | 68 | target = null | ||
667 | 69 | } | 56 | } |
668 | 70 | } | 57 | } |
669 | 71 | } | 58 | } |
670 | @@ -122,6 +109,7 @@ | |||
671 | 122 | } | 109 | } |
672 | 123 | 110 | ||
673 | 124 | Flickable { | 111 | Flickable { |
674 | 112 | id: scrollWidget | ||
675 | 125 | anchors.fill: parent | 113 | anchors.fill: parent |
676 | 126 | contentHeight: contentItem.childrenRect.height | 114 | contentHeight: contentItem.childrenRect.height |
677 | 127 | boundsBehavior: contentHeight > root.height ? | 115 | boundsBehavior: contentHeight > root.height ? |
678 | @@ -159,7 +147,7 @@ | |||
679 | 159 | value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ? | 147 | value: oskPlugin.keyboardLayoutsModel.subset.length == 1 ? |
680 | 160 | oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] : | 148 | oskPlugin.keyboardLayoutsModel.superset[oskPlugin.keyboardLayoutsModel.subset[0]][0] : |
681 | 161 | oskPlugin.keyboardLayoutsModel.subset.length | 149 | oskPlugin.keyboardLayoutsModel.subset.length |
683 | 162 | onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), { | 150 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("KeyboardLayouts.qml"), { |
684 | 163 | plugin: oskPlugin | 151 | plugin: oskPlugin |
685 | 164 | }) | 152 | }) |
686 | 165 | } | 153 | } |
687 | @@ -168,7 +156,7 @@ | |||
688 | 168 | text: i18n.tr("External keyboard") | 156 | text: i18n.tr("External keyboard") |
689 | 169 | progression: true | 157 | progression: true |
690 | 170 | showDivider: false | 158 | showDivider: false |
692 | 171 | onClicked: pageStack.push(Qt.resolvedUrl("PageHardwareKeyboard.qml")) | 159 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PageHardwareKeyboard.qml")) |
693 | 172 | visible: externalKeyboardPresent || showAllUI | 160 | visible: externalKeyboardPresent || showAllUI |
694 | 173 | } | 161 | } |
695 | 174 | 162 | ||
696 | @@ -183,7 +171,7 @@ | |||
697 | 183 | plugin.spellCheckingModel.subset.length | 171 | plugin.spellCheckingModel.subset.length |
698 | 184 | progression: true | 172 | progression: true |
699 | 185 | 173 | ||
701 | 186 | onClicked: pageStack.push(spellChecking) | 174 | onClicked: pageStack.addPageToNextColumn(root, spellChecking) |
702 | 187 | } | 175 | } |
703 | 188 | 176 | ||
704 | 189 | ListItem.Standard { | 177 | ListItem.Standard { |
705 | 190 | 178 | ||
706 | === modified file 'plugins/language/PageHardwareKeyboard.qml' | |||
707 | --- plugins/language/PageHardwareKeyboard.qml 2016-11-15 13:19:23 +0000 | |||
708 | +++ plugins/language/PageHardwareKeyboard.qml 2017-01-12 12:47:26 +0000 | |||
709 | @@ -31,6 +31,7 @@ | |||
710 | 31 | objectName: "hwKbdPage" | 31 | objectName: "hwKbdPage" |
711 | 32 | 32 | ||
712 | 33 | title: i18n.tr("Hardware keyboard") | 33 | title: i18n.tr("Hardware keyboard") |
713 | 34 | flickable: scrollWidget | ||
714 | 34 | 35 | ||
715 | 35 | Component { | 36 | Component { |
716 | 36 | id: keyboardLayouts | 37 | id: keyboardLayouts |
717 | @@ -43,6 +44,7 @@ | |||
718 | 43 | } | 44 | } |
719 | 44 | 45 | ||
720 | 45 | Flickable { | 46 | Flickable { |
721 | 47 | id: scrollWidget | ||
722 | 46 | anchors.fill: parent | 48 | anchors.fill: parent |
723 | 47 | contentHeight: contentItem.childrenRect.height | 49 | contentHeight: contentItem.childrenRect.height |
724 | 48 | boundsBehavior: contentHeight > root.height ? | 50 | boundsBehavior: contentHeight > root.height ? |
725 | @@ -64,10 +66,12 @@ | |||
726 | 64 | plugin.keyboardLayoutsModel.subset.length | 66 | plugin.keyboardLayoutsModel.subset.length |
727 | 65 | progression: true | 67 | progression: true |
728 | 66 | 68 | ||
733 | 67 | onClicked: pageStack.push(Qt.resolvedUrl("KeyboardLayouts.qml"), { | 69 | onClicked: pageStack.addPageToNextColumn(root, |
734 | 68 | plugin: plugin, | 70 | Qt.resolvedUrl("KeyboardLayouts.qml"), { |
735 | 69 | currentLayoutsDraggable: true | 71 | plugin: plugin, |
736 | 70 | }) | 72 | currentLayoutsDraggable: true |
737 | 73 | } | ||
738 | 74 | ) | ||
739 | 71 | } | 75 | } |
740 | 72 | } | 76 | } |
741 | 73 | } | 77 | } |
742 | 74 | 78 | ||
743 | === modified file 'plugins/language/SpellChecking.qml' | |||
744 | --- plugins/language/SpellChecking.qml 2016-07-12 16:40:18 +0000 | |||
745 | +++ plugins/language/SpellChecking.qml 2017-01-12 12:47:26 +0000 | |||
746 | @@ -27,6 +27,7 @@ | |||
747 | 27 | 27 | ||
748 | 28 | ItemPage { | 28 | ItemPage { |
749 | 29 | title: i18n.tr("Spell checking") | 29 | title: i18n.tr("Spell checking") |
750 | 30 | flickable: scrollWidget | ||
751 | 30 | 31 | ||
752 | 31 | UbuntuLanguagePlugin { | 32 | UbuntuLanguagePlugin { |
753 | 32 | id: plugin | 33 | id: plugin |
754 | @@ -52,6 +53,7 @@ | |||
755 | 52 | } | 53 | } |
756 | 53 | 54 | ||
757 | 54 | SubsetView { | 55 | SubsetView { |
758 | 56 | id: scrollWidget | ||
759 | 55 | clip: true | 57 | clip: true |
760 | 56 | 58 | ||
761 | 57 | anchors.top: item.bottom | 59 | anchors.top: item.bottom |
762 | 58 | 60 | ||
763 | === modified file 'plugins/launcher/PageComponent.qml' | |||
764 | --- plugins/launcher/PageComponent.qml 2016-11-16 17:06:51 +0000 | |||
765 | +++ plugins/launcher/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
766 | @@ -29,6 +29,7 @@ | |||
767 | 29 | id: root | 29 | id: root |
768 | 30 | objectName: "launcherPage" | 30 | objectName: "launcherPage" |
769 | 31 | title: i18n.tr("Launcher") | 31 | title: i18n.tr("Launcher") |
770 | 32 | flickable: flick | ||
771 | 32 | 33 | ||
772 | 33 | /* The introductory label “On large displays:” should be present if the | 34 | /* The introductory label “On large displays:” should be present if the |
773 | 34 | current display does not fall into <the large screen> category (to explain | 35 | current display does not fall into <the large screen> category (to explain |
774 | 35 | 36 | ||
775 | === modified file 'plugins/notifications/PageComponent.qml' | |||
776 | --- plugins/notifications/PageComponent.qml 2016-07-08 22:13:26 +0000 | |||
777 | +++ plugins/notifications/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
778 | @@ -27,6 +27,7 @@ | |||
779 | 27 | objectName: "systemNotificationsPage" | 27 | objectName: "systemNotificationsPage" |
780 | 28 | 28 | ||
781 | 29 | title: i18n.tr("Notifications") | 29 | title: i18n.tr("Notifications") |
782 | 30 | flickable: notificationsList | ||
783 | 30 | 31 | ||
784 | 31 | onActiveChanged: { | 32 | onActiveChanged: { |
785 | 32 | if (active) { | 33 | if (active) { |
786 | @@ -66,7 +67,7 @@ | |||
787 | 66 | left: parent.left | 67 | left: parent.left |
788 | 67 | right: parent.right | 68 | right: parent.right |
789 | 68 | } | 69 | } |
791 | 69 | 70 | ||
792 | 70 | ListItems.Base { | 71 | ListItems.Base { |
793 | 71 | height: labelSubtitle.height + units.gu(2) | 72 | height: labelSubtitle.height + units.gu(2) |
794 | 72 | Label { | 73 | Label { |
795 | @@ -105,8 +106,9 @@ | |||
796 | 105 | return | 106 | return |
797 | 106 | } | 107 | } |
798 | 107 | 108 | ||
801 | 108 | pageStack.push(Qt.resolvedUrl("ClickAppsSoundsNotify.qml"), | 109 | pageStack.addPageToNextColumn( |
802 | 109 | { model: clickAppsSoundsNotifyModel }) | 110 | root, Qt.resolvedUrl("ClickAppsSoundsNotify.qml"), |
803 | 111 | { model: clickAppsSoundsNotifyModel }) | ||
804 | 110 | } | 112 | } |
805 | 111 | } | 113 | } |
806 | 112 | 114 | ||
807 | @@ -130,8 +132,9 @@ | |||
808 | 130 | return | 132 | return |
809 | 131 | } | 133 | } |
810 | 132 | 134 | ||
813 | 133 | pageStack.push(Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"), | 135 | pageStack.addPageToNextColumn( |
814 | 134 | { model: clickAppsVibrationsNotifyModel }) | 136 | root, Qt.resolvedUrl("ClickAppsVibrationsNotify.qml"), |
815 | 137 | { model: clickAppsVibrationsNotifyModel }) | ||
816 | 135 | } | 138 | } |
817 | 136 | } | 139 | } |
818 | 137 | 140 | ||
819 | @@ -147,9 +150,9 @@ | |||
820 | 147 | delegate: ListItem { | 150 | delegate: ListItem { |
821 | 148 | height: layout.height + (divider.visible ? divider.height : 0) | 151 | height: layout.height + (divider.visible ? divider.height : 0) |
822 | 149 | 152 | ||
826 | 150 | onClicked: pageStack.push(Qt.resolvedUrl("ClickAppNotifications.qml"), | 153 | onClicked: pageStack.addPageToNextColumn( |
827 | 151 | { entry: model, | 154 | root, Qt.resolvedUrl("ClickAppNotifications.qml"), |
828 | 152 | entryIndex: index }) | 155 | { entry: model, entryIndex: index }) |
829 | 153 | 156 | ||
830 | 154 | ListItemLayout { | 157 | ListItemLayout { |
831 | 155 | id: layout | 158 | id: layout |
832 | 156 | 159 | ||
833 | === modified file 'plugins/phone/CallForwarding.qml' | |||
834 | --- plugins/phone/CallForwarding.qml 2016-07-14 13:51:56 +0000 | |||
835 | +++ plugins/phone/CallForwarding.qml 2017-01-12 12:47:26 +0000 | |||
836 | @@ -100,7 +100,7 @@ | |||
837 | 100 | value: false | 100 | value: false |
838 | 101 | } | 101 | } |
839 | 102 | 102 | ||
841 | 103 | flickable: null | 103 | flickable: flick |
842 | 104 | Flickable { | 104 | Flickable { |
843 | 105 | id: flick | 105 | id: flick |
844 | 106 | 106 | ||
845 | 107 | 107 | ||
846 | === modified file 'plugins/phone/MultiSim.qml' | |||
847 | --- plugins/phone/MultiSim.qml 2016-07-12 16:41:13 +0000 | |||
848 | +++ plugins/phone/MultiSim.qml 2017-01-12 12:47:26 +0000 | |||
849 | @@ -41,10 +41,12 @@ | |||
850 | 41 | objectName: "callWaitSim" + index | 41 | objectName: "callWaitSim" + index |
851 | 42 | text: i18n.tr("Call waiting") | 42 | text: i18n.tr("Call waiting") |
852 | 43 | progression: true | 43 | progression: true |
857 | 44 | onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), { | 44 | onClicked: pageStack.addPageToNextColumn(root, |
858 | 45 | sim: sims[index], | 45 | Qt.resolvedUrl("CallWaiting.qml"), { |
859 | 46 | headerTitle: sims[index].title | 46 | sim: sims[index], |
860 | 47 | }) | 47 | headerTitle: sims[index].title |
861 | 48 | } | ||
862 | 49 | ) | ||
863 | 48 | } | 50 | } |
864 | 49 | 51 | ||
865 | 50 | ListItem.SingleValue { | 52 | ListItem.SingleValue { |
866 | @@ -52,10 +54,12 @@ | |||
867 | 52 | text: i18n.tr("Call forwarding") | 54 | text: i18n.tr("Call forwarding") |
868 | 53 | progression: true | 55 | progression: true |
869 | 54 | value: sims[index].getCallForwardingSummary() | 56 | value: sims[index].getCallForwardingSummary() |
874 | 55 | onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), { | 57 | onClicked: pageStack.addPageToNextColumn(root, |
875 | 56 | sim: sims[index], | 58 | Qt.resolvedUrl("CallForwarding.qml"), { |
876 | 57 | headerTitle: sims[index].title | 59 | sim: sims[index], |
877 | 58 | }) | 60 | headerTitle: sims[index].title |
878 | 61 | } | ||
879 | 62 | ) | ||
880 | 59 | } | 63 | } |
881 | 60 | 64 | ||
882 | 61 | ListItem.Standard { | 65 | ListItem.Standard { |
883 | @@ -75,11 +79,13 @@ | |||
884 | 75 | return sims[index].simMng.present && nums; | 79 | return sims[index].simMng.present && nums; |
885 | 76 | } | 80 | } |
886 | 77 | showDivider: false | 81 | showDivider: false |
892 | 78 | onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), { | 82 | onClicked: pageStack.addPageToNextColumn(root, |
893 | 79 | carrierString: sims[index].netReg.name, | 83 | Qt.resolvedUrl("Services.qml"), { |
894 | 80 | sim: sims[index].simMng, | 84 | carrierString: sims[index].netReg.name, |
895 | 81 | headerTitle: sims[index].title | 85 | sim: sims[index].simMng, |
896 | 82 | }) | 86 | headerTitle: sims[index].title |
897 | 87 | } | ||
898 | 88 | ) | ||
899 | 83 | } | 89 | } |
900 | 84 | 90 | ||
901 | 85 | ListItem.Divider { | 91 | ListItem.Divider { |
902 | 86 | 92 | ||
903 | === modified file 'plugins/phone/Services.qml' | |||
904 | --- plugins/phone/Services.qml 2016-07-12 16:41:13 +0000 | |||
905 | +++ plugins/phone/Services.qml 2017-01-12 12:47:26 +0000 | |||
906 | @@ -27,6 +27,7 @@ | |||
907 | 27 | id: root | 27 | id: root |
908 | 28 | objectName: "servicesPage" | 28 | objectName: "servicesPage" |
909 | 29 | title: headerTitle | 29 | title: headerTitle |
910 | 30 | flickable: scrollWidget | ||
911 | 30 | property string carrierString | 31 | property string carrierString |
912 | 31 | property variant sim | 32 | property variant sim |
913 | 32 | property var names: [] | 33 | property var names: [] |
914 | @@ -44,6 +45,7 @@ | |||
915 | 44 | } | 45 | } |
916 | 45 | 46 | ||
917 | 46 | Flickable { | 47 | Flickable { |
918 | 48 | id: scrollWidget | ||
919 | 47 | anchors.fill: parent | 49 | anchors.fill: parent |
920 | 48 | contentHeight: contentItem.childrenRect.height | 50 | contentHeight: contentItem.childrenRect.height |
921 | 49 | boundsBehavior: (contentHeight > root.height) ? | 51 | boundsBehavior: (contentHeight > root.height) ? |
922 | @@ -63,7 +65,10 @@ | |||
923 | 63 | ListItem.Standard { | 65 | ListItem.Standard { |
924 | 64 | progression: true | 66 | progression: true |
925 | 65 | text: modelData | 67 | text: modelData |
927 | 66 | onClicked: pageStack.push(Qt.resolvedUrl("ServiceInfo.qml"), {serviceName: modelData, serviceNumber: sim.serviceNumbers[modelData]}) | 68 | onClicked: pageStack.addPageToNextColumn(root, |
928 | 69 | Qt.resolvedUrl("ServiceInfo.qml"), { | ||
929 | 70 | serviceName: modelData, | ||
930 | 71 | serviceNumber: sim.serviceNumbers[modelData]}) | ||
931 | 67 | } | 72 | } |
932 | 68 | } | 73 | } |
933 | 69 | } | 74 | } |
934 | 70 | 75 | ||
935 | === modified file 'plugins/phone/SingleSim.qml' | |||
936 | --- plugins/phone/SingleSim.qml 2016-07-12 16:41:13 +0000 | |||
937 | +++ plugins/phone/SingleSim.qml 2017-01-12 12:47:26 +0000 | |||
938 | @@ -33,7 +33,8 @@ | |||
939 | 33 | objectName: "callWait" | 33 | objectName: "callWait" |
940 | 34 | text: i18n.tr("Call waiting") | 34 | text: i18n.tr("Call waiting") |
941 | 35 | progression: true | 35 | progression: true |
943 | 36 | onClicked: pageStack.push(Qt.resolvedUrl("CallWaiting.qml"), {sim: sim}) | 36 | onClicked: pageStack.addPageToNextColumn(root, |
944 | 37 | Qt.resolvedUrl("CallWaiting.qml"), {sim: sim}) | ||
945 | 37 | } | 38 | } |
946 | 38 | 39 | ||
947 | 39 | ListItem.SingleValue { | 40 | ListItem.SingleValue { |
948 | @@ -42,7 +43,8 @@ | |||
949 | 42 | showDivider: false | 43 | showDivider: false |
950 | 43 | progression: true | 44 | progression: true |
951 | 44 | value: sim.getCallForwardingSummary() | 45 | value: sim.getCallForwardingSummary() |
953 | 45 | onClicked: pageStack.push(Qt.resolvedUrl("CallForwarding.qml"), {sim: sim}) | 46 | onClicked: pageStack.addPageToNextColumn(root, |
954 | 47 | Qt.resolvedUrl("CallForwarding.qml"), {sim: sim}) | ||
955 | 46 | } | 48 | } |
956 | 47 | 49 | ||
957 | 48 | ListItem.Divider {} | 50 | ListItem.Divider {} |
958 | @@ -65,7 +67,8 @@ | |||
959 | 65 | } | 67 | } |
960 | 66 | return sim.simMng.present && nums; | 68 | return sim.simMng.present && nums; |
961 | 67 | } | 69 | } |
964 | 68 | onClicked: pageStack.push(Qt.resolvedUrl("Services.qml"), | 70 | onClicked: pageStack.addPageToNextColumn(root, |
965 | 69 | {carrierString: carrierString, sim: sim.simMng}) | 71 | Qt.resolvedUrl("Services.qml"), |
966 | 72 | {carrierString: carrierString, sim: sim.simMng}) | ||
967 | 70 | } | 73 | } |
968 | 71 | } | 74 | } |
969 | 72 | 75 | ||
970 | === modified file 'plugins/security-privacy/AppAccess.qml' | |||
971 | --- plugins/security-privacy/AppAccess.qml 2016-07-14 13:51:56 +0000 | |||
972 | +++ plugins/security-privacy/AppAccess.qml 2017-01-12 12:47:26 +0000 | |||
973 | @@ -27,23 +27,30 @@ | |||
974 | 27 | ItemPage { | 27 | ItemPage { |
975 | 28 | id: root | 28 | id: root |
976 | 29 | title: i18n.tr("App permissions") | 29 | title: i18n.tr("App permissions") |
977 | 30 | flickable: scrollWidget | ||
978 | 30 | 31 | ||
990 | 31 | function openService(service) { | 32 | onPushedOntoStack: { |
991 | 32 | for (var i = 0; i < appsModel.count; i++) { | 33 | var service; |
992 | 33 | var item = appsModel.get(i) | 34 | if (pluginOptions && pluginOptions['service']) { |
993 | 34 | if (item.service === service) { | 35 | service = pluginOptions['service']; |
994 | 35 | var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService }) | 36 | for (var i = 0; i < appsModel.count; i++) { |
995 | 36 | pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), { | 37 | var item = appsModel.get(i) |
996 | 37 | "title": i18n.tr(item.name), | 38 | if (item.service === service) { |
997 | 38 | "caption": i18n.tr(item.caption), | 39 | var model = trustStoreModelComponent.createObject(null, { serviceName: item.trustStoreService }) |
998 | 39 | "model": model | 40 | pageStack.addPageToNextColumn( |
999 | 40 | }) | 41 | root, Qt.resolvedUrl("AppAccessControl.qml"), { |
1000 | 41 | return; | 42 | "title": i18n.tr(item.name), |
1001 | 43 | "caption": i18n.tr(item.caption), | ||
1002 | 44 | "model": model, | ||
1003 | 45 | }); | ||
1004 | 46 | return; | ||
1005 | 47 | } | ||
1006 | 42 | } | 48 | } |
1007 | 43 | } | 49 | } |
1008 | 44 | } | 50 | } |
1009 | 45 | 51 | ||
1010 | 46 | Flickable { | 52 | Flickable { |
1011 | 53 | id: scrollWidget | ||
1012 | 47 | anchors.fill: parent | 54 | anchors.fill: parent |
1013 | 48 | contentHeight: contentItem.childrenRect.height | 55 | contentHeight: contentItem.childrenRect.height |
1014 | 49 | boundsBehavior: (contentHeight > root.height) ? | 56 | boundsBehavior: (contentHeight > root.height) ? |
1015 | @@ -99,7 +106,7 @@ | |||
1016 | 99 | value: trustStoreModel.count > 0 ? | 106 | value: trustStoreModel.count > 0 ? |
1017 | 100 | i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) : | 107 | i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) : |
1018 | 101 | i18n.tr("0") | 108 | i18n.tr("0") |
1020 | 102 | onClicked: pageStack.push(Qt.resolvedUrl("AppAccessControl.qml"), { | 109 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccessControl.qml"), { |
1021 | 103 | "title": i18n.tr(model.name), | 110 | "title": i18n.tr(model.name), |
1022 | 104 | "caption": i18n.tr(model.caption), | 111 | "caption": i18n.tr(model.caption), |
1023 | 105 | "model": trustStoreModel, | 112 | "model": trustStoreModel, |
1024 | @@ -125,7 +132,7 @@ | |||
1025 | 125 | if (oaPlugin) { | 132 | if (oaPlugin) { |
1026 | 126 | var accountsPage = oaPlugin.pageComponent | 133 | var accountsPage = oaPlugin.pageComponent |
1027 | 127 | if (accountsPage) | 134 | if (accountsPage) |
1029 | 128 | pageStack.push(accountsPage, {plugin: oaPlugin, pluginManager: pluginManager}) | 135 | pageStack.addPageToNextColumn(root, accountsPage, {plugin: oaPlugin, pluginManager: pluginManager}) |
1030 | 129 | else | 136 | else |
1031 | 130 | console.warn("online-accounts") | 137 | console.warn("online-accounts") |
1032 | 131 | } else { | 138 | } else { |
1033 | 132 | 139 | ||
1034 | === modified file 'plugins/security-privacy/AppAccessControl.qml' | |||
1035 | --- plugins/security-privacy/AppAccessControl.qml 2016-07-14 13:51:56 +0000 | |||
1036 | +++ plugins/security-privacy/AppAccessControl.qml 2017-01-12 12:47:26 +0000 | |||
1037 | @@ -25,11 +25,13 @@ | |||
1038 | 25 | 25 | ||
1039 | 26 | ItemPage { | 26 | ItemPage { |
1040 | 27 | id: root | 27 | id: root |
1041 | 28 | flickable: scrollWidget | ||
1042 | 28 | 29 | ||
1043 | 29 | property alias model: repeater.model | 30 | property alias model: repeater.model |
1044 | 30 | property alias caption: captionLabel.text | 31 | property alias caption: captionLabel.text |
1045 | 31 | 32 | ||
1046 | 32 | Flickable { | 33 | Flickable { |
1047 | 34 | id: scrollWidget | ||
1048 | 33 | anchors.fill: parent | 35 | anchors.fill: parent |
1049 | 34 | contentHeight: contentItem.childrenRect.height | 36 | contentHeight: contentItem.childrenRect.height |
1050 | 35 | boundsBehavior: (contentHeight > root.height) ? | 37 | boundsBehavior: (contentHeight > root.height) ? |
1051 | 36 | 38 | ||
1052 | === modified file 'plugins/security-privacy/Location.qml' | |||
1053 | --- plugins/security-privacy/Location.qml 2016-07-14 13:51:56 +0000 | |||
1054 | +++ plugins/security-privacy/Location.qml 2017-01-12 12:47:26 +0000 | |||
1055 | @@ -153,7 +153,7 @@ | |||
1056 | 153 | verticalAlignment: Text.AlignVCenter | 153 | verticalAlignment: Text.AlignVCenter |
1057 | 154 | height: contentHeight + units.gu(4) | 154 | height: contentHeight + units.gu(4) |
1058 | 155 | onLinkActivated: { | 155 | onLinkActivated: { |
1060 | 156 | pageStack.push(Qt.resolvedUrl(link)) | 156 | pageStack.addPageToNextColumn(locationPage, Qt.resolvedUrl(link)) |
1061 | 157 | } | 157 | } |
1062 | 158 | onLineLaidOut: { | 158 | onLineLaidOut: { |
1063 | 159 | dlgt.height = label.height | 159 | dlgt.height = label.height |
1064 | 160 | 160 | ||
1065 | === modified file 'plugins/security-privacy/PageComponent.qml' | |||
1066 | --- plugins/security-privacy/PageComponent.qml 2016-11-21 14:47:12 +0000 | |||
1067 | +++ plugins/security-privacy/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1068 | @@ -56,40 +56,28 @@ | |||
1069 | 56 | }); | 56 | }); |
1070 | 57 | return t; | 57 | return t; |
1071 | 58 | } | 58 | } |
1072 | 59 | property var pluginOptions | ||
1073 | 60 | Connections { | ||
1074 | 61 | target: pageStack | ||
1075 | 62 | onCurrentPageChanged: { | ||
1076 | 63 | // If we are called with subpage=foo, push foo on the stack. | ||
1077 | 64 | // | ||
1078 | 65 | // We need to wait until the PageComponent has been pushed to the stack | ||
1079 | 66 | // before pushing the subpages, otherwise they will be pushed below the | ||
1080 | 67 | // PageComponent. | ||
1081 | 68 | if (pageStack.currentPage === root) { | ||
1082 | 69 | if (pluginOptions && pluginOptions['subpage']) { | ||
1083 | 70 | switch (pluginOptions['subpage']) { | ||
1084 | 71 | case 'location': | ||
1085 | 72 | pageStack.push(Qt.resolvedUrl("Location.qml")); | ||
1086 | 73 | break; | ||
1087 | 74 | case 'permissions': | ||
1088 | 75 | var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) | ||
1089 | 76 | if (pluginOptions['service']) { | ||
1090 | 77 | page.openService(pluginOptions['service']) | ||
1091 | 78 | } | ||
1092 | 79 | break; | ||
1093 | 80 | } | ||
1094 | 81 | } else if (pluginOptions && pluginOptions['service']) { | ||
1095 | 82 | // This whole else if branch will be removed once the | ||
1096 | 83 | // camera app asks for [1] as described in lp:1545733. | ||
1097 | 84 | // [1] settings:///system/permissions?service=camera | ||
1098 | 85 | var page = pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) | ||
1099 | 86 | page.openService(pluginOptions['service']) | ||
1100 | 87 | } | ||
1101 | 88 | 59 | ||
1105 | 89 | // Once done, disable this Connections, so that if the user navigates | 60 | onPushedOntoStack: { |
1106 | 90 | // back to the root we won't push the subpages again | 61 | var page; |
1107 | 91 | target = null | 62 | var opts = { |
1108 | 63 | pluginManager: pluginManager, pluginOptions: pluginOptions,}; | ||
1109 | 64 | if (pluginOptions && pluginOptions['subpage']) { | ||
1110 | 65 | switch (pluginOptions['subpage']) { | ||
1111 | 66 | case 'location': | ||
1112 | 67 | page = Qt.resolvedUrl("Location.qml"); | ||
1113 | 68 | break; | ||
1114 | 69 | case 'permissions': | ||
1115 | 70 | page = Qt.resolvedUrl("AppAccess.qml") | ||
1116 | 71 | break; | ||
1117 | 92 | } | 72 | } |
1118 | 73 | } else if (pluginOptions && pluginOptions['service']) { | ||
1119 | 74 | // This whole else if branch will be removed once the | ||
1120 | 75 | // camera app asks for [1] as described in lp:1545733. | ||
1121 | 76 | // [1] settings:///system/permissions?service=camera | ||
1122 | 77 | page = Qt.resolvedUrl("AppAccess.qml"); | ||
1123 | 78 | } | ||
1124 | 79 | if (page) { | ||
1125 | 80 | pageStack.addPageToNextColumn(root, page, opts); | ||
1126 | 93 | } | 81 | } |
1127 | 94 | } | 82 | } |
1128 | 95 | 83 | ||
1129 | @@ -158,18 +146,18 @@ | |||
1130 | 158 | id: fingerprintControl | 146 | id: fingerprintControl |
1131 | 159 | objectName: "fingerprintControl" | 147 | objectName: "fingerprintControl" |
1132 | 160 | text: i18n.tr("Fingerprint ID") | 148 | text: i18n.tr("Fingerprint ID") |
1134 | 161 | onClicked: pageStack.push(fingeprintPage, { | 149 | onClicked: pageStack.addPageToNextColumn(root, fingeprintPage, { |
1135 | 162 | passcodeSet: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe | 150 | passcodeSet: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe |
1136 | 163 | }) | 151 | }) |
1138 | 164 | visible: Biometryd.available | 152 | visible: Biometryd.available || showAllUI |
1139 | 165 | } | 153 | } |
1140 | 166 | 154 | ||
1141 | 167 | Component { | 155 | Component { |
1142 | 168 | id: fingeprintPage | 156 | id: fingeprintPage |
1143 | 169 | Fingerprints { | 157 | Fingerprints { |
1144 | 170 | onRequestPasscode: { | 158 | onRequestPasscode: { |
1147 | 171 | pageStack.pop(); | 159 | pageStack.removePages(root); |
1148 | 172 | pageStack.push(Qt.resolvedUrl("LockSecurity.qml")); | 160 | pageStack.addPageToNextColumn(root, Qt.resolvedUrl("LockSecurity.qml")); |
1149 | 173 | } | 161 | } |
1150 | 174 | } | 162 | } |
1151 | 175 | } | 163 | } |
1152 | @@ -178,7 +166,7 @@ | |||
1153 | 178 | id: lockingControl | 166 | id: lockingControl |
1154 | 179 | objectName: "lockingControl" | 167 | objectName: "lockingControl" |
1155 | 180 | text: i18n.tr("Locking and unlocking") | 168 | text: i18n.tr("Locking and unlocking") |
1157 | 181 | onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), { | 169 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("PhoneLocking.qml"), { |
1158 | 182 | usePowerd: usePowerd, | 170 | usePowerd: usePowerd, |
1159 | 183 | powerSettings: powerSettings | 171 | powerSettings: powerSettings |
1160 | 184 | }) | 172 | }) |
1161 | @@ -198,7 +186,7 @@ | |||
1162 | 198 | return i18n.tr("Off"); | 186 | return i18n.tr("Off"); |
1163 | 199 | } | 187 | } |
1164 | 200 | visible: simsPresent > 0 | 188 | visible: simsPresent > 0 |
1166 | 201 | onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims }) | 189 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("SimPin.qml"), { sims: sims }) |
1167 | 202 | } | 190 | } |
1168 | 203 | 191 | ||
1169 | 204 | SettingsListItems.Standard { | 192 | SettingsListItems.Standard { |
1170 | @@ -257,7 +245,7 @@ | |||
1171 | 257 | objectName: "locationItem" | 245 | objectName: "locationItem" |
1172 | 258 | text: i18n.tr("Location") | 246 | text: i18n.tr("Location") |
1173 | 259 | value: "" | 247 | value: "" |
1175 | 260 | onClicked: pageStack.push(Qt.resolvedUrl("Location.qml")) | 248 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("Location.qml")) |
1176 | 261 | visible: true | 249 | visible: true |
1177 | 262 | enabled: true | 250 | enabled: true |
1178 | 263 | property variant locationEnabled | 251 | property variant locationEnabled |
1179 | @@ -275,7 +263,7 @@ | |||
1180 | 275 | 263 | ||
1181 | 276 | SettingsListItems.SingleValueProgression { | 264 | SettingsListItems.SingleValueProgression { |
1182 | 277 | text: i18n.tr("App permissions") | 265 | text: i18n.tr("App permissions") |
1184 | 278 | onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) | 266 | onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) |
1185 | 279 | } | 267 | } |
1186 | 280 | 268 | ||
1187 | 281 | SettingsListItems.SingleValueProgression { | 269 | SettingsListItems.SingleValueProgression { |
1188 | @@ -289,7 +277,7 @@ | |||
1189 | 289 | i18n.tr("Not sent") | 277 | i18n.tr("Not sent") |
1190 | 290 | onClicked: { | 278 | onClicked: { |
1191 | 291 | var path = "../diagnostics/PageComponent.qml"; | 279 | var path = "../diagnostics/PageComponent.qml"; |
1193 | 292 | pageStack.push(Qt.resolvedUrl(path)); | 280 | pageStack.addPageToNextColumn(root, Qt.resolvedUrl(path)); |
1194 | 293 | } | 281 | } |
1195 | 294 | } | 282 | } |
1196 | 295 | } | 283 | } |
1197 | 296 | 284 | ||
1198 | === modified file 'plugins/security-privacy/PhoneLocking.qml' | |||
1199 | --- plugins/security-privacy/PhoneLocking.qml 2016-07-14 13:51:56 +0000 | |||
1200 | +++ plugins/security-privacy/PhoneLocking.qml 2017-01-12 12:47:26 +0000 | |||
1201 | @@ -30,6 +30,7 @@ | |||
1202 | 30 | id: root | 30 | id: root |
1203 | 31 | objectName: "phoneLockingPage" | 31 | objectName: "phoneLockingPage" |
1204 | 32 | title: i18n.tr("Locking and unlocking") | 32 | title: i18n.tr("Locking and unlocking") |
1205 | 33 | flickable: scrollWidget | ||
1206 | 33 | 34 | ||
1207 | 34 | property bool usePowerd | 35 | property bool usePowerd |
1208 | 35 | property var powerSettings | 36 | property var powerSettings |
1209 | @@ -39,6 +40,7 @@ | |||
1210 | 39 | } | 40 | } |
1211 | 40 | 41 | ||
1212 | 41 | Flickable { | 42 | Flickable { |
1213 | 43 | id: scrollWidget | ||
1214 | 42 | anchors.fill: parent | 44 | anchors.fill: parent |
1215 | 43 | contentHeight: contentItem.childrenRect.height | 45 | contentHeight: contentItem.childrenRect.height |
1216 | 44 | boundsBehavior: (contentHeight > root.height) ? | 46 | boundsBehavior: (contentHeight > root.height) ? |
1217 | @@ -75,7 +77,8 @@ | |||
1218 | 75 | return fingerprint | 77 | return fingerprint |
1219 | 76 | } | 78 | } |
1220 | 77 | } | 79 | } |
1222 | 78 | onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml")) | 80 | onClicked: pageStack.addPageToNextColumn( |
1223 | 81 | root, Qt.resolvedUrl("LockSecurity.qml")) | ||
1224 | 79 | } | 82 | } |
1225 | 80 | 83 | ||
1226 | 81 | SettingsListItems.SingleValueProgression { | 84 | SettingsListItems.SingleValueProgression { |
1227 | @@ -110,7 +113,7 @@ | |||
1228 | 110 | } | 113 | } |
1229 | 111 | } | 114 | } |
1230 | 112 | onClicked: | 115 | onClicked: |
1232 | 113 | pageStack.push( | 116 | pageStack.addPageToNextColumn(root, |
1233 | 114 | Qt.resolvedUrl("../battery/SleepValues.qml"), | 117 | Qt.resolvedUrl("../battery/SleepValues.qml"), |
1234 | 115 | { title: text, lockOnSuspend: lockOnSuspend } ) | 118 | { title: text, lockOnSuspend: lockOnSuspend } ) |
1235 | 116 | } | 119 | } |
1236 | 117 | 120 | ||
1237 | === modified file 'plugins/security-privacy/SimPin.qml' | |||
1238 | --- plugins/security-privacy/SimPin.qml 2016-07-14 13:51:56 +0000 | |||
1239 | +++ plugins/security-privacy/SimPin.qml 2017-01-12 12:47:26 +0000 | |||
1240 | @@ -35,6 +35,7 @@ | |||
1241 | 35 | id: root | 35 | id: root |
1242 | 36 | objectName: "simPinPage" | 36 | objectName: "simPinPage" |
1243 | 37 | title: i18n.tr("SIM PIN") | 37 | title: i18n.tr("SIM PIN") |
1244 | 38 | flickable: scrollWidget | ||
1245 | 38 | 39 | ||
1246 | 39 | property var sims | 40 | property var sims |
1247 | 40 | property var curSim | 41 | property var curSim |
1248 | @@ -345,6 +346,7 @@ | |||
1249 | 345 | } | 346 | } |
1250 | 346 | 347 | ||
1251 | 347 | Flickable { | 348 | Flickable { |
1252 | 349 | id: scrollWidget | ||
1253 | 348 | anchors.fill: parent | 350 | anchors.fill: parent |
1254 | 349 | contentHeight: contentItem.childrenRect.height | 351 | contentHeight: contentItem.childrenRect.height |
1255 | 350 | boundsBehavior: (contentHeight > root.height) ? | 352 | boundsBehavior: (contentHeight > root.height) ? |
1256 | 351 | 353 | ||
1257 | === modified file 'plugins/security-privacy/here-terms.qml' | |||
1258 | --- plugins/security-privacy/here-terms.qml 2015-08-10 13:31:45 +0000 | |||
1259 | +++ plugins/security-privacy/here-terms.qml 2017-01-12 12:47:26 +0000 | |||
1260 | @@ -22,6 +22,7 @@ | |||
1261 | 22 | 22 | ||
1262 | 23 | ItemPage { | 23 | ItemPage { |
1263 | 24 | title: i18n.tr("Nokia HERE") | 24 | title: i18n.tr("Nokia HERE") |
1264 | 25 | flickable: scrollWidget | ||
1265 | 25 | id: termsPage | 26 | id: termsPage |
1266 | 26 | 27 | ||
1267 | 27 | UbuntuSecurityPrivacyPanel { | 28 | UbuntuSecurityPrivacyPanel { |
1268 | 28 | 29 | ||
1269 | === modified file 'plugins/sound/PageComponent.qml' | |||
1270 | --- plugins/sound/PageComponent.qml 2016-11-21 15:23:50 +0000 | |||
1271 | +++ plugins/sound/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1272 | @@ -149,7 +149,7 @@ | |||
1273 | 149 | text: i18n.tr("Ringtone") | 149 | text: i18n.tr("Ringtone") |
1274 | 150 | value: Utilities.buildDisplayName(backendInfo.incomingCallSound) | 150 | value: Utilities.buildDisplayName(backendInfo.incomingCallSound) |
1275 | 151 | 151 | ||
1277 | 152 | onClicked: pageStack.push( | 152 | onClicked: pageStack.addPageToNextColumn(root, |
1278 | 153 | Qt.resolvedUrl("SoundsList.qml"), { | 153 | Qt.resolvedUrl("SoundsList.qml"), { |
1279 | 154 | title: i18n.tr("Ringtone"), | 154 | title: i18n.tr("Ringtone"), |
1280 | 155 | showStopButton: true, | 155 | showStopButton: true, |
1281 | @@ -209,12 +209,13 @@ | |||
1282 | 209 | text: i18n.tr("Message received") | 209 | text: i18n.tr("Message received") |
1283 | 210 | value:Utilities.buildDisplayName( | 210 | value:Utilities.buildDisplayName( |
1284 | 211 | backendInfo.incomingMessageSound) | 211 | backendInfo.incomingMessageSound) |
1291 | 212 | onClicked: pageStack.push( | 212 | onClicked: pageStack.addPageToNextColumn(root, |
1292 | 213 | Qt.resolvedUrl("SoundsList.qml"), | 213 | Qt.resolvedUrl("SoundsList.qml"), { |
1293 | 214 | { title: i18n.tr("Message received"), | 214 | title: i18n.tr("Message received"), |
1294 | 215 | soundType: 1, | 215 | soundType: 1, |
1295 | 216 | soundsDir: | 216 | soundsDir: "sounds/ubuntu/notifications/" |
1296 | 217 | "sounds/ubuntu/notifications/" }) | 217 | } |
1297 | 218 | ) | ||
1298 | 218 | } | 219 | } |
1299 | 219 | 220 | ||
1300 | 220 | SettingsListItems.Standard { | 221 | SettingsListItems.Standard { |
1301 | 221 | 222 | ||
1302 | === modified file 'plugins/sound/SoundsList.qml' | |||
1303 | --- plugins/sound/SoundsList.qml 2016-09-19 14:53:19 +0000 | |||
1304 | +++ plugins/sound/SoundsList.qml 2017-01-12 12:47:26 +0000 | |||
1305 | @@ -128,9 +128,7 @@ | |||
1306 | 128 | text: i18n.tr("Custom Ringtone") | 128 | text: i18n.tr("Custom Ringtone") |
1307 | 129 | visible: soundType === 0 | 129 | visible: soundType === 0 |
1308 | 130 | progression: true | 130 | progression: true |
1312 | 131 | onClicked: { | 131 | onClicked: pageStack.addPageToNextColumn(soundsPage, picker) |
1310 | 132 | pageStack.push(picker); | ||
1311 | 133 | } | ||
1313 | 134 | } | 132 | } |
1314 | 135 | } | 133 | } |
1315 | 136 | } | 134 | } |
1316 | @@ -215,7 +213,7 @@ | |||
1317 | 215 | showTitle: false | 213 | showTitle: false |
1318 | 216 | 214 | ||
1319 | 217 | onPeerSelected: { | 215 | onPeerSelected: { |
1321 | 218 | pageStack.pop(); | 216 | pageStack.removePages(soundsPage); |
1322 | 219 | // requests an active transfer from peer | 217 | // requests an active transfer from peer |
1323 | 220 | function startContentTransfer(callback) { | 218 | function startContentTransfer(callback) { |
1324 | 221 | if (callback) | 219 | if (callback) |
1325 | @@ -231,7 +229,7 @@ | |||
1326 | 231 | }); | 229 | }); |
1327 | 232 | } | 230 | } |
1328 | 233 | 231 | ||
1330 | 234 | onCancelPressed: pageStack.pop(); | 232 | onCancelPressed: pageStack.removePages(soundsPage); |
1331 | 235 | } | 233 | } |
1332 | 236 | } | 234 | } |
1333 | 237 | 235 | ||
1334 | 238 | 236 | ||
1335 | === modified file 'plugins/system-update/PageComponent.qml' | |||
1336 | --- plugins/system-update/PageComponent.qml 2016-08-23 11:48:49 +0000 | |||
1337 | +++ plugins/system-update/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1338 | @@ -421,7 +421,8 @@ | |||
1339 | 421 | return i18n.tr("Unknown") | 421 | return i18n.tr("Unknown") |
1340 | 422 | } | 422 | } |
1341 | 423 | progression: true | 423 | progression: true |
1343 | 424 | onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml")) | 424 | onClicked: pageStack.addPageToNextColumn( |
1344 | 425 | root, Qt.resolvedUrl("Configuration.qml")) | ||
1345 | 425 | } | 426 | } |
1346 | 426 | } | 427 | } |
1347 | 427 | 428 | ||
1348 | 428 | 429 | ||
1349 | === modified file 'plugins/time-date/ChooseTimeZone.qml' | |||
1350 | --- plugins/time-date/ChooseTimeZone.qml 2016-07-14 13:51:56 +0000 | |||
1351 | +++ plugins/time-date/ChooseTimeZone.qml 2017-01-12 12:47:26 +0000 | |||
1352 | @@ -27,7 +27,7 @@ | |||
1353 | 27 | 27 | ||
1354 | 28 | ItemPage { | 28 | ItemPage { |
1355 | 29 | title: i18n.tr("Time zone") | 29 | title: i18n.tr("Time zone") |
1357 | 30 | 30 | flickable: locationsListView | |
1358 | 31 | property UbuntuTimeDatePanel timeDatePanel | 31 | property UbuntuTimeDatePanel timeDatePanel |
1359 | 32 | 32 | ||
1360 | 33 | Timer { | 33 | Timer { |
1361 | 34 | 34 | ||
1362 | === modified file 'plugins/time-date/PageComponent.qml' | |||
1363 | --- plugins/time-date/PageComponent.qml 2016-07-14 13:51:56 +0000 | |||
1364 | +++ plugins/time-date/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1365 | @@ -68,9 +68,11 @@ | |||
1366 | 68 | id: timeZone | 68 | id: timeZone |
1367 | 69 | text: timeDatePanel.timeZoneName | 69 | text: timeDatePanel.timeZoneName |
1368 | 70 | value: getUTCOffset() | 70 | value: getUTCOffset() |
1372 | 71 | onClicked: pageStack.push(Qt.resolvedUrl("ChooseTimeZone.qml"), { | 71 | onClicked: pageStack.addPageToNextColumn(root, |
1373 | 72 | timeDatePanel: timeDatePanel | 72 | Qt.resolvedUrl("ChooseTimeZone.qml"), { |
1374 | 73 | }) | 73 | timeDatePanel: timeDatePanel |
1375 | 74 | } | ||
1376 | 75 | ) | ||
1377 | 74 | } | 76 | } |
1378 | 75 | 77 | ||
1379 | 76 | SettingsItemTitle { | 78 | SettingsItemTitle { |
1380 | 77 | 79 | ||
1381 | === modified file 'plugins/vpn/PageComponent.qml' | |||
1382 | --- plugins/vpn/PageComponent.qml 2016-03-14 12:15:41 +0000 | |||
1383 | +++ plugins/vpn/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1384 | @@ -35,7 +35,7 @@ | |||
1385 | 35 | property var diag | 35 | property var diag |
1386 | 36 | 36 | ||
1387 | 37 | function openConnection(connection, isNew) { | 37 | function openConnection(connection, isNew) { |
1389 | 38 | pageStack.push(vpnEditorDialog, { | 38 | pageStack.addPageToNextColumn(root, vpnEditorDialog, { |
1390 | 39 | "connection": connection, | 39 | "connection": connection, |
1391 | 40 | "isNew": isNew | 40 | "isNew": isNew |
1392 | 41 | }); | 41 | }); |
1393 | @@ -89,12 +89,14 @@ | |||
1394 | 89 | Component { | 89 | Component { |
1395 | 90 | id: vpnEditorDialog | 90 | id: vpnEditorDialog |
1396 | 91 | VpnEditor { | 91 | VpnEditor { |
1397 | 92 | id: vpnEditorPage | ||
1398 | 92 | onTypeChanged: { | 93 | onTypeChanged: { |
1399 | 93 | connection.remove(); | 94 | connection.remove(); |
1401 | 94 | pageStack.pop(); | 95 | pageStack.removePages(vpnEditorPage); |
1402 | 95 | Connectivity.vpnConnections.add(type); | 96 | Connectivity.vpnConnections.add(type); |
1403 | 96 | } | 97 | } |
1404 | 97 | onReconnectionPrompt: PopupUtils.open(reconnPrompt) | 98 | onReconnectionPrompt: PopupUtils.open(reconnPrompt) |
1405 | 99 | onDone: pageStack.removePages(vpnEditorPage) | ||
1406 | 98 | } | 100 | } |
1407 | 99 | } | 101 | } |
1408 | 100 | 102 | ||
1409 | 101 | 103 | ||
1410 | === modified file 'plugins/wifi/AccessPoint.qml' | |||
1411 | --- plugins/wifi/AccessPoint.qml 2016-07-14 13:51:56 +0000 | |||
1412 | +++ plugins/wifi/AccessPoint.qml 2017-01-12 12:47:26 +0000 | |||
1413 | @@ -52,18 +52,12 @@ | |||
1414 | 52 | 52 | ||
1415 | 53 | signal activate() | 53 | signal activate() |
1416 | 54 | 54 | ||
1417 | 55 | onCheckedChanged: { | ||
1418 | 56 | // if stack has NetworkDetailsBrief, pop it | ||
1419 | 57 | if (pageStack.depth === 3) { | ||
1420 | 58 | pageStack.pop(); | ||
1421 | 59 | } | ||
1422 | 60 | } | ||
1423 | 61 | |||
1424 | 62 | progressionVisible: checked | 55 | progressionVisible: checked |
1425 | 63 | onClicked: { | 56 | onClicked: { |
1426 | 64 | if (checked) { | 57 | if (checked) { |
1429 | 65 | pageStack.push(Qt.resolvedUrl("NetworkDetailsBrief.qml"), | 58 | pageStack.addPageToNextColumn(wifibase, |
1430 | 66 | {networkName : text, accessPoint: accessPoint}) | 59 | Qt.resolvedUrl("NetworkDetailsBrief.qml"), |
1431 | 60 | {networkName : text, accessPoint: accessPoint}) | ||
1432 | 67 | } else { | 61 | } else { |
1433 | 68 | accessPoint.activate(); | 62 | accessPoint.activate(); |
1434 | 69 | } | 63 | } |
1435 | 70 | 64 | ||
1436 | === modified file 'plugins/wifi/PageComponent.qml' | |||
1437 | --- plugins/wifi/PageComponent.qml 2016-09-27 13:41:19 +0000 | |||
1438 | +++ plugins/wifi/PageComponent.qml 2017-01-12 12:47:26 +0000 | |||
1439 | @@ -26,9 +26,10 @@ | |||
1440 | 26 | id: wifibase | 26 | id: wifibase |
1441 | 27 | objectName: "wifiPage" | 27 | objectName: "wifiPage" |
1442 | 28 | title: i18n.tr("Wi-Fi") | 28 | title: i18n.tr("Wi-Fi") |
1443 | 29 | flickable: pageFlickable | ||
1444 | 30 | |||
1445 | 29 | property bool wifiEnabled: actionGroup.actionObject.valid ? | 31 | property bool wifiEnabled: actionGroup.actionObject.valid ? |
1446 | 30 | actionGroup.actionObject.state : false | 32 | actionGroup.actionObject.state : false |
1447 | 31 | property var pluginOptions | ||
1448 | 32 | 33 | ||
1449 | 33 | UnityMenuModel { | 34 | UnityMenuModel { |
1450 | 34 | id: menuModel | 35 | id: menuModel |
1451 | @@ -136,7 +137,8 @@ | |||
1452 | 136 | SettingsListItems.StandardProgression { | 137 | SettingsListItems.StandardProgression { |
1453 | 137 | objectName: "previousNetwork" | 138 | objectName: "previousNetwork" |
1454 | 138 | text: i18n.tr("Previous networks") | 139 | text: i18n.tr("Previous networks") |
1456 | 139 | onClicked: pageStack.push(Qt.resolvedUrl("PreviousNetworks.qml")) | 140 | onClicked: pageStack.addPageToNextColumn(wifibase, |
1457 | 141 | Qt.resolvedUrl("PreviousNetworks.qml")) | ||
1458 | 140 | } | 142 | } |
1459 | 141 | 143 | ||
1460 | 142 | Loader { | 144 | Loader { |
1461 | 143 | 145 | ||
1462 | === modified file 'plugins/wifi/PreviousNetworks.qml' | |||
1463 | --- plugins/wifi/PreviousNetworks.qml 2016-07-14 13:51:56 +0000 | |||
1464 | +++ plugins/wifi/PreviousNetworks.qml 2017-01-12 12:47:26 +0000 | |||
1465 | @@ -25,6 +25,7 @@ | |||
1466 | 25 | id: previousNetworks | 25 | id: previousNetworks |
1467 | 26 | objectName: "previousNetworksPage" | 26 | objectName: "previousNetworksPage" |
1468 | 27 | title: i18n.tr("Previous networks") | 27 | title: i18n.tr("Previous networks") |
1469 | 28 | flickable: networkList | ||
1470 | 28 | 29 | ||
1471 | 29 | PreviousNetworkModel { | 30 | PreviousNetworkModel { |
1472 | 30 | id: pnmodel | 31 | id: pnmodel |
1473 | @@ -56,11 +57,12 @@ | |||
1474 | 56 | } | 57 | } |
1475 | 57 | delegate: SettingsListItems.StandardProgression { | 58 | delegate: SettingsListItems.StandardProgression { |
1476 | 58 | text: name | 59 | text: name |
1482 | 59 | onClicked: { | 60 | onClicked: pageStack.addPageToNextColumn(previousNetworks, |
1483 | 60 | pageStack.push(Qt.resolvedUrl("NetworkDetails.qml"), | 61 | Qt.resolvedUrl("NetworkDetails.qml"), { |
1484 | 61 | {networkName : name, password : password, lastUsed : lastUsed, | 62 | networkName : name, password : password, |
1485 | 62 | dbusPath : objectPath}); | 63 | lastUsed : lastUsed, dbusPath : objectPath |
1486 | 63 | } | 64 | } |
1487 | 65 | ) | ||
1488 | 64 | } | 66 | } |
1489 | 65 | } | 67 | } |
1490 | 66 | } | 68 | } |
1491 | 67 | 69 | ||
1492 | === modified file 'src/SystemSettings/CMakeLists.txt' | |||
1493 | --- src/SystemSettings/CMakeLists.txt 2015-11-18 15:59:45 +0000 | |||
1494 | +++ src/SystemSettings/CMakeLists.txt 2017-01-12 12:47:26 +0000 | |||
1495 | @@ -1,6 +1,7 @@ | |||
1496 | 1 | set(QML_SOURCES | 1 | set(QML_SOURCES |
1497 | 2 | ItemPage.qml | 2 | ItemPage.qml |
1498 | 3 | SettingsItemTitle.qml | 3 | SettingsItemTitle.qml |
1499 | 4 | USSAdaptivePageLayout.qml | ||
1500 | 4 | ) | 5 | ) |
1501 | 5 | 6 | ||
1502 | 6 | set(PLUG_DIR ${PLUGIN_QML_DIR}/SystemSettings) | 7 | set(PLUG_DIR ${PLUGIN_QML_DIR}/SystemSettings) |
1503 | 7 | 8 | ||
1504 | === modified file 'src/SystemSettings/ItemPage.qml' | |||
1505 | --- src/SystemSettings/ItemPage.qml 2015-08-10 13:31:45 +0000 | |||
1506 | +++ src/SystemSettings/ItemPage.qml 2017-01-12 12:47:26 +0000 | |||
1507 | @@ -24,8 +24,27 @@ | |||
1508 | 24 | Page { | 24 | Page { |
1509 | 25 | id: root | 25 | id: root |
1510 | 26 | 26 | ||
1511 | 27 | property alias title: pageHeader.title | ||
1512 | 28 | property alias flickable: pageHeader.flickable | ||
1513 | 29 | |||
1514 | 30 | header: PageHeader { | ||
1515 | 31 | id: pageHeader | ||
1516 | 32 | title: i18n.dtr(plugin.translations, plugin.displayName) | ||
1517 | 33 | } | ||
1518 | 34 | |||
1519 | 27 | property variant plugin | 35 | property variant plugin |
1520 | 28 | property variant pluginManager | 36 | property variant pluginManager |
1523 | 29 | 37 | property variant pluginOptions | |
1524 | 30 | title: i18n.dtr(plugin.translations, plugin.displayName) | 38 | |
1525 | 39 | signal pushedOntoStack() | ||
1526 | 40 | |||
1527 | 41 | Connections { | ||
1528 | 42 | target: root | ||
1529 | 43 | onVisibleChanged: { | ||
1530 | 44 | if (visible) { | ||
1531 | 45 | pushedOntoStack(); | ||
1532 | 46 | target = null; | ||
1533 | 47 | } | ||
1534 | 48 | } | ||
1535 | 49 | } | ||
1536 | 31 | } | 50 | } |
1537 | 32 | 51 | ||
1538 | === added file 'src/SystemSettings/USSAdaptivePageLayout.qml' | |||
1539 | --- src/SystemSettings/USSAdaptivePageLayout.qml 1970-01-01 00:00:00 +0000 | |||
1540 | +++ src/SystemSettings/USSAdaptivePageLayout.qml 2017-01-12 12:47:26 +0000 | |||
1541 | @@ -0,0 +1,40 @@ | |||
1542 | 1 | /* | ||
1543 | 2 | * This file is part of system-settings | ||
1544 | 3 | * | ||
1545 | 4 | * Copyright (C) 2017 Canonical Ltd. | ||
1546 | 5 | * | ||
1547 | 6 | * This program is free software: you can redistribute it and/or modify it | ||
1548 | 7 | * under the terms of the GNU General Public License version 3, as published | ||
1549 | 8 | * by the Free Software Foundation. | ||
1550 | 9 | * | ||
1551 | 10 | * This program is distributed in the hope that it will be useful, but | ||
1552 | 11 | * WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1553 | 12 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1554 | 13 | * PURPOSE. See the GNU General Public License for more details. | ||
1555 | 14 | * | ||
1556 | 15 | * You should have received a copy of the GNU General Public License along | ||
1557 | 16 | * with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1558 | 17 | */ | ||
1559 | 18 | |||
1560 | 19 | import QtQuick 2.0 | ||
1561 | 20 | import Ubuntu.Components 1.3 | ||
1562 | 21 | |||
1563 | 22 | AdaptivePageLayout { | ||
1564 | 23 | id: layout | ||
1565 | 24 | |||
1566 | 25 | function addFileToNextColumnSync(parentObject, resolvedUrl, properties) { | ||
1567 | 26 | return addComponentToNextColumnSync(parentObject, | ||
1568 | 27 | Qt.createComponent(resolvedUrl), | ||
1569 | 28 | properties); | ||
1570 | 29 | } | ||
1571 | 30 | |||
1572 | 31 | function addComponentToNextColumnSync(parentObject, component, properties) { | ||
1573 | 32 | if (typeof(properties) === 'undefined') { | ||
1574 | 33 | properties = {} | ||
1575 | 34 | } | ||
1576 | 35 | |||
1577 | 36 | var incubator = layout.addPageToNextColumn(parentObject, component, properties) | ||
1578 | 37 | incubator.forceCompletion() | ||
1579 | 38 | return incubator.object | ||
1580 | 39 | } | ||
1581 | 40 | } | ||
1582 | 0 | 41 | ||
1583 | === modified file 'src/SystemSettings/qmldir' | |||
1584 | --- src/SystemSettings/qmldir 2015-11-18 14:11:45 +0000 | |||
1585 | +++ src/SystemSettings/qmldir 2017-01-12 12:47:26 +0000 | |||
1586 | @@ -2,3 +2,4 @@ | |||
1587 | 2 | 2 | ||
1588 | 3 | ItemPage 1.0 ItemPage.qml | 3 | ItemPage 1.0 ItemPage.qml |
1589 | 4 | SettingsItemTitle 1.0 SettingsItemTitle.qml | 4 | SettingsItemTitle 1.0 SettingsItemTitle.qml |
1590 | 5 | USSAdaptivePageLayout 1.0 USSAdaptivePageLayout.qml | ||
1591 | 5 | 6 | ||
1592 | === modified file 'src/qml/CategorySection.qml' | |||
1593 | --- src/qml/CategorySection.qml 2016-07-14 13:51:56 +0000 | |||
1594 | +++ src/qml/CategorySection.qml 2017-01-12 12:47:26 +0000 | |||
1595 | @@ -68,11 +68,23 @@ | |||
1596 | 68 | onClicked: { | 68 | onClicked: { |
1597 | 69 | var pageComponent = model.item.pageComponent | 69 | var pageComponent = model.item.pageComponent |
1598 | 70 | if (pageComponent) { | 70 | if (pageComponent) { |
1601 | 71 | pageStack.push(model.item.pageComponent, | 71 | Haptics.play(); |
1602 | 72 | { plugin: model.item, pluginManager: pluginManager }) | 72 | loadPluginByName(model.item.baseName); |
1603 | 73 | } | 73 | } |
1604 | 74 | } | 74 | } |
1605 | 75 | } | 75 | } |
1606 | 76 | Binding { | ||
1607 | 77 | target: loader.item | ||
1608 | 78 | property: "color" | ||
1609 | 79 | value: theme.palette.highlighted.background | ||
1610 | 80 | when: currentPlugin == model.item.baseName && apl.columns > 1 | ||
1611 | 81 | } | ||
1612 | 82 | Binding { | ||
1613 | 83 | target: loader.item | ||
1614 | 84 | property: "color" | ||
1615 | 85 | value: "transparent" | ||
1616 | 86 | when: currentPlugin != model.item.baseName || apl.columns == 1 | ||
1617 | 87 | } | ||
1618 | 76 | } | 88 | } |
1619 | 77 | } | 89 | } |
1620 | 78 | } | 90 | } |
1621 | 79 | 91 | ||
1622 | === modified file 'src/qml/MainWindow.qml' | |||
1623 | --- src/qml/MainWindow.qml 2016-12-01 13:50:03 +0000 | |||
1624 | +++ src/qml/MainWindow.qml 2017-01-12 12:47:26 +0000 | |||
1625 | @@ -25,13 +25,18 @@ | |||
1626 | 25 | 25 | ||
1627 | 26 | MainView { | 26 | MainView { |
1628 | 27 | id: main | 27 | id: main |
1630 | 28 | implicitWidth: units.gu(50) | 28 | implicitWidth: units.gu(140) |
1631 | 29 | implicitHeight: units.gu(90) | 29 | implicitHeight: units.gu(90) |
1632 | 30 | applicationName: "ubuntu-system-settings" | 30 | applicationName: "ubuntu-system-settings" |
1633 | 31 | objectName: "systemSettingsMainView" | 31 | objectName: "systemSettingsMainView" |
1634 | 32 | automaticOrientation: true | 32 | automaticOrientation: true |
1635 | 33 | anchorToKeyboard: true | 33 | anchorToKeyboard: true |
1636 | 34 | property var pluginManager: PluginManager {} | 34 | property var pluginManager: PluginManager {} |
1637 | 35 | property string currentPlugin: "" | ||
1638 | 36 | |||
1639 | 37 | /* Workaround for lp:1648801, i.e. APL does not support a placeholder, | ||
1640 | 38 | so we implement it here. */ | ||
1641 | 39 | property string placeholderPlugin: "about" | ||
1642 | 35 | 40 | ||
1643 | 36 | function loadPluginByName(pluginName, pluginOptions) { | 41 | function loadPluginByName(pluginName, pluginOptions) { |
1644 | 37 | var plugin = pluginManager.getByName(pluginName) | 42 | var plugin = pluginManager.getByName(pluginName) |
1645 | @@ -44,10 +49,18 @@ | |||
1646 | 44 | if (plugin) { | 49 | if (plugin) { |
1647 | 45 | // Got a valid plugin name - load it | 50 | // Got a valid plugin name - load it |
1648 | 46 | var pageComponent = plugin.pageComponent | 51 | var pageComponent = plugin.pageComponent |
1649 | 52 | var page; | ||
1650 | 47 | if (pageComponent) { | 53 | if (pageComponent) { |
1654 | 48 | while (pageStack.depth > 1) | 54 | apl.removePages(apl.primaryPage); |
1655 | 49 | pageStack.pop() | 55 | page = apl.addComponentToNextColumnSync( |
1656 | 50 | pageStack.push(pageComponent, opts) | 56 | apl.primaryPage, pageComponent, opts |
1657 | 57 | ); | ||
1658 | 58 | currentPlugin = pluginName; | ||
1659 | 59 | page.Component.destruction.connect(function () { | ||
1660 | 60 | if (currentPlugin == this.baseName) { | ||
1661 | 61 | currentPlugin = ""; | ||
1662 | 62 | } | ||
1663 | 63 | }.bind(plugin)) | ||
1664 | 51 | } | 64 | } |
1665 | 52 | return true | 65 | return true |
1666 | 53 | } else { | 66 | } else { |
1667 | @@ -60,15 +73,31 @@ | |||
1668 | 60 | Component.onCompleted: { | 73 | Component.onCompleted: { |
1669 | 61 | i18n.domain = "ubuntu-system-settings" | 74 | i18n.domain = "ubuntu-system-settings" |
1670 | 62 | i18n.bindtextdomain("ubuntu-system-settings", i18nDirectory) | 75 | i18n.bindtextdomain("ubuntu-system-settings", i18nDirectory) |
1672 | 63 | pageStack.push(mainPage) | 76 | |
1673 | 64 | if (defaultPlugin) { | 77 | if (defaultPlugin) { |
1674 | 65 | if (!loadPluginByName(defaultPlugin, pluginOptions)) | 78 | if (!loadPluginByName(defaultPlugin, pluginOptions)) |
1675 | 66 | Qt.quit() | 79 | Qt.quit() |
1676 | 80 | } else if (apl.columns > 1) { | ||
1677 | 81 | loadPluginByName(placeholderPlugin); | ||
1678 | 82 | aplConnections.target = apl; | ||
1679 | 67 | } | 83 | } |
1680 | 68 | 84 | ||
1681 | 69 | // when running in windowed mode, constrain width | 85 | // when running in windowed mode, constrain width |
1682 | 70 | view.minimumWidth = Qt.binding( function() { return units.gu(40) } ) | 86 | view.minimumWidth = Qt.binding( function() { return units.gu(40) } ) |
1684 | 71 | view.maximumWidth = Qt.binding( function() { return units.gu(50) } ) | 87 | view.maximumWidth = Qt.binding( function() { return units.gu(140) } ) |
1685 | 88 | } | ||
1686 | 89 | |||
1687 | 90 | Connections { | ||
1688 | 91 | id: aplConnections | ||
1689 | 92 | ignoreUnknownSignals: true | ||
1690 | 93 | onColumnsChanged: { | ||
1691 | 94 | var columns = target.columns; | ||
1692 | 95 | if (columns > 1 && !currentPlugin) { | ||
1693 | 96 | loadPluginByName(placeholderPlugin); | ||
1694 | 97 | } else if (columns == 1 && currentPlugin == placeholderPlugin) { | ||
1695 | 98 | apl.removePages(apl.primaryPage); | ||
1696 | 99 | } | ||
1697 | 100 | } | ||
1698 | 72 | } | 101 | } |
1699 | 73 | 102 | ||
1700 | 74 | Connections { | 103 | Connections { |
1701 | @@ -100,12 +129,34 @@ | |||
1702 | 100 | } else { | 129 | } else { |
1703 | 101 | loadPluginByName(panel) | 130 | loadPluginByName(panel) |
1704 | 102 | } | 131 | } |
1705 | 103 | |||
1706 | 104 | } | 132 | } |
1707 | 105 | } | 133 | } |
1708 | 106 | 134 | ||
1711 | 107 | PageStack { | 135 | USSAdaptivePageLayout { |
1712 | 108 | id: pageStack | 136 | id: apl |
1713 | 137 | objectName: "apl" | ||
1714 | 138 | anchors.fill: parent | ||
1715 | 139 | primaryPage: mainPage | ||
1716 | 140 | layouts: [ | ||
1717 | 141 | PageColumnsLayout { | ||
1718 | 142 | when: width >= units.gu(90) | ||
1719 | 143 | PageColumn { | ||
1720 | 144 | minimumWidth: units.gu(40) | ||
1721 | 145 | maximumWidth: units.gu(50) | ||
1722 | 146 | preferredWidth: units.gu(50) | ||
1723 | 147 | } | ||
1724 | 148 | PageColumn { | ||
1725 | 149 | fillWidth: true | ||
1726 | 150 | } | ||
1727 | 151 | }, | ||
1728 | 152 | PageColumnsLayout { | ||
1729 | 153 | when: true | ||
1730 | 154 | PageColumn { | ||
1731 | 155 | fillWidth: true | ||
1732 | 156 | minimumWidth: units.gu(40) | ||
1733 | 157 | } | ||
1734 | 158 | } | ||
1735 | 159 | ] | ||
1736 | 109 | 160 | ||
1737 | 110 | Page { | 161 | Page { |
1738 | 111 | id: mainPage | 162 | id: mainPage |
1739 | @@ -146,8 +197,7 @@ | |||
1740 | 146 | verticalCenter: parent.verticalCenter | 197 | verticalCenter: parent.verticalCenter |
1741 | 147 | } | 198 | } |
1742 | 148 | inputMethodHints: Qt.ImhNoPredictiveText | 199 | inputMethodHints: Qt.ImhNoPredictiveText |
1745 | 149 | onDisplayTextChanged: | 200 | onDisplayTextChanged: pluginManager.filter = displayText |
1744 | 150 | pluginManager.filter = displayText | ||
1746 | 151 | placeholderText: i18n.tr("Search") | 201 | placeholderText: i18n.tr("Search") |
1747 | 152 | hasClearButton: false | 202 | hasClearButton: false |
1748 | 153 | } | 203 | } |
1749 | 154 | 204 | ||
1750 | === modified file 'src/qml/UncategorizedItemsView.qml' | |||
1751 | --- src/qml/UncategorizedItemsView.qml 2016-05-06 01:55:01 +0000 | |||
1752 | +++ src/qml/UncategorizedItemsView.qml 2017-01-12 12:47:26 +0000 | |||
1753 | @@ -33,7 +33,6 @@ | |||
1754 | 33 | 33 | ||
1755 | 34 | Repeater { | 34 | Repeater { |
1756 | 35 | id: repeater | 35 | id: repeater |
1757 | 36 | |||
1758 | 37 | Column { | 36 | Column { |
1759 | 38 | anchors.left: parent.left | 37 | anchors.left: parent.left |
1760 | 39 | anchors.right: parent.right | 38 | anchors.right: parent.right |
1761 | @@ -51,12 +50,22 @@ | |||
1762 | 51 | var pageComponent = model.item.pageComponent | 50 | var pageComponent = model.item.pageComponent |
1763 | 52 | if (pageComponent) { | 51 | if (pageComponent) { |
1764 | 53 | Haptics.play(); | 52 | Haptics.play(); |
1768 | 54 | pageStack.push(model.item.pageComponent, | 53 | loadPluginByName(model.item.baseName); |
1766 | 55 | { plugin: model.item, | ||
1767 | 56 | pluginManager: pluginManager }) | ||
1769 | 57 | } | 54 | } |
1770 | 58 | } | 55 | } |
1771 | 59 | } | 56 | } |
1772 | 57 | Binding { | ||
1773 | 58 | target: loader.item | ||
1774 | 59 | property: "color" | ||
1775 | 60 | value: theme.palette.highlighted.background | ||
1776 | 61 | when: currentPlugin == model.item.baseName && apl.columns > 1 | ||
1777 | 62 | } | ||
1778 | 63 | Binding { | ||
1779 | 64 | target: loader.item | ||
1780 | 65 | property: "color" | ||
1781 | 66 | value: "transparent" | ||
1782 | 67 | when: currentPlugin != model.item.baseName || apl.columns == 1 | ||
1783 | 68 | } | ||
1784 | 60 | } | 69 | } |
1785 | 61 | } | 70 | } |
1786 | 62 | } | 71 | } |
1787 | 63 | 72 | ||
1788 | === modified file 'tests/autopilot/ubuntu_system_settings/tests/__init__.py' | |||
1789 | --- tests/autopilot/ubuntu_system_settings/tests/__init__.py 2016-09-27 13:41:19 +0000 | |||
1790 | +++ tests/autopilot/ubuntu_system_settings/tests/__init__.py 2017-01-12 12:47:26 +0000 | |||
1791 | @@ -612,6 +612,7 @@ | |||
1792 | 612 | class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase): | 612 | class PhoneOfonoBaseTestCase(UbuntuSystemSettingsOfonoTestCase): |
1793 | 613 | def setUp(self): | 613 | def setUp(self): |
1794 | 614 | """ Go to Phone page """ | 614 | """ Go to Phone page """ |
1795 | 615 | self.useFixture(EnvironmentVariable("USS_SHOW_ALL_UI", "1")) | ||
1796 | 615 | super(PhoneOfonoBaseTestCase, self).setUp() | 616 | super(PhoneOfonoBaseTestCase, self).setUp() |
1797 | 616 | self.phone_page = self.main_view.go_to_phone_page() | 617 | self.phone_page = self.main_view.go_to_phone_page() |
1798 | 617 | 618 | ||
1799 | 618 | 619 | ||
1800 | === modified file 'tests/mocks/SystemSettings/MockPluginManager.cpp' | |||
1801 | --- tests/mocks/SystemSettings/MockPluginManager.cpp 2016-12-01 13:50:03 +0000 | |||
1802 | +++ tests/mocks/SystemSettings/MockPluginManager.cpp 2017-01-12 12:47:26 +0000 | |||
1803 | @@ -18,20 +18,25 @@ | |||
1804 | 18 | 18 | ||
1805 | 19 | #include "MockPluginManager.h" | 19 | #include "MockPluginManager.h" |
1806 | 20 | 20 | ||
1807 | 21 | #include <QDebug> | ||
1808 | 22 | #include <QQmlEngine> | ||
1809 | 23 | |||
1810 | 21 | MockPluginManager::MockPluginManager(QObject *parent) : QObject(parent) | 24 | MockPluginManager::MockPluginManager(QObject *parent) : QObject(parent) |
1811 | 22 | { | 25 | { |
1812 | 23 | } | 26 | } |
1813 | 24 | 27 | ||
1814 | 25 | QObject* MockPluginManager::getByName(const QString &name) const | 28 | QObject* MockPluginManager::getByName(const QString &name) const |
1815 | 26 | { | 29 | { |
1818 | 27 | Q_UNUSED(name); | 30 | MockItem* p = m_plugins.value(name); |
1819 | 28 | return nullptr; | 31 | QQmlEngine::setObjectOwnership(p, QQmlEngine::CppOwnership); |
1820 | 32 | return p; | ||
1821 | 29 | } | 33 | } |
1822 | 30 | 34 | ||
1823 | 31 | QAbstractItemModel* MockPluginManager::itemModel(const QString &category) | 35 | QAbstractItemModel* MockPluginManager::itemModel(const QString &category) |
1824 | 32 | { | 36 | { |
1827 | 33 | Q_UNUSED(category); | 37 | QAbstractItemModel* m = m_models.value(category); |
1828 | 34 | return nullptr; | 38 | QQmlEngine::setObjectOwnership(m, QQmlEngine::CppOwnership); |
1829 | 39 | return m; | ||
1830 | 35 | } | 40 | } |
1831 | 36 | 41 | ||
1832 | 37 | void MockPluginManager::resetPlugins() | 42 | void MockPluginManager::resetPlugins() |
1833 | @@ -48,3 +53,107 @@ | |||
1834 | 48 | m_filter = filter; | 53 | m_filter = filter; |
1835 | 49 | Q_EMIT filterChanged(); | 54 | Q_EMIT filterChanged(); |
1836 | 50 | } | 55 | } |
1837 | 56 | |||
1838 | 57 | void MockPluginManager::addPlugin(const QString &name, QQmlComponent *entry, | ||
1839 | 58 | QQmlComponent *page, const QString &category) | ||
1840 | 59 | { | ||
1841 | 60 | MockItemModel *model = nullptr; | ||
1842 | 61 | if (m_models.contains(category)) { | ||
1843 | 62 | model = (MockItemModel*) m_models.value(category); | ||
1844 | 63 | } else { | ||
1845 | 64 | model = new MockItemModel(this); | ||
1846 | 65 | m_models.insert(category, model); | ||
1847 | 66 | } | ||
1848 | 67 | |||
1849 | 68 | MockItem* item = new MockItem(this); | ||
1850 | 69 | item->setBaseName(name); | ||
1851 | 70 | item->setEntryComponent(entry); | ||
1852 | 71 | item->setPageComponent(page); | ||
1853 | 72 | model->addPlugin(item); | ||
1854 | 73 | m_plugins.insert(name, item); | ||
1855 | 74 | } | ||
1856 | 75 | |||
1857 | 76 | bool MockItem::visible() const | ||
1858 | 77 | { | ||
1859 | 78 | return true; | ||
1860 | 79 | } | ||
1861 | 80 | |||
1862 | 81 | QString MockItem::baseName() const | ||
1863 | 82 | { | ||
1864 | 83 | return m_baseName; | ||
1865 | 84 | } | ||
1866 | 85 | |||
1867 | 86 | void MockItem::setBaseName(const QString &baseName) | ||
1868 | 87 | { | ||
1869 | 88 | m_baseName = baseName; | ||
1870 | 89 | } | ||
1871 | 90 | |||
1872 | 91 | QQmlComponent* MockItem::entryComponent() | ||
1873 | 92 | { | ||
1874 | 93 | QQmlEngine::setObjectOwnership(m_entry, QQmlEngine::CppOwnership); | ||
1875 | 94 | return m_entry; | ||
1876 | 95 | } | ||
1877 | 96 | QQmlComponent* MockItem::pageComponent() | ||
1878 | 97 | { | ||
1879 | 98 | QQmlEngine::setObjectOwnership(m_page, QQmlEngine::CppOwnership); | ||
1880 | 99 | return m_page; | ||
1881 | 100 | } | ||
1882 | 101 | |||
1883 | 102 | void MockItem::setEntryComponent(QQmlComponent* c) | ||
1884 | 103 | { | ||
1885 | 104 | m_entry = c; | ||
1886 | 105 | } | ||
1887 | 106 | |||
1888 | 107 | void MockItem::setPageComponent(QQmlComponent* c) | ||
1889 | 108 | { | ||
1890 | 109 | m_page = c; | ||
1891 | 110 | } | ||
1892 | 111 | |||
1893 | 112 | MockItemModel::MockItemModel(QObject *parent) : QAbstractListModel(parent) | ||
1894 | 113 | { | ||
1895 | 114 | } | ||
1896 | 115 | |||
1897 | 116 | void MockItemModel::addPlugin(MockItem *plugin) | ||
1898 | 117 | { | ||
1899 | 118 | int row = m_plugins.size(); | ||
1900 | 119 | beginInsertRows(QModelIndex(), row, row); | ||
1901 | 120 | m_plugins.append(plugin); | ||
1902 | 121 | endInsertRows(); | ||
1903 | 122 | } | ||
1904 | 123 | |||
1905 | 124 | int MockItemModel::rowCount(const QModelIndex &parent) const | ||
1906 | 125 | { | ||
1907 | 126 | Q_UNUSED(parent); | ||
1908 | 127 | return m_plugins.count(); | ||
1909 | 128 | } | ||
1910 | 129 | |||
1911 | 130 | QVariant MockItemModel::data(const QModelIndex &index, int role) const | ||
1912 | 131 | { | ||
1913 | 132 | if (index.row() >= m_plugins.count()) return QVariant(); | ||
1914 | 133 | |||
1915 | 134 | const MockItem *item = m_plugins.at(index.row()); | ||
1916 | 135 | QVariant ret; | ||
1917 | 136 | |||
1918 | 137 | switch (role) { | ||
1919 | 138 | case Qt::DisplayRole: | ||
1920 | 139 | ret = item->baseName(); | ||
1921 | 140 | break; | ||
1922 | 141 | case ItemRole: | ||
1923 | 142 | ret = QVariant::fromValue<QObject*>(const_cast<MockItem*>(item)); | ||
1924 | 143 | break; | ||
1925 | 144 | } | ||
1926 | 145 | |||
1927 | 146 | return ret; | ||
1928 | 147 | } | ||
1929 | 148 | |||
1930 | 149 | QHash<int, QByteArray> MockItemModel::roleNames() const | ||
1931 | 150 | { | ||
1932 | 151 | static QHash<int,QByteArray> names; | ||
1933 | 152 | if (Q_UNLIKELY(names.empty())) { | ||
1934 | 153 | names[Qt::DisplayRole] = "displayName"; | ||
1935 | 154 | names[MockItemModel::ItemRole] = "item"; | ||
1936 | 155 | } | ||
1937 | 156 | return names; | ||
1938 | 157 | } | ||
1939 | 158 | |||
1940 | 159 | // Q_DECLARE_METATYPE(MockItem*) | ||
1941 | 51 | 160 | ||
1942 | === modified file 'tests/mocks/SystemSettings/MockPluginManager.h' | |||
1943 | --- tests/mocks/SystemSettings/MockPluginManager.h 2016-12-01 13:50:03 +0000 | |||
1944 | +++ tests/mocks/SystemSettings/MockPluginManager.h 2017-01-12 12:47:26 +0000 | |||
1945 | @@ -22,7 +22,10 @@ | |||
1946 | 22 | #include <QAbstractItemModel> | 22 | #include <QAbstractItemModel> |
1947 | 23 | #include <QObject> | 23 | #include <QObject> |
1948 | 24 | #include <QString> | 24 | #include <QString> |
1949 | 25 | #include <QQmlComponent> | ||
1950 | 25 | 26 | ||
1951 | 27 | class MockItem; | ||
1952 | 28 | class MockItemModel; | ||
1953 | 26 | class MockPluginManager : public QObject | 29 | class MockPluginManager : public QObject |
1954 | 27 | { | 30 | { |
1955 | 28 | Q_OBJECT | 31 | Q_OBJECT |
1956 | @@ -39,12 +42,61 @@ | |||
1957 | 39 | void resetPlugins(); | 42 | void resetPlugins(); |
1958 | 40 | QString getFilter(); | 43 | QString getFilter(); |
1959 | 41 | void setFilter(const QString &filter); | 44 | void setFilter(const QString &filter); |
1960 | 45 | void addPlugin(const QString &name, | ||
1961 | 46 | QQmlComponent *entry, | ||
1962 | 47 | QQmlComponent *page, | ||
1963 | 48 | const QString &category = "uncategorized-bottom"); | ||
1964 | 42 | 49 | ||
1965 | 43 | Q_SIGNALS: | 50 | Q_SIGNALS: |
1966 | 44 | void filterChanged(); | 51 | void filterChanged(); |
1967 | 45 | 52 | ||
1968 | 46 | private: | 53 | private: |
1969 | 47 | QString m_filter = QString::null; | 54 | QString m_filter = QString::null; |
1970 | 55 | QMap<QString, MockItemModel*> m_models; | ||
1971 | 56 | QMap<QString, MockItem*> m_plugins; | ||
1972 | 57 | }; | ||
1973 | 58 | |||
1974 | 59 | class MockItem : public QObject | ||
1975 | 60 | { | ||
1976 | 61 | Q_OBJECT | ||
1977 | 62 | Q_PROPERTY(QQmlComponent *entryComponent READ entryComponent CONSTANT) | ||
1978 | 63 | Q_PROPERTY(QQmlComponent *pageComponent READ pageComponent CONSTANT) | ||
1979 | 64 | Q_PROPERTY(bool visible READ visible CONSTANT) | ||
1980 | 65 | Q_PROPERTY(QString baseName READ baseName CONSTANT) | ||
1981 | 66 | public: | ||
1982 | 67 | explicit MockItem(QObject *parent = 0) : QObject(parent) {}; | ||
1983 | 68 | ~MockItem() {}; | ||
1984 | 69 | QQmlComponent* entryComponent(); | ||
1985 | 70 | void setEntryComponent(QQmlComponent* c); | ||
1986 | 71 | QQmlComponent* pageComponent(); | ||
1987 | 72 | void setPageComponent(QQmlComponent* c); | ||
1988 | 73 | bool visible() const; | ||
1989 | 74 | QString baseName() const; | ||
1990 | 75 | void setBaseName(const QString &baseName); | ||
1991 | 76 | private: | ||
1992 | 77 | QQmlComponent* m_entry; | ||
1993 | 78 | QQmlComponent* m_page; | ||
1994 | 79 | QString m_baseName; | ||
1995 | 80 | }; | ||
1996 | 81 | |||
1997 | 82 | class MockItemModel : public QAbstractListModel | ||
1998 | 83 | { | ||
1999 | 84 | Q_OBJECT | ||
2000 | 85 | public: | ||
2001 | 86 | explicit MockItemModel(QObject *parent = 0); | ||
2002 | 87 | ~MockItemModel() {}; | ||
2003 | 88 | |||
2004 | 89 | enum Roles { | ||
2005 | 90 | IconRole = Qt::UserRole + 1, | ||
2006 | 91 | ItemRole, | ||
2007 | 92 | }; | ||
2008 | 93 | void addPlugin(MockItem *plugin); | ||
2009 | 94 | int rowCount(const QModelIndex &parent = QModelIndex()) const; | ||
2010 | 95 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; | ||
2011 | 96 | QHash<int, QByteArray> roleNames() const; | ||
2012 | 97 | |||
2013 | 98 | private: | ||
2014 | 99 | QList<MockItem*> m_plugins; | ||
2015 | 48 | }; | 100 | }; |
2016 | 49 | 101 | ||
2017 | 50 | #endif // MOCK_PLUGIN_MANAGER_H | 102 | #endif // MOCK_PLUGIN_MANAGER_H |
2018 | 51 | 103 | ||
2019 | === modified file 'tests/mocks/SystemSettings/qmldir' | |||
2020 | --- tests/mocks/SystemSettings/qmldir 2016-12-01 14:00:12 +0000 | |||
2021 | +++ tests/mocks/SystemSettings/qmldir 2017-01-12 12:47:26 +0000 | |||
2022 | @@ -3,6 +3,7 @@ | |||
2023 | 3 | 3 | ||
2024 | 4 | ItemPage 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/ItemPage.qml | 4 | ItemPage 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/ItemPage.qml |
2025 | 5 | SettingsItemTitle 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/SettingsItemTitle.qml | 5 | SettingsItemTitle 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/SettingsItemTitle.qml |
2026 | 6 | USSAdaptivePageLayout 1.0 file://${CMAKE_SOURCE_DIR}/src/SystemSettings/USSAdaptivePageLayout.qml | ||
2027 | 6 | CategorySection 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/CategorySection.qml | 7 | CategorySection 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/CategorySection.qml |
2028 | 7 | UncategorizedItemsView.qml 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/UncategorizedItemsView.qml.qml | 8 | UncategorizedItemsView.qml 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/UncategorizedItemsView.qml.qml |
2029 | 8 | MainWindow 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/MainWindow.qml | 9 | MainWindow 1.0 file://${CMAKE_SOURCE_DIR}/src/qml/MainWindow.qml |
2030 | 9 | 10 | ||
2031 | === modified file 'tests/plugins/main/tst_MainWindow.qml' | |||
2032 | --- tests/plugins/main/tst_MainWindow.qml 2016-12-01 13:50:03 +0000 | |||
2033 | +++ tests/plugins/main/tst_MainWindow.qml 2017-01-12 12:47:26 +0000 | |||
2034 | @@ -19,6 +19,7 @@ | |||
2035 | 19 | import QtQuick 2.4 | 19 | import QtQuick 2.4 |
2036 | 20 | import QtTest 1.0 | 20 | import QtTest 1.0 |
2037 | 21 | import SystemSettings 1.0 | 21 | import SystemSettings 1.0 |
2038 | 22 | import SystemSettings.ListItems 1.0 as SettingsListItems | ||
2039 | 22 | import Ubuntu.Components 1.3 | 23 | import Ubuntu.Components 1.3 |
2040 | 23 | import Ubuntu.Test 0.1 | 24 | import Ubuntu.Test 0.1 |
2041 | 24 | 25 | ||
2042 | @@ -35,6 +36,7 @@ | |||
2043 | 35 | 36 | ||
2044 | 36 | property string i18nDirectory: "" | 37 | property string i18nDirectory: "" |
2045 | 37 | property string defaultPlugin: "" | 38 | property string defaultPlugin: "" |
2046 | 39 | property var pluginOptions: ({}) | ||
2047 | 38 | property var view: ({ | 40 | property var view: ({ |
2048 | 39 | minimumWidth: 0, | 41 | minimumWidth: 0, |
2049 | 40 | maximumWidth: 0, | 42 | maximumWidth: 0, |
2050 | @@ -43,13 +45,23 @@ | |||
2051 | 43 | } | 45 | } |
2052 | 44 | 46 | ||
2053 | 45 | UbuntuTestCase { | 47 | UbuntuTestCase { |
2055 | 46 | name: "MainWindowTest" | 48 | name: "DefaultPluginMainWindowTest" |
2056 | 49 | when: windowShown | ||
2057 | 50 | |||
2058 | 51 | function test_default_plugin () { | ||
2059 | 52 | mainWindowComponent.createObject(testRoot, {}); | ||
2060 | 53 | } | ||
2061 | 54 | } | ||
2062 | 55 | |||
2063 | 56 | UbuntuTestCase { | ||
2064 | 57 | name: "MainWindowTests" | ||
2065 | 47 | when: windowShown | 58 | when: windowShown |
2066 | 48 | 59 | ||
2067 | 49 | property var instance | 60 | property var instance |
2068 | 50 | 61 | ||
2069 | 51 | function init() { | 62 | function init() { |
2070 | 52 | instance = mainWindowComponent.createObject(testRoot, {}); | 63 | instance = mainWindowComponent.createObject(testRoot, {}); |
2071 | 64 | waitForRendering(instance); | ||
2072 | 53 | } | 65 | } |
2073 | 54 | 66 | ||
2074 | 55 | function cleanup() { | 67 | function cleanup() { |
2075 | @@ -74,4 +86,182 @@ | |||
2076 | 74 | compare(instance.pluginManager.filter, ""); | 86 | compare(instance.pluginManager.filter, ""); |
2077 | 75 | } | 87 | } |
2078 | 76 | } | 88 | } |
2079 | 89 | |||
2080 | 90 | UbuntuTestCase { | ||
2081 | 91 | name: "MainWindowAPLTests" | ||
2082 | 92 | when: windowShown | ||
2083 | 93 | |||
2084 | 94 | Component { | ||
2085 | 95 | id: testPersonalEntry | ||
2086 | 96 | SettingsListItems.IconProgression { | ||
2087 | 97 | objectName: "testPersonalEntry" | ||
2088 | 98 | text: "Test" | ||
2089 | 99 | iconName: "system-users-symbolic" | ||
2090 | 100 | } | ||
2091 | 101 | } | ||
2092 | 102 | |||
2093 | 103 | Component { | ||
2094 | 104 | id: testUncategorizedEntry | ||
2095 | 105 | SettingsListItems.IconProgression { | ||
2096 | 106 | objectName: "testUncategorizedEntry" | ||
2097 | 107 | text: "Test 2" | ||
2098 | 108 | iconName: "phone-smartphone-symbolic" | ||
2099 | 109 | } | ||
2100 | 110 | } | ||
2101 | 111 | |||
2102 | 112 | Component { | ||
2103 | 113 | id: testPageComponent | ||
2104 | 114 | Page { | ||
2105 | 115 | objectName: "testPage" | ||
2106 | 116 | visible: false | ||
2107 | 117 | property var plugin | ||
2108 | 118 | property var pluginOptions | ||
2109 | 119 | property var pluginManager | ||
2110 | 120 | header: testHeader | ||
2111 | 121 | PageHeader { | ||
2112 | 122 | id: testHeader | ||
2113 | 123 | title: i18n.tr("Test PageComponent") | ||
2114 | 124 | flickable: testFlickable | ||
2115 | 125 | } | ||
2116 | 126 | Flickable { | ||
2117 | 127 | id: testFlickable | ||
2118 | 128 | anchors.fill: parent | ||
2119 | 129 | contentHeight: contentItem.childrenRect.height | ||
2120 | 130 | Column { | ||
2121 | 131 | anchors.left: parent.left | ||
2122 | 132 | anchors.right: parent.right | ||
2123 | 133 | |||
2124 | 134 | Label { | ||
2125 | 135 | text: "Test Content" | ||
2126 | 136 | } | ||
2127 | 137 | } | ||
2128 | 138 | } | ||
2129 | 139 | } | ||
2130 | 140 | } | ||
2131 | 141 | |||
2132 | 142 | Component { | ||
2133 | 143 | id: pluginManagerComponent | ||
2134 | 144 | PluginManager {} | ||
2135 | 145 | } | ||
2136 | 146 | |||
2137 | 147 | function waitForPage(page) { | ||
2138 | 148 | tryCompareFunction(function () { | ||
2139 | 149 | return !!findChild(testRoot, page); | ||
2140 | 150 | }, true); | ||
2141 | 151 | return findChild(testRoot, page); | ||
2142 | 152 | } | ||
2143 | 153 | |||
2144 | 154 | function waitForPageToGoAway(page) { | ||
2145 | 155 | tryCompareFunction(function () { | ||
2146 | 156 | var p = findChild(testRoot, page); | ||
2147 | 157 | var visible = p && p.visible; | ||
2148 | 158 | return !!(p && visible); | ||
2149 | 159 | }, false); | ||
2150 | 160 | } | ||
2151 | 161 | |||
2152 | 162 | property var instance | ||
2153 | 163 | property var personalEntry | ||
2154 | 164 | property var uncategorizedEntry | ||
2155 | 165 | property var page | ||
2156 | 166 | property var manager | ||
2157 | 167 | |||
2158 | 168 | function init() { | ||
2159 | 169 | manager = pluginManagerComponent.createObject(testRoot); | ||
2160 | 170 | personalEntry = testPersonalEntry; | ||
2161 | 171 | uncategorizedEntry = testUncategorizedEntry; | ||
2162 | 172 | page = testPageComponent; | ||
2163 | 173 | |||
2164 | 174 | manager.addPlugin("Test", personalEntry, page, "personal"); | ||
2165 | 175 | manager.addPlugin("Phone", uncategorizedEntry, page, "uncategorized-bottom"); | ||
2166 | 176 | } | ||
2167 | 177 | |||
2168 | 178 | function cleanup() { | ||
2169 | 179 | instance && instance.destroy(); | ||
2170 | 180 | } | ||
2171 | 181 | |||
2172 | 182 | function test_go_to_panel_data() { | ||
2173 | 183 | return [ | ||
2174 | 184 | { tag: "one column, categorized", width: units.gu(50), entry: "testPersonalEntry" }, | ||
2175 | 185 | { tag: "one column, uncategorized", width: units.gu(50), entry: "testUncategorizedEntry" }, | ||
2176 | 186 | { tag: "two column, categorized", width: units.gu(110), entry: "testPersonalEntry" }, | ||
2177 | 187 | { tag: "two column, uncategorized", width: units.gu(110), entry: "testUncategorizedEntry" }, | ||
2178 | 188 | ]; | ||
2179 | 189 | } | ||
2180 | 190 | |||
2181 | 191 | function test_go_to_panel(data) { | ||
2182 | 192 | instance = mainWindowComponent.createObject(testRoot, { | ||
2183 | 193 | pluginManager: manager | ||
2184 | 194 | }); | ||
2185 | 195 | waitForRendering(instance); | ||
2186 | 196 | testRoot.width = data.width; | ||
2187 | 197 | var entry = findChild(instance, data.entry); | ||
2188 | 198 | mouseClick(entry, entry.width / 2, entry.height / 2); | ||
2189 | 199 | waitForPage("testPage"); | ||
2190 | 200 | var page = waitForPage("testPage"); | ||
2191 | 201 | tryCompare(page, "visible", true); | ||
2192 | 202 | } | ||
2193 | 203 | |||
2194 | 204 | function test_default_plugin_data() { | ||
2195 | 205 | return [ | ||
2196 | 206 | { tag: "no default", default: "", pageObjectName: "" }, | ||
2197 | 207 | { tag: "default", default: "Test", pageObjectName: "testPage" }, | ||
2198 | 208 | ]; | ||
2199 | 209 | } | ||
2200 | 210 | |||
2201 | 211 | function test_default_plugin(data) { | ||
2202 | 212 | instance = mainWindowComponent.createObject(testRoot, { | ||
2203 | 213 | pluginManager: manager, defaultPlugin: data.default | ||
2204 | 214 | }); | ||
2205 | 215 | waitForRendering(instance); | ||
2206 | 216 | if (data.pageObjectName) { | ||
2207 | 217 | var page = waitForPage(data.pageObjectName); | ||
2208 | 218 | tryCompare(page, "visible", true); | ||
2209 | 219 | } | ||
2210 | 220 | } | ||
2211 | 221 | |||
2212 | 222 | function test_placeholder_plugin_created_and_destroyed() { | ||
2213 | 223 | instance = mainWindowComponent.createObject(testRoot, { | ||
2214 | 224 | pluginManager: manager, defaultPlugin: data.default, | ||
2215 | 225 | placeholderPlugin: "Test" | ||
2216 | 226 | }); | ||
2217 | 227 | waitForRendering(instance); | ||
2218 | 228 | waitForPage("testPage"); | ||
2219 | 229 | testRoot.width = units.gu(50); | ||
2220 | 230 | waitForPageToGoAway("testPage"); | ||
2221 | 231 | } | ||
2222 | 232 | |||
2223 | 233 | function test_current_plugin_property() { | ||
2224 | 234 | var apl; | ||
2225 | 235 | var entry; | ||
2226 | 236 | |||
2227 | 237 | instance = mainWindowComponent.createObject(testRoot, { | ||
2228 | 238 | pluginManager: manager | ||
2229 | 239 | }); | ||
2230 | 240 | waitForRendering(instance); | ||
2231 | 241 | apl = findInvisibleChild(instance, "apl"); | ||
2232 | 242 | |||
2233 | 243 | // Base case | ||
2234 | 244 | compare(instance.currentPlugin, ""); | ||
2235 | 245 | |||
2236 | 246 | // Push a page | ||
2237 | 247 | instance.loadPluginByName("Test"); | ||
2238 | 248 | tryCompare(instance, "currentPlugin", "Test"); | ||
2239 | 249 | |||
2240 | 250 | // Pop a page | ||
2241 | 251 | apl.removePages(apl.primaryPage); | ||
2242 | 252 | tryCompare(instance, "currentPlugin", ""); | ||
2243 | 253 | } | ||
2244 | 254 | |||
2245 | 255 | // Seems this is how Unity8 is resizing a window to its previous size. | ||
2246 | 256 | function test_placeholder_plugin_is_not_initially_shown_on_narrow() { | ||
2247 | 257 | testRoot.width = units.gu(150); | ||
2248 | 258 | instance = mainWindowComponent.createObject(testRoot, { | ||
2249 | 259 | pluginManager: manager, defaultPlugin: data.default, | ||
2250 | 260 | placeholderPlugin: "Test" | ||
2251 | 261 | }); | ||
2252 | 262 | testRoot.width = units.gu(50); | ||
2253 | 263 | waitForRendering(instance); | ||
2254 | 264 | waitForPageToGoAway("testPage"); | ||
2255 | 265 | } | ||
2256 | 266 | } | ||
2257 | 77 | } | 267 | } |
PASSED: Continuous integration, rev:1760 /jenkins. canonical. com/system- apps/job/ lp-ubuntu- system- settings- ci/279/ /jenkins. canonical. com/system- apps/job/ build/2193 /jenkins. canonical. com/system- apps/job/ test-0- autopkgtest/ label=phone- armhf,release= vivid+overlay, testname= default/ 566 /jenkins. canonical. com/system- apps/job/ build-0- fetch/2196 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= zesty/2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=amd64, release= zesty/2023/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= zesty/2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=armhf, release= zesty/2023/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 2023/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= zesty/2023 /jenkins. canonical. com/system- apps/job/ build-2- binpkg/ arch=i386, release= zesty/2023/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/system- apps/job/ lp-ubuntu- system- settings- ci/279/ rebuild
https:/