Merge lp:~mardy/ubuntu-system-settings-online-accounts/listitems into lp:ubuntu-system-settings-online-accounts
- listitems
- Merge into trunk
Proposed by
Alberto Mardegan
Status: | Needs review |
---|---|
Proposed branch: | lp:~mardy/ubuntu-system-settings-online-accounts/listitems |
Merge into: | lp:ubuntu-system-settings-online-accounts |
Diff against target: |
684 lines (+211/-91) 19 files modified
debian/changelog (+8/-0) debian/rules (+2/-1) online-accounts-ui/qml/AuthorizationPage.qml (+0/-1) online-accounts-ui/qml/SignOnUiDialog.qml (+20/-2) online-accounts-ui/qml/SignOnUiPage.qml (+22/-4) plugins/module/ErrorItem.qml (+1/-2) plugins/module/OAuth.qml (+7/-7) plugins/module/Options.qml (+16/-8) plugins/module/RemovalConfirmation.qml (+1/-2) plugins/module/ServiceItemBase.qml (+28/-26) plugins/module/ServiceSwitches.qml (+7/-4) system-settings-plugin/AccountItem.qml (+19/-6) system-settings-plugin/AccountsPage.qml (+8/-6) system-settings-plugin/AddAccountLabel.qml (+13/-5) system-settings-plugin/MainPage.qml (+1/-2) system-settings-plugin/NoAccountsPage.qml (+9/-6) system-settings-plugin/ProvidersList.qml (+14/-8) system-settings-plugin/UbuntuIcon.qml (+33/-0) system-settings-plugin/system-settings-plugin.pro (+2/-1) |
To merge this branch: | bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/listitems |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandre Abreu (community) | Approve | ||
Review via email: mp+319907@code.launchpad.net |
Commit message
Don't use deprecated ListItems submodule
Description of the change
Don't use deprecated ListItems submodule
To post a comment you must log in.
- 423. By Alberto Mardegan
-
Disable tests on powerpc
Unmerged revisions
- 423. By Alberto Mardegan
-
Disable tests on powerpc
- 422. By Alberto Mardegan
-
Don't use deprecated ListItems submodule
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2017-03-08 11:37:22 +0000 |
3 | +++ debian/changelog 2017-03-16 11:01:46 +0000 |
4 | @@ -1,3 +1,11 @@ |
5 | +ubuntu-system-settings-online-accounts (0.7+17.04.20170308.2-0ubuntu2) UNRELEASED; urgency=medium |
6 | + |
7 | + * debian/rules: |
8 | + - Disable tests on powerpc |
9 | + * Don't use deprecated ListItems module |
10 | + |
11 | + -- Alberto Mardegan <alberto.mardegan@canonical.com> Thu, 16 Mar 2017 14:00:42 +0300 |
12 | + |
13 | ubuntu-system-settings-online-accounts (0.7+17.04.20170308.2-0ubuntu1) zesty; urgency=medium |
14 | |
15 | * debian/control: |
16 | |
17 | === modified file 'debian/rules' |
18 | --- debian/rules 2016-11-01 07:04:34 +0000 |
19 | +++ debian/rules 2017-03-16 11:01:46 +0000 |
20 | @@ -7,7 +7,8 @@ |
21 | DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
22 | |
23 | # Skip tests on the archs they are known to be flaky with current configuration |
24 | -testskip_architectures := |
25 | +# powerpc: https://bugs.launchpad.net/bugs/1673423 |
26 | +testskip_architectures := powerpc |
27 | |
28 | override_dh_auto_configure: |
29 | dh_auto_configure -- \ |
30 | |
31 | === modified file 'online-accounts-ui/qml/AuthorizationPage.qml' |
32 | --- online-accounts-ui/qml/AuthorizationPage.qml 2016-05-23 07:27:03 +0000 |
33 | +++ online-accounts-ui/qml/AuthorizationPage.qml 2017-03-16 11:01:46 +0000 |
34 | @@ -18,7 +18,6 @@ |
35 | |
36 | import QtQuick 2.0 |
37 | import Ubuntu.Components 1.3 |
38 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
39 | |
40 | Flickable { |
41 | id: root |
42 | |
43 | === modified file 'online-accounts-ui/qml/SignOnUiDialog.qml' |
44 | --- online-accounts-ui/qml/SignOnUiDialog.qml 2015-11-06 08:08:29 +0000 |
45 | +++ online-accounts-ui/qml/SignOnUiDialog.qml 2017-03-16 11:01:46 +0000 |
46 | @@ -1,7 +1,24 @@ |
47 | +/* |
48 | + * Copyright (C) 2015-2017 Canonical Ltd. |
49 | + * |
50 | + * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
51 | + * |
52 | + * This program is free software: you can redistribute it and/or modify it |
53 | + * under the terms of the GNU General Public License version 3, as published |
54 | + * by the Free Software Foundation. |
55 | + * |
56 | + * This program is distributed in the hope that it will be useful, but |
57 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
58 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
59 | + * PURPOSE. See the GNU General Public License for more details. |
60 | + * |
61 | + * You should have received a copy of the GNU General Public License along |
62 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
63 | + */ |
64 | + |
65 | import QtQuick 2.0 |
66 | import Ubuntu.Components 1.3 |
67 | import Ubuntu.Components.Popups 1.3 |
68 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
69 | |
70 | Item { |
71 | id: root |
72 | @@ -67,8 +84,9 @@ |
73 | anchors.right: parent.right |
74 | visible: signonRequest.registerUrl.toString() !== "" |
75 | |
76 | - ListItem.ThinDivider { |
77 | + ListItem { |
78 | anchors.bottom: registerUrlLabel.top |
79 | + height: divider.height |
80 | } |
81 | |
82 | Label { |
83 | |
84 | === modified file 'online-accounts-ui/qml/SignOnUiPage.qml' |
85 | --- online-accounts-ui/qml/SignOnUiPage.qml 2016-04-07 12:57:06 +0000 |
86 | +++ online-accounts-ui/qml/SignOnUiPage.qml 2017-03-16 11:01:46 +0000 |
87 | @@ -1,6 +1,23 @@ |
88 | +/* |
89 | + * Copyright (C) 2016-2017 Canonical Ltd. |
90 | + * |
91 | + * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
92 | + * |
93 | + * This program is free software: you can redistribute it and/or modify it |
94 | + * under the terms of the GNU General Public License version 3, as published |
95 | + * by the Free Software Foundation. |
96 | + * |
97 | + * This program is distributed in the hope that it will be useful, but |
98 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
99 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
100 | + * PURPOSE. See the GNU General Public License for more details. |
101 | + * |
102 | + * You should have received a copy of the GNU General Public License along |
103 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
104 | + */ |
105 | + |
106 | import QtQuick 2.0 |
107 | import Ubuntu.Components 1.3 |
108 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
109 | import Ubuntu.OnlineAccounts.Plugin 1.0 |
110 | |
111 | MainView { |
112 | @@ -24,11 +41,12 @@ |
113 | } |
114 | } |
115 | |
116 | - ListItem.SingleControl { |
117 | + ListItem { |
118 | id: cancelButton |
119 | anchors.bottom: parent.bottom |
120 | - showDivider: false |
121 | - control: Button { |
122 | + divider.visible: false |
123 | + Button { |
124 | + anchors.centerIn: parent |
125 | text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") |
126 | width: parent.width - units.gu(4) |
127 | onClicked: signonRequest.cancel() |
128 | |
129 | === modified file 'plugins/module/ErrorItem.qml' |
130 | --- plugins/module/ErrorItem.qml 2015-10-09 12:26:40 +0000 |
131 | +++ plugins/module/ErrorItem.qml 2017-03-16 11:01:46 +0000 |
132 | @@ -1,5 +1,5 @@ |
133 | /* |
134 | - * Copyright (C) 2015 Canonical Ltd. |
135 | + * Copyright (C) 2015-2017 Canonical Ltd. |
136 | * |
137 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
138 | * |
139 | @@ -18,7 +18,6 @@ |
140 | |
141 | import QtQuick 2.0 |
142 | import Ubuntu.Components 0.1 |
143 | -import Ubuntu.Components.ListItems 0.1 as ListItem |
144 | |
145 | Item { |
146 | id: root |
147 | |
148 | === modified file 'plugins/module/OAuth.qml' |
149 | --- plugins/module/OAuth.qml 2016-08-29 01:49:31 +0000 |
150 | +++ plugins/module/OAuth.qml 2017-03-16 11:01:46 +0000 |
151 | @@ -1,5 +1,5 @@ |
152 | /* |
153 | - * Copyright (C) 2013-2016 Canonical Ltd. |
154 | + * Copyright (C) 2013-2017 Canonical Ltd. |
155 | * |
156 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
157 | * |
158 | @@ -18,7 +18,6 @@ |
159 | |
160 | import QtQuick 2.0 |
161 | import Ubuntu.Components 1.3 |
162 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
163 | import Ubuntu.Components.Popups 1.3 |
164 | import Ubuntu.OnlineAccounts 0.1 |
165 | import Ubuntu.OnlineAccounts.Plugin 1.0 |
166 | @@ -97,10 +96,10 @@ |
167 | account: __account.objectHandle |
168 | } |
169 | |
170 | - ListItem.Base { |
171 | + ListItem { |
172 | visible: loading && !errorItem.visible |
173 | height: units.gu(7) |
174 | - showDivider: false |
175 | + divider.visible: false |
176 | anchors.top: parent.top |
177 | |
178 | Item { |
179 | @@ -153,11 +152,12 @@ |
180 | id: osk |
181 | } |
182 | |
183 | - ListItem.SingleControl { |
184 | + ListItem { |
185 | id: cancelButton |
186 | anchors.bottom: parent.bottom |
187 | - showDivider: false |
188 | - control: Button { |
189 | + divider.visible: false |
190 | + Button { |
191 | + anchors.centerIn: parent |
192 | text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") |
193 | width: parent.width - units.gu(4) |
194 | onClicked: root.cancel() |
195 | |
196 | === modified file 'plugins/module/Options.qml' |
197 | --- plugins/module/Options.qml 2015-10-22 08:33:20 +0000 |
198 | +++ plugins/module/Options.qml 2017-03-16 11:01:46 +0000 |
199 | @@ -1,5 +1,5 @@ |
200 | /* |
201 | - * Copyright (C) 2013-2015 Canonical Ltd. |
202 | + * Copyright (C) 2013-2017 Canonical Ltd. |
203 | * |
204 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
205 | * |
206 | @@ -18,7 +18,6 @@ |
207 | |
208 | import QtQuick 2.0 |
209 | import Ubuntu.Components 1.3 |
210 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
211 | import Ubuntu.Components.Popups 1.3 |
212 | import Ubuntu.OnlineAccounts 0.1 |
213 | |
214 | @@ -32,9 +31,17 @@ |
215 | anchors.left: parent.left |
216 | anchors.right: parent.right |
217 | |
218 | - ListItem.SingleValue { |
219 | - text: i18n.dtr("ubuntu-system-settings-online-accounts", "ID") |
220 | - value: account.displayName |
221 | + ListItem { |
222 | + height: layout.height |
223 | + ListItemLayout { |
224 | + id: layout |
225 | + title.text: i18n.dtr("ubuntu-system-settings-online-accounts", "ID") |
226 | + |
227 | + Label { |
228 | + SlotsLayout.position: SlotsLayout.Trailing |
229 | + text: account.displayName |
230 | + } |
231 | + } |
232 | } |
233 | |
234 | ServiceSwitches { |
235 | @@ -43,13 +50,14 @@ |
236 | opacity: enabled ? 1 : 0.5 |
237 | } |
238 | |
239 | - ListItem.SingleControl { |
240 | - control: Button { |
241 | + ListItem { |
242 | + divider.visible: false |
243 | + Button { |
244 | + anchors.centerIn: parent |
245 | text: i18n.dtr("ubuntu-system-settings-online-accounts", "Remove account…") |
246 | width: parent.width - units.gu(4) |
247 | onClicked: PopupUtils.open(removalConfirmationComponent) |
248 | } |
249 | - showDivider: false |
250 | } |
251 | |
252 | Component { |
253 | |
254 | === modified file 'plugins/module/RemovalConfirmation.qml' |
255 | --- plugins/module/RemovalConfirmation.qml 2015-10-22 08:33:20 +0000 |
256 | +++ plugins/module/RemovalConfirmation.qml 2017-03-16 11:01:46 +0000 |
257 | @@ -1,5 +1,5 @@ |
258 | /* |
259 | - * Copyright (C) 2013-2015 Canonical Ltd. |
260 | + * Copyright (C) 2013-2017 Canonical Ltd. |
261 | * |
262 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
263 | * |
264 | @@ -18,7 +18,6 @@ |
265 | |
266 | import QtQuick 2.0 |
267 | import Ubuntu.Components 1.3 |
268 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
269 | import Ubuntu.Components.Popups 1.3 |
270 | |
271 | Dialog { |
272 | |
273 | === modified file 'plugins/module/ServiceItemBase.qml' |
274 | --- plugins/module/ServiceItemBase.qml 2016-02-12 13:30:25 +0000 |
275 | +++ plugins/module/ServiceItemBase.qml 2017-03-16 11:01:46 +0000 |
276 | @@ -1,5 +1,5 @@ |
277 | /* |
278 | - * Copyright (C) 2016 Canonical Ltd. |
279 | + * Copyright (C) 2016-2017 Canonical Ltd. |
280 | * |
281 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
282 | * |
283 | @@ -18,35 +18,37 @@ |
284 | |
285 | import QtQuick 2.0 |
286 | import Ubuntu.Components 1.3 |
287 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
288 | - |
289 | -ListItem.Base { |
290 | + |
291 | +ListItem { |
292 | + id: root |
293 | + |
294 | + property alias iconSource: icon.source |
295 | property alias checked: control.checked |
296 | - property alias text: label.text |
297 | - property alias subText: subLabel.text |
298 | - |
299 | - Item { |
300 | - anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter } |
301 | - height: childrenRect.height + label.anchors.topMargin + subLabel.anchors.bottomMargin |
302 | - |
303 | - Label { |
304 | - id: label |
305 | - anchors { left: parent.left; right: control.left; top: parent.top } |
306 | - elide: Text.ElideRight |
307 | - color: theme.palette.selected.backgroundText |
308 | - } |
309 | - |
310 | - Label { |
311 | - id: subLabel |
312 | - anchors { left: parent.left; right: control.left; top: label.bottom } |
313 | - color: theme.palette.normal.backgroundText |
314 | - elide: Text.ElideRight |
315 | - textSize: Label.Small |
316 | - } |
317 | + property string text |
318 | + property string subText |
319 | + |
320 | + height: layout.height |
321 | + |
322 | + ListItemLayout { |
323 | + id: layout |
324 | + |
325 | + UbuntuShape { |
326 | + SlotsLayout.position: SlotsLayout.Leading |
327 | + width: units.gu(5) |
328 | + height: width |
329 | + source: Image { |
330 | + id: icon |
331 | + anchors.fill: parent |
332 | + sourceSize { width: width; height: height } |
333 | + } |
334 | + } |
335 | + |
336 | + title.text: root.text |
337 | + subtitle.text: root.subText |
338 | |
339 | Switch { |
340 | - anchors { right: parent.right; verticalCenter: parent.verticalCenter } |
341 | id: control |
342 | + SlotsLayout.position: SlotsLayout.Trailing |
343 | } |
344 | } |
345 | } |
346 | |
347 | === modified file 'plugins/module/ServiceSwitches.qml' |
348 | --- plugins/module/ServiceSwitches.qml 2015-10-22 08:33:20 +0000 |
349 | +++ plugins/module/ServiceSwitches.qml 2017-03-16 11:01:46 +0000 |
350 | @@ -1,5 +1,5 @@ |
351 | /* |
352 | - * Copyright (C) 2013-2015 Canonical Ltd. |
353 | + * Copyright (C) 2013-2017 Canonical Ltd. |
354 | * |
355 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
356 | * |
357 | @@ -18,7 +18,6 @@ |
358 | |
359 | import QtQuick 2.0 |
360 | import Ubuntu.Components 1.3 |
361 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
362 | import Ubuntu.OnlineAccounts 0.1 |
363 | |
364 | Column { |
365 | @@ -29,8 +28,12 @@ |
366 | anchors.left: parent.left |
367 | anchors.right: parent.right |
368 | |
369 | - ListItem.Standard { |
370 | - text: i18n.dtr("ubuntu-system-settings-online-accounts", "Access to this account:") |
371 | + ListItem { |
372 | + height: layout.height |
373 | + ListItemLayout { |
374 | + id: layout |
375 | + title.text: i18n.dtr("ubuntu-system-settings-online-accounts", "Access to this account:") |
376 | + } |
377 | } |
378 | |
379 | AccountServiceModel { |
380 | |
381 | === modified file 'system-settings-plugin/AccountItem.qml' |
382 | --- system-settings-plugin/AccountItem.qml 2016-12-20 13:21:48 +0000 |
383 | +++ system-settings-plugin/AccountItem.qml 2017-03-16 11:01:46 +0000 |
384 | @@ -1,5 +1,5 @@ |
385 | /* |
386 | - * Copyright (C) 2013-2015 Canonical Ltd. |
387 | + * Copyright (C) 2013-2017 Canonical Ltd. |
388 | * |
389 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
390 | * |
391 | @@ -18,18 +18,19 @@ |
392 | |
393 | import QtQuick 2.0 |
394 | import Ubuntu.Components 1.3 |
395 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
396 | import Ubuntu.OnlineAccounts 0.1 |
397 | |
398 | -ListItem.Subtitled { |
399 | +ListItem { |
400 | + id: root |
401 | + |
402 | + property string text: "" |
403 | + property string subText: "" |
404 | property variant accountHandle |
405 | property variant globalServiceHandle |
406 | property variant __editPage: null |
407 | property bool running: false |
408 | |
409 | - iconSource: globalService.provider.iconName.indexOf("/") === 0 ? |
410 | - globalService.provider.iconName : "image://theme/" + globalService.provider.iconName |
411 | - progression: true |
412 | + height: layout.height |
413 | opacity: globalService.enabled ? 1 : 0.5 |
414 | |
415 | resources: [ |
416 | @@ -51,6 +52,18 @@ |
417 | running = true; |
418 | } |
419 | |
420 | + ListItemLayout { |
421 | + id: layout |
422 | + title.text: root.text |
423 | + subtitle.text: root.subText |
424 | + UbuntuIcon { |
425 | + SlotsLayout.position: SlotsLayout.Leading |
426 | + iconSource: globalService.provider.iconName.indexOf("/") === 0 ? |
427 | + globalService.provider.iconName : "image://theme/" + globalService.provider.iconName |
428 | + } |
429 | + ProgressionSlot {} |
430 | + } |
431 | + |
432 | function __onEditFinished() { |
433 | __editPage.destroy(1000) |
434 | pageStack.removePages(__editPage) |
435 | |
436 | === modified file 'system-settings-plugin/AccountsPage.qml' |
437 | --- system-settings-plugin/AccountsPage.qml 2016-12-20 13:21:48 +0000 |
438 | +++ system-settings-plugin/AccountsPage.qml 2017-03-16 11:01:46 +0000 |
439 | @@ -1,5 +1,5 @@ |
440 | /* |
441 | - * Copyright (C) 2013-2015 Canonical Ltd. |
442 | + * Copyright (C) 2013-2017 Canonical Ltd. |
443 | * |
444 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
445 | * |
446 | @@ -18,7 +18,6 @@ |
447 | |
448 | import QtQuick 2.0 |
449 | import Ubuntu.Components 1.3 |
450 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
451 | |
452 | Flickable { |
453 | id: root |
454 | @@ -46,16 +45,19 @@ |
455 | } |
456 | } |
457 | |
458 | - ListItem.SingleControl { |
459 | - control: Button { |
460 | + ListItem { |
461 | + Button { |
462 | + anchors.centerIn: parent |
463 | text: i18n.dtr(domain, "Add account…") |
464 | width: parent.width - units.gu(4) |
465 | onClicked: pageStack.addPageToNextColumn(mainAccountsPage, newAccountPage) |
466 | } |
467 | - showDivider: false |
468 | + divider.visible: false |
469 | } |
470 | |
471 | - AddAccountLabel {} |
472 | + AddAccountLabel { |
473 | + divider.visible: false |
474 | + } |
475 | } |
476 | |
477 | Component { |
478 | |
479 | === modified file 'system-settings-plugin/AddAccountLabel.qml' |
480 | --- system-settings-plugin/AddAccountLabel.qml 2015-10-22 08:33:20 +0000 |
481 | +++ system-settings-plugin/AddAccountLabel.qml 2017-03-16 11:01:46 +0000 |
482 | @@ -1,5 +1,5 @@ |
483 | /* |
484 | - * Copyright (C) 2013-2015 Canonical Ltd. |
485 | + * Copyright (C) 2013-2017 Canonical Ltd. |
486 | * |
487 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
488 | * |
489 | @@ -18,11 +18,19 @@ |
490 | |
491 | import QtQuick 2.0 |
492 | import Ubuntu.Components 1.3 |
493 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
494 | |
495 | -ListItem.Caption { |
496 | +ListItem { |
497 | anchors.left: parent.left |
498 | anchors.right: parent.right |
499 | - anchors.margins: units.gu(2) |
500 | - text: i18n.dtr(domain, "Storing account details here lets apps use the accounts without you having to sign in for each app.") |
501 | + height: label.height + units.gu(4) |
502 | + Label { |
503 | + id: label |
504 | + anchors { |
505 | + left: parent.left; right: parent.right; margins: units.gu(4) |
506 | + verticalCenter: parent.verticalCenter |
507 | + } |
508 | + textSize: Label.Small |
509 | + wrapMode: Text.WordWrap |
510 | + text: i18n.dtr(domain, "Storing account details here lets apps use the accounts without you having to sign in for each app.") |
511 | + } |
512 | } |
513 | |
514 | === modified file 'system-settings-plugin/MainPage.qml' |
515 | --- system-settings-plugin/MainPage.qml 2016-12-20 13:21:48 +0000 |
516 | +++ system-settings-plugin/MainPage.qml 2017-03-16 11:01:46 +0000 |
517 | @@ -1,5 +1,5 @@ |
518 | /* |
519 | - * Copyright (C) 2013-2015 Canonical Ltd. |
520 | + * Copyright (C) 2013-2017 Canonical Ltd. |
521 | * |
522 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
523 | * |
524 | @@ -19,7 +19,6 @@ |
525 | import QtQuick 2.0 |
526 | import SystemSettings 1.0 |
527 | import Ubuntu.Components 1.3 |
528 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
529 | import Ubuntu.OnlineAccounts 0.1 |
530 | |
531 | ItemPage { |
532 | |
533 | === modified file 'system-settings-plugin/NoAccountsPage.qml' |
534 | --- system-settings-plugin/NoAccountsPage.qml 2015-11-12 08:12:13 +0000 |
535 | +++ system-settings-plugin/NoAccountsPage.qml 2017-03-16 11:01:46 +0000 |
536 | @@ -1,5 +1,5 @@ |
537 | /* |
538 | - * Copyright (C) 2013-2015 Canonical Ltd. |
539 | + * Copyright (C) 2013-2017 Canonical Ltd. |
540 | * |
541 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
542 | * |
543 | @@ -18,7 +18,6 @@ |
544 | |
545 | import QtQuick 2.0 |
546 | import Ubuntu.Components 1.3 |
547 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
548 | |
549 | Flickable { |
550 | id: root |
551 | @@ -31,20 +30,24 @@ |
552 | anchors.left: parent.left |
553 | anchors.right: parent.right |
554 | |
555 | - ListItem.Base { |
556 | + ListItem { |
557 | Label { |
558 | text: i18n.dtr(domain, "No accounts") |
559 | color: theme.palette.normal.backgroundText |
560 | fontSize: "large" |
561 | anchors.centerIn: parent |
562 | } |
563 | - showDivider: false |
564 | + divider.visible: false |
565 | } |
566 | |
567 | AddAccountLabel {} |
568 | |
569 | - ListItem.Standard { |
570 | - text: i18n.dtr(domain, "Add account:") |
571 | + ListItem { |
572 | + height: layout.height |
573 | + ListItemLayout { |
574 | + id: layout |
575 | + title.text: i18n.dtr(domain, "Add account:") |
576 | + } |
577 | } |
578 | |
579 | ProviderPluginList {} |
580 | |
581 | === modified file 'system-settings-plugin/ProvidersList.qml' |
582 | --- system-settings-plugin/ProvidersList.qml 2015-11-26 16:02:17 +0000 |
583 | +++ system-settings-plugin/ProvidersList.qml 2017-03-16 11:01:46 +0000 |
584 | @@ -1,5 +1,5 @@ |
585 | /* |
586 | - * Copyright (C) 2013-2015 Canonical Ltd. |
587 | + * Copyright (C) 2013-2017 Canonical Ltd. |
588 | * |
589 | * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
590 | * |
591 | @@ -18,7 +18,6 @@ |
592 | |
593 | import QtQuick 2.0 |
594 | import Ubuntu.Components 1.3 |
595 | -import Ubuntu.Components.ListItems 1.3 as ListItem |
596 | import Ubuntu.OnlineAccounts 0.1 |
597 | import Ubuntu.OnlineAccounts.Plugin 1.0 |
598 | |
599 | @@ -58,20 +57,27 @@ |
600 | id: repeater |
601 | model: filteredProviderModel |
602 | |
603 | - delegate: ListItem.Standard { |
604 | + delegate: ListItem { |
605 | id: provider |
606 | - text: displayName |
607 | + height: layout.height |
608 | enabled: accountModel === null || accountModel.count === 0 |
609 | - iconSource: model.iconName.indexOf("/") === 0 ? |
610 | - model.iconName : "image://theme/" + model.iconName |
611 | - progression: false |
612 | - onTriggered: { |
613 | + onClicked: { |
614 | activated = true; |
615 | root.providerClicked(providerId); |
616 | } |
617 | + |
618 | property var accountModel: isSingleAccount ? createAccountModel(providerId) : null |
619 | property bool activated: false |
620 | |
621 | + ListItemLayout { |
622 | + id: layout |
623 | + title.text: displayName |
624 | + UbuntuIcon { |
625 | + iconSource: model.iconName.indexOf("/") === 0 ? |
626 | + model.iconName : "image://theme/" + model.iconName |
627 | + } |
628 | + } |
629 | + |
630 | ActivityIndicator { |
631 | anchors.verticalCenter: parent.verticalCenter |
632 | anchors.right: parent.right |
633 | |
634 | === added file 'system-settings-plugin/UbuntuIcon.qml' |
635 | --- system-settings-plugin/UbuntuIcon.qml 1970-01-01 00:00:00 +0000 |
636 | +++ system-settings-plugin/UbuntuIcon.qml 2017-03-16 11:01:46 +0000 |
637 | @@ -0,0 +1,33 @@ |
638 | +/* |
639 | + * Copyright (C) 2017 Canonical Ltd. |
640 | + * |
641 | + * Contact: Alberto Mardegan <alberto.mardegan@canonical.com> |
642 | + * |
643 | + * This program is free software: you can redistribute it and/or modify it |
644 | + * under the terms of the GNU General Public License version 3, as published |
645 | + * by the Free Software Foundation. |
646 | + * |
647 | + * This program is distributed in the hope that it will be useful, but |
648 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
649 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
650 | + * PURPOSE. See the GNU General Public License for more details. |
651 | + * |
652 | + * You should have received a copy of the GNU General Public License along |
653 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
654 | + */ |
655 | + |
656 | +import QtQuick 2.0 |
657 | +import Ubuntu.Components 1.3 |
658 | + |
659 | +UbuntuShape { |
660 | + property alias iconSource: image.source |
661 | + |
662 | + SlotsLayout.position: SlotsLayout.Leading |
663 | + width: units.gu(5) |
664 | + height: width |
665 | + source: Image { |
666 | + id: image |
667 | + anchors.fill: parent |
668 | + sourceSize { width: width; height: height } |
669 | + } |
670 | +} |
671 | |
672 | === modified file 'system-settings-plugin/system-settings-plugin.pro' |
673 | --- system-settings-plugin/system-settings-plugin.pro 2016-06-27 15:50:32 +0000 |
674 | +++ system-settings-plugin/system-settings-plugin.pro 2017-03-16 11:01:46 +0000 |
675 | @@ -33,7 +33,8 @@ |
676 | NoAccountsPage.qml \ |
677 | NormalStartupPage.qml \ |
678 | ProviderPluginList.qml \ |
679 | - ProvidersList.qml |
680 | + ProvidersList.qml \ |
681 | + UbuntuIcon.qml |
682 | |
683 | settings.files = online-accounts.settings |
684 | settings.path = $${PLUGIN_MANIFEST_DIR} |
LGTM