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