Merge lp:~ken-vandine/ubuntu-system-settings/slotslayout into lp:ubuntu-system-settings

Proposed by Ken VanDine
Status: Merged
Merged at revision: 1678
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/slotslayout
Merge into: lp:ubuntu-system-settings
Prerequisite: lp:~phablet-team/ubuntu-system-settings/settings-listitems
Diff against target: 1513 lines (+456/-377)
16 files modified
plugins/security-privacy/AppAccess.qml (+11/-10)
plugins/security-privacy/AppAccessControl.qml (+7/-6)
plugins/security-privacy/Location.qml (+9/-9)
plugins/security-privacy/LockSecurity.qml (+6/-5)
plugins/security-privacy/PageComponent.qml (+18/-22)
plugins/security-privacy/PhoneLocking.qml (+12/-13)
plugins/security-privacy/SimPin.qml (+14/-13)
plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml (+2/-2)
plugins/security-privacy/diagnostics/PageComponent.qml (+9/-10)
plugins/system-update/CMakeLists.txt (+1/-1)
plugins/system-update/Configuration.qml (+3/-3)
plugins/system-update/EntryComponent.qml (+8/-7)
plugins/system-update/PageComponent.qml (+98/-276)
plugins/system-update/UpdateItem.qml (+251/-0)
plugins/system-update/network.cpp (+2/-0)
plugins/system-update/update.h (+5/-0)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/slotslayout
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Touch System Settings Pending
Review via email: mp+278376@code.launchpad.net

This proposal supersedes a proposal from 2015-11-18.

Commit message

migrating to slotslayout and new designs

Description of the change

migrating to slotslayout and new designs

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1570. By Ken VanDine

merged trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1571. By Ken VanDine

added changelog

1572. By Ken VanDine

Merged stub-update-server branch

1573. By Ken VanDine

merged

1574. By Ken VanDine

Visual improvements and added the dialog to show the changelog info

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/security-privacy/AppAccess.qml'
2--- plugins/security-privacy/AppAccess.qml 2015-09-18 14:18:11 +0000
3+++ plugins/security-privacy/AppAccess.qml 2015-12-09 19:33:29 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright (C) 2013 Canonical Ltd
7+ * Copyright (C) 2013-2015 Canonical Ltd
8 *
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 3 as
11@@ -18,10 +18,11 @@
12 */
13
14 import QtQuick 2.4
15+import SystemSettings 1.0
16+import SystemSettings.ListItems 1.0 as SettingsListItems
17 import Ubuntu.Components 1.3
18-import Ubuntu.Components.ListItems 1.3 as ListItem
19+import Ubuntu.Components.ListItems 1.3 as ListItems
20 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
21-import SystemSettings 1.0
22
23 ItemPage {
24 id: root
25@@ -42,7 +43,7 @@
26 anchors.left: parent.left
27 anchors.right: parent.right
28
29- ListItem.Caption {
30+ ListItems.Caption {
31 text: i18n.tr("Apps that you have granted access to:")
32 }
33
34@@ -68,10 +69,10 @@
35 Repeater {
36 model: appsModel
37
38- ListItem.SingleValue {
39+ SettingsListItems.SingleValueProgression {
40 text: i18n.tr(model.name)
41 enabled: trustStoreModel.count > 0
42- progression: enabled ? true : false
43+ progressionVisible: enabled ? true : false
44 value: trustStoreModel.count > 0 ?
45 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
46 i18n.tr("0")
47@@ -81,19 +82,19 @@
48 "model": trustStoreModel,
49 })
50
51- TrustStoreModel {
52+ resources: TrustStoreModel {
53 id: trustStoreModel
54 serviceName: model.trustStoreService
55 }
56 }
57 }
58
59- ListItem.Caption {
60+ ListItems.Caption {
61 text: i18n.tr("Apps may also request access to online accounts.")
62 }
63
64- ListItem.SingleControl {
65- control: Button {
66+ SettingsListItems.SingleControl {
67+ Button {
68 text: i18n.tr("Online Accounts…")
69 width: parent.width - units.gu(4)
70 onClicked: {
71
72=== modified file 'plugins/security-privacy/AppAccessControl.qml'
73--- plugins/security-privacy/AppAccessControl.qml 2015-08-10 13:31:45 +0000
74+++ plugins/security-privacy/AppAccessControl.qml 2015-12-09 19:33:29 +0000
75@@ -1,5 +1,5 @@
76 /*
77- * Copyright (C) 2013 Canonical Ltd
78+ * Copyright (C) 2013-2015 Canonical Ltd
79 *
80 * This program is free software: you can redistribute it and/or modify
81 * it under the terms of the GNU General Public License version 3 as
82@@ -18,9 +18,10 @@
83 */
84
85 import QtQuick 2.4
86+import SystemSettings 1.0
87+import SystemSettings.ListItems 1.0 as SettingsListItems
88 import Ubuntu.Components 1.3
89-import Ubuntu.Components.ListItems 1.3 as ListItem
90-import SystemSettings 1.0
91+import Ubuntu.Components.ListItems 1.3 as ListItems
92
93 ItemPage {
94 id: root
95@@ -43,17 +44,17 @@
96 anchors.left: parent.left
97 anchors.right: parent.right
98
99- ListItem.Caption {
100+ ListItems.Caption {
101 id: captionLabel
102 }
103
104 Repeater {
105 id: repeater
106
107- ListItem.Standard {
108+ SettingsListItems.Standard {
109 text: model.applicationName
110 iconSource: model.iconName
111- control: Switch {
112+ Switch {
113 id: welcomeStatsSwitch
114 checked: model.granted
115 onClicked: root.model.setEnabled(index, !model.granted)
116
117=== modified file 'plugins/security-privacy/Location.qml'
118--- plugins/security-privacy/Location.qml 2015-09-18 14:18:11 +0000
119+++ plugins/security-privacy/Location.qml 2015-12-09 19:33:29 +0000
120@@ -1,5 +1,5 @@
121 /*
122- * Copyright (C) 2013 Canonical Ltd
123+ * Copyright (C) 2013-2015 Canonical Ltd
124 *
125 * This program is free software: you can redistribute it and/or modify
126 * it under the terms of the GNU General Public License version 3 as
127@@ -22,10 +22,11 @@
128 import QMenuModel 0.1
129 import Qt.labs.folderlistmodel 2.1
130 import QtQuick 2.4
131+import SystemSettings 1.0
132+import SystemSettings.ListItems 1.0 as SettingsListItems
133 import Ubuntu.Components 1.3
134-import Ubuntu.Components.ListItems 1.3 as ListItem
135+import Ubuntu.Components.ListItems 1.3 as ListItems
136 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
137-import SystemSettings 1.0
138
139 ItemPage {
140 id: locationPage
141@@ -94,7 +95,7 @@
142 text: i18n.tr("Let the phone detect your location:")
143 }
144
145- ListItem.ItemSelector {
146+ ListItems.ItemSelector {
147 id: detection
148
149 /* Helper that toggles location detection and HERE based on
150@@ -199,7 +200,7 @@
151 }
152 }
153
154- ListItem.Caption {
155+ ListItems.Caption {
156 /* TODO: replace by real info from the location service */
157 property int locationInfo: 0
158
159@@ -235,10 +236,10 @@
160
161 Repeater {
162 model: trustStoreModel
163- ListItem.Standard {
164+ SettingsListItems.Icon {
165 text: model.applicationName
166 iconSource: model.iconName
167- control: Switch {
168+ Switch {
169 checked: model.granted
170 onClicked: trustStoreModel.setEnabled(index, !model.granted)
171 }
172@@ -246,12 +247,11 @@
173 }
174 }
175
176- ListItem.Standard {
177+ SettingsListItems.Standard {
178 text: i18n.tr("None requested")
179 visible: trustStoreModel.count === 0
180 enabled: false
181 }
182 }
183-
184 }
185 }
186
187=== modified file 'plugins/security-privacy/LockSecurity.qml'
188--- plugins/security-privacy/LockSecurity.qml 2015-08-10 13:31:45 +0000
189+++ plugins/security-privacy/LockSecurity.qml 2015-12-09 19:33:29 +0000
190@@ -21,11 +21,12 @@
191 import GSettings 1.0
192 import QtQuick 2.4
193 import QtQuick.Layouts 1.1
194+import SystemSettings 1.0
195+import SystemSettings.ListItems 1.0 as SettingsListItems
196 import Ubuntu.Components 1.3
197-import Ubuntu.Components.ListItems 1.3 as ListItem
198+import Ubuntu.Components.ListItems 1.3 as ListItems
199 import Ubuntu.Components.Popups 1.3
200 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
201-import SystemSettings 1.0
202
203 ItemPage {
204 id: page
205@@ -445,7 +446,7 @@
206 text: i18n.tr("Unlock the phone using:")
207 }
208
209- ListItem.ItemSelector {
210+ ListItems.ItemSelector {
211 property string swipe: i18n.tr("Swipe (no security)")
212 property string passcode: i18n.tr("4-digit passcode")
213 property string passphrase: i18n.tr("Passphrase")
214@@ -487,13 +488,13 @@
215 value: methodToIndex(securityPrivacy.securityType)
216 }
217
218- ListItem.SingleControl {
219+ SettingsListItems.SingleControl {
220
221 id: changeControl
222 visible: securityPrivacy.securityType !==
223 UbuntuSecurityPrivacyPanel.Swipe
224
225- control: Button {
226+ Button {
227 property string changePasscode: i18n.tr("Change passcode…")
228 property string changePassphrase: i18n.tr("Change passphrase…")
229
230
231=== modified file 'plugins/security-privacy/PageComponent.qml'
232--- plugins/security-privacy/PageComponent.qml 2015-10-16 13:42:50 +0000
233+++ plugins/security-privacy/PageComponent.qml 2015-12-09 19:33:29 +0000
234@@ -1,7 +1,7 @@
235 /*
236 * This file is part of system-settings
237 *
238- * Copyright (C) 2013 Canonical Ltd.
239+ * Copyright (C) 2013-2015 Canonical Ltd.
240 *
241 * Contact: Evan Dandrea <evan.dandrea@canonical.com>
242 *
243@@ -21,8 +21,9 @@
244 import GSettings 1.0
245 import QMenuModel 0.1
246 import QtQuick 2.4
247+import SystemSettings.ListItems 1.0 as SettingsListItems
248 import Ubuntu.Components 1.3
249-import Ubuntu.Components.ListItems 1.3 as ListItem
250+import Ubuntu.Components.ListItems 1.3 as ListItems
251 import SystemSettings 1.0
252 import Ubuntu.SystemSettings.Battery 1.0
253 import Ubuntu.SystemSettings.Diagnostics 1.0
254@@ -110,18 +111,17 @@
255 anchors.left: parent.left
256 anchors.right: parent.right
257
258- ListItem.Header {
259+ SettingsItemTitle {
260 id: securityTitle
261 text: i18n.tr("Security")
262 }
263- ListItem.SingleValue {
264+ SettingsListItems.SingleValueProgression {
265 id: lockingControl
266 objectName: "lockingControl"
267- text: i18n.tr("Locking and unlocking")
268- progression: true
269+ text: i18n.tr("Screen Lock")
270 onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {usePowerd: usePowerd, powerSettings: powerSettings})
271 }
272- ListItem.SingleValue {
273+ SettingsListItems.SingleValueProgression {
274 id: simControl
275 objectName: "simControl"
276 text: i18n.tr("SIM PIN")
277@@ -134,28 +134,27 @@
278 return i18n.tr("Off");
279 }
280 visible: simsPresent > 0
281- progression: true
282 onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims })
283 }
284- ListItem.Standard {
285+ SettingsListItems.Standard {
286 text: i18n.tr("Encryption")
287- control: Switch {
288+ Switch {
289 id: encryptionSwitch
290 checked: false
291 }
292 visible: showAllUI
293 }
294- ListItem.Caption {
295+ ListItems.Caption {
296 text: i18n.tr(
297 "Encryption protects against access to phone data when the phone is connected to a PC or other device.")
298 visible: showAllUI
299 }
300- ListItem.Header {
301+ SettingsItemTitle {
302 text: i18n.tr("Privacy")
303 }
304- ListItem.Standard {
305+ SettingsListItems.Standard {
306 text: i18n.tr("Stats on welcome screen")
307- control: Switch {
308+ Switch {
309 property bool serverChecked: securityPrivacy.statsWelcomeScreen
310 onServerCheckedChanged: checked = serverChecked
311 Component.onCompleted: checked = serverChecked
312@@ -163,9 +162,9 @@
313 }
314 }
315
316- ListItem.Standard {
317+ SettingsListItems.Standard {
318 text: i18n.tr("Messages on welcome screen")
319- control: Switch {
320+ Switch {
321 property bool serverChecked: securityPrivacy.messagesWelcomeScreen
322 onServerCheckedChanged: checked = serverChecked
323 Component.onCompleted: checked = serverChecked
324@@ -184,12 +183,11 @@
325
326 Component.onCompleted: start()
327 }
328- ListItem.SingleValue {
329+ SettingsListItems.SingleValueProgression {
330 id: locationItem
331 objectName: "locationItem"
332 text: i18n.tr("Location")
333 value: ""
334- progression: true
335 onClicked: pageStack.push(Qt.resolvedUrl("Location.qml"))
336 visible: true
337 enabled: true
338@@ -204,14 +202,12 @@
339 property: "locationEnabled"
340 value: locationActionGroup.enabled.state
341 }
342- ListItem.SingleValue {
343+ SettingsListItems.SingleValueProgression {
344 text: i18n.tr("App permissions")
345- progression: true
346 onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
347 }
348- ListItem.SingleValue {
349+ SettingsListItems.SingleValueProgression {
350 text: i18n.tr("Diagnostics")
351- progression: true
352 value: diagnosticsWidget.reportCrashes ?
353 /* TRANSLATORS: This string is shown when crash
354 reports are to be sent by the system. */
355
356=== modified file 'plugins/security-privacy/PhoneLocking.qml'
357--- plugins/security-privacy/PhoneLocking.qml 2015-09-18 14:18:11 +0000
358+++ plugins/security-privacy/PhoneLocking.qml 2015-12-09 19:33:29 +0000
359@@ -1,7 +1,7 @@
360 /*
361 * This file is part of system-settings
362 *
363- * Copyright (C) 2013 Canonical Ltd.
364+ * Copyright (C) 2013-2015 Canonical Ltd.
365 *
366 * Contact: Iain Lane <iain.lane@canonical.com>
367 *
368@@ -21,8 +21,9 @@
369 import GSettings 1.0
370 import QtQuick 2.4
371 import SystemSettings 1.0
372+import SystemSettings.ListItems 1.0 as SettingsListItems
373 import Ubuntu.Components 1.3
374-import Ubuntu.Components.ListItems 1.3 as ListItem
375+import Ubuntu.Components.ListItems 1.3 as ListItems
376 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
377
378 ItemPage {
379@@ -52,7 +53,7 @@
380 anchors.left: parent.left
381 anchors.right: parent.right
382
383- ListItem.SingleValue {
384+ SettingsListItems.SingleValueProgression {
385 property string swipe: i18n.ctr("Unlock with swipe", "None")
386 property string passcode: i18n.tr("Passcode")
387 property string passphrase: i18n.tr("Passphrase")
388@@ -69,11 +70,10 @@
389 return passphrase
390 }
391 }
392- progression: true
393 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
394 }
395
396- ListItem.SingleValue {
397+ SettingsListItems.SingleValueProgression {
398 objectName: "lockTimeout"
399 property bool lockOnSuspend: securityPrivacy.securityType !==
400 UbuntuSecurityPrivacyPanel.Swipe
401@@ -99,15 +99,14 @@
402 i18n.tr("Never")
403 }
404 }
405- progression: true
406 onClicked:
407 pageStack.push(
408 Qt.resolvedUrl("../battery/SleepValues.qml"),
409 { title: text, lockOnSuspend: lockOnSuspend } )
410 }
411
412- ListItem.Standard {
413- control: CheckBox {
414+ SettingsListItems.Standard {
415+ CheckBox {
416 checked: true
417 }
418 text: i18n.tr("Sleep locks immediately")
419@@ -118,9 +117,9 @@
420 text: i18n.tr("When locked, allow:")
421 }
422
423- ListItem.Standard {
424+ SettingsListItems.Standard {
425 text: i18n.tr("Launcher")
426- control: CheckBox {
427+ CheckBox {
428 id: launcherCheck
429 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
430
431@@ -131,9 +130,9 @@
432 }
433 }
434
435- ListItem.Standard {
436+ SettingsListItems.Standard {
437 text: i18n.tr("Notifications and quick settings")
438- control: CheckBox {
439+ CheckBox {
440 id: indicatorsCheck
441 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
442
443@@ -144,7 +143,7 @@
444 }
445 }
446
447- ListItem.Caption {
448+ ListItems.Caption {
449 text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?
450 i18n.tr("Turn on lock security to restrict access when the phone is locked.") :
451 i18n.tr("Other apps and functions will prompt you to unlock.")
452
453=== modified file 'plugins/security-privacy/SimPin.qml'
454--- plugins/security-privacy/SimPin.qml 2015-08-10 13:31:45 +0000
455+++ plugins/security-privacy/SimPin.qml 2015-12-09 19:33:29 +0000
456@@ -19,14 +19,15 @@
457 */
458
459 import GSettings 1.0
460+import MeeGo.QOfono 0.2
461 import QtQuick 2.4
462 import QtQuick.Layouts 1.1
463+import SystemSettings 1.0
464+import SystemSettings.ListItems 1.0 as SettingsListItems
465 import Ubuntu.Components 1.3
466-import Ubuntu.Components.ListItems 1.3 as ListItem
467+import Ubuntu.Components.ListItems 1.3 as ListItems
468 import Ubuntu.Components.Popups 1.3
469-import SystemSettings 1.0
470 import Ubuntu.SystemSettings.SecurityPrivacy 1.0
471-import MeeGo.QOfono 0.2
472 import "sims.js" as Sims
473
474
475@@ -388,14 +389,14 @@
476 }
477 }
478
479- ListItem.Standard {
480+ SettingsListItems.Standard {
481 text: sims[index].title
482 visible: sims.length > 1
483 }
484
485- ListItem.Standard {
486+ SettingsListItems.Standard {
487 text: i18n.tr("SIM PIN")
488- control: Switch {
489+ Switch {
490 id: simPinSwitch
491 objectName: "simPinSwitch"
492 checked: sims[index].simMng.lockedPins.length > 0
493@@ -406,11 +407,11 @@
494 }
495 }
496
497- ListItem.Standard {
498+ SettingsListItems.Standard {
499 id: changeControl
500 visible: sim.state === "unlocked"
501 text: i18n.tr("Unlocked")
502- control: Button {
503+ Button {
504 enabled: parent.visible
505 text: i18n.tr("Change PIN…")
506 onClicked: {
507@@ -420,11 +421,11 @@
508 }
509 }
510
511- ListItem.Standard {
512+ SettingsListItems.Standard {
513 id: lockControl
514 visible: sim.state === "locked"
515 text: i18n.tr("Locked")
516- control: Button {
517+ Button {
518 objectName: "unlock"
519 enabled: sims[index].simMng.pinRequired !== 'none'
520 text: i18n.tr("Unlock…")
521@@ -433,18 +434,18 @@
522 }
523 }
524
525- ListItem.Divider {
526+ ListItems.Divider {
527 visible: index < (sims.length - 1)
528 }
529
530 }
531 }
532
533- ListItem.Caption {
534+ ListItems.Caption {
535 text: i18n.tr("When a SIM PIN is set, it must be entered to access cellular services after restarting the phone or swapping the SIM.")
536 }
537
538- ListItem.Caption {
539+ ListItems.Caption {
540 text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")
541 }
542 }
543
544=== modified file 'plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml'
545--- plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml 2015-08-10 13:31:45 +0000
546+++ plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml 2015-12-09 19:33:29 +0000
547@@ -20,9 +20,9 @@
548
549 import QtQuick 2.4
550 import Ubuntu.Components 1.3
551-import Ubuntu.Components.ListItems 1.3 as ListItem
552+import Ubuntu.Components.ListItems 1.3 as ListItems
553
554-ListItem.Base {
555+ListItems.Base {
556 property string textEntry: "";
557 property alias checked: checkBox.checked;
558 onClicked: checked = !checked;
559
560=== modified file 'plugins/security-privacy/diagnostics/PageComponent.qml'
561--- plugins/security-privacy/diagnostics/PageComponent.qml 2015-10-16 13:42:50 +0000
562+++ plugins/security-privacy/diagnostics/PageComponent.qml 2015-12-09 19:33:29 +0000
563@@ -20,8 +20,9 @@
564
565 import QtQuick 2.4
566 import SystemSettings 1.0
567+import SystemSettings.ListItems 1.0 as SettingsListItems
568 import Ubuntu.Components 1.3
569-import Ubuntu.Components.ListItems 1.3 as ListItem
570+import Ubuntu.Components.ListItems 1.3 as ListItems
571 import Ubuntu.SystemSettings.Diagnostics 1.0
572
573 ItemPage {
574@@ -54,15 +55,14 @@
575 anchors.left: parent.left
576 anchors.right: parent.right
577
578- ListItem.SingleValue {
579+ SettingsListItems.SingleValueProgression {
580 text: i18n.tr("Privacy policy")
581- progression: true
582 onClicked: {
583 Qt.openUrlExternally("http://www.ubuntu.com/aboutus/privacypolicy?crashdb")
584 }
585 }
586
587- ListItem.Standard {
588+ SettingsListItems.Standard {
589 text: i18n.tr("Report to Canonical:")
590 }
591
592@@ -80,20 +80,19 @@
593 textEntry: i18n.tr("App crashes and errors")
594 }
595
596- ListItem.SingleValue {
597+ SettingsListItems.SingleValueProgression {
598 id: previousReports
599 property string ident: diagnosticsWidget.systemIdentifier()
600 text: i18n.tr("Previous error reports")
601- progression: previousReports.ident != ""
602+ enabled: previousReports.ident != ""
603+ progressionVisible: enabled
604 onClicked: {
605 var base = "https://errors.ubuntu.com/user/"
606- if (previousReports.progression) {
607- Qt.openUrlExternally(base + ident)
608- }
609+ Qt.openUrlExternally(base + ident)
610 }
611 }
612
613- ListItem.Caption {
614+ ListItems.Caption {
615 text: i18n.tr("Includes info about what an app was doing when it failed.")
616 }
617 }
618
619=== modified file 'plugins/system-update/CMakeLists.txt'
620--- plugins/system-update/CMakeLists.txt 2015-08-26 16:35:05 +0000
621+++ plugins/system-update/CMakeLists.txt 2015-12-09 19:33:29 +0000
622@@ -1,4 +1,4 @@
623-set(QML_SOURCES PageComponent.qml Configuration.qml)
624+set(QML_SOURCES PageComponent.qml Configuration.qml UpdateItem.qml)
625 SET (CMAKE_AUTOMOC ON)
626
627 add_library(UbuntuUpdatePanel MODULE plugin.h plugin.cpp
628
629=== modified file 'plugins/system-update/Configuration.qml'
630--- plugins/system-update/Configuration.qml 2015-08-10 13:31:45 +0000
631+++ plugins/system-update/Configuration.qml 2015-12-09 19:33:29 +0000
632@@ -1,7 +1,7 @@
633 /*
634 * This file is part of system-settings
635 *
636- * Copyright (C) 2013-2014 Canonical Ltd.
637+ * Copyright (C) 2013-2015 Canonical Ltd.
638 *
639 * This program is free software: you can redistribute it and/or modify it
640 * under the terms of the GNU General Public License version 3, as published
641@@ -19,7 +19,7 @@
642 import QtQuick 2.4
643 import SystemSettings 1.0
644 import Ubuntu.Components 1.3
645-import Ubuntu.Components.ListItems 1.3 as ListItem
646+import Ubuntu.Components.ListItems 1.3 as ListItems
647 import Ubuntu.SystemSettings.Update 1.0
648
649
650@@ -28,7 +28,7 @@
651 objectName: "configurationPage"
652 title: i18n.tr("Auto download")
653
654- ListItem.ItemSelector {
655+ ListItems.ItemSelector {
656 id: upgradePolicySelector
657 expanded: true
658 text: i18n.tr ("Download future updates automatically:")
659
660=== modified file 'plugins/system-update/EntryComponent.qml'
661--- plugins/system-update/EntryComponent.qml 2015-08-10 13:31:45 +0000
662+++ plugins/system-update/EntryComponent.qml 2015-12-09 19:33:29 +0000
663@@ -1,7 +1,7 @@
664 /*
665 * This file is part of system-settings
666 *
667- * Copyright (C) 2014 Canonical Ltd.
668+ * Copyright (C) 2014-2015 Canonical Ltd.
669 *
670 * Contact: Diego Sarmentero <diego.sarmentero@canonical.com>
671 *
672@@ -19,18 +19,15 @@
673 */
674
675 import QtQuick 2.4
676+import SystemSettings.ListItems 1.0 as SettingsListItems
677 import Ubuntu.Components 1.3
678-import Ubuntu.Components.ListItems 1.3 as ListItem
679 import Ubuntu.SystemSettings.Update 1.0
680
681-ListItem.SingleValue {
682+SettingsListItems.IconProgression {
683 id: root
684 text: i18n.tr(model.displayName)
685 objectName: "entryComponent-updates"
686 iconSource: Qt.resolvedUrl(model.icon)
687- iconFrame: false
688- progression: true
689- value: updatesAvailable > 0 ? updatesAvailable : ""
690
691 property int updatesAvailable: 0
692
693@@ -43,7 +40,7 @@
694 updatesAvailable = _updatesAvailable;
695 }
696
697- Connections {
698+ resources: Connections {
699 id: updateManager
700 objectName: "updateManager"
701 target: UpdateManager
702@@ -52,4 +49,8 @@
703 }
704
705 onClicked: main.loadPluginByName("system-update");
706+ Label {
707+ SlotsLayout.position: SlotsLayout.Trailing
708+ text: updatesAvailable > 0 ? updatesAvailable : ""
709+ }
710 }
711
712=== modified file 'plugins/system-update/PageComponent.qml'
713--- plugins/system-update/PageComponent.qml 2015-11-03 16:26:27 +0000
714+++ plugins/system-update/PageComponent.qml 2015-12-09 19:33:29 +0000
715@@ -22,8 +22,9 @@
716 import QMenuModel 0.1
717 import QtQuick 2.4
718 import SystemSettings 1.0
719+import SystemSettings.ListItems 1.0 as SettingsListItems
720 import Ubuntu.Components 1.3
721-import Ubuntu.Components.ListItems 1.3 as ListItem
722+import Ubuntu.Components.ListItems 1.3 as ListItems
723 import Ubuntu.Components.Popups 1.3
724 import Ubuntu.OnlineAccounts.Client 0.1
725 import Ubuntu.SystemSettings.Update 1.0
726@@ -99,7 +100,7 @@
727 Button {
728 text: i18n.tr("Restart & Install")
729 visible: root.batterySafeForUpdate ? true : false
730- color: UbuntuColors.orange
731+ color: UbuntuColors.green
732 onClicked: {
733 installingImageUpdate.visible = true;
734 UpdateManager.applySystemUpdate();
735@@ -108,12 +109,12 @@
736 }
737 Button {
738 text: i18n.tr("Cancel")
739- color: UbuntuColors.warmGrey
740+ color: UbuntuColors.lightGrey
741 onClicked: {
742 updateList.currentIndex = 0;
743 var item = updateList.currentItem;
744 var modelItem = UpdateManager.model[0];
745- item.actionButton.text = i18n.tr("Install");
746+ item.actionButton.text = i18n.tr("Update");
747 item.progressBar.opacity = 0;
748 modelItem.updateReady = true;
749 modelItem.selected = false;
750@@ -133,7 +134,7 @@
751
752 Button {
753 text: i18n.tr("OK")
754- color: UbuntuColors.orange
755+ color: UbuntuColors.green
756 onClicked: {
757 PopupUtils.close(dialogueError);
758 }
759@@ -261,10 +262,9 @@
760 }
761 height: childrenRect.height
762
763- ListItem.Base {
764+ ListItems.Base {
765 id: checkForUpdatesArea
766 objectName: "checkForUpdatesArea"
767- showDivider: false
768 visible: false
769
770 ActivityIndicator {
771@@ -293,20 +293,18 @@
772 }
773 }
774
775- ListItem.SingleControl {
776+ SettingsListItems.SingleValue {
777 height: installAllButton.visible ? units.gu(8) : units.gu(2)
778 highlightWhenPressed: false
779- control: Button {
780+ text: includeSystemUpdate ?
781+ i18n.tr("%1 update available", "%1 updates available", root.updatesAvailable).arg(root.updatesAvailable) :
782+ i18n.tr("%1 update available", "%1 updates available", root.updatesAvailable).arg(root.updatesAvailable)
783+ Button {
784 id: installAllButton
785 objectName: "installAllButton"
786- property string primaryText: includeSystemUpdate ?
787- i18n.tr("Install %1 update…", "Install %1 updates…", root.updatesAvailable).arg(root.updatesAvailable) :
788- i18n.tr("Install %1 update", "Install %1 updates", root.updatesAvailable).arg(root.updatesAvailable)
789- property string secondaryText: i18n.tr("Pause All")
790- color: UbuntuColors.orange
791- text: root.installAll ? secondaryText : primaryText
792- width: parent.width - units.gu(4)
793-
794+ SlotsLayout.position: SlotsLayout.Trailing
795+ color: UbuntuColors.green
796+ text: root.installAll ? i18n.tr("Pause all") : i18n.tr("Update all")
797 onClicked: {
798 for (var i=0; i < updateList.count; i++) {
799 updateList.currentIndex = i;
800@@ -339,7 +337,6 @@
801 root.installAll = !root.installAll;
802 }
803 }
804- showDivider: false
805 }
806
807 ListView {
808@@ -354,270 +351,95 @@
809 interactive: false
810 spacing: 0
811
812- delegate: ListItem.Subtitled {
813- id: listItem
814- anchors {
815- left: parent.left
816- right: parent.right
817- topMargin: units.gu(1)
818- bottomMargin: units.gu(1)
819+ delegate: UpdateItem {
820+ id: updateItem
821+ updateData: modelData
822+ tracker: DownloadTracker {
823+ id: tracker
824+ objectName: "tracker"
825+ packageName: updateData.packageName
826+ clickToken: updateData.clickToken
827+ download: updateData.downloadUrl
828+ downloadSha512: updateData.downloadSha512
829+
830+ onFinished: {
831+ updateItem.progress.visible = false;
832+ updateItem.buttonAppUpdate.visible = false;
833+ updateItem.installed = true;
834+ updateItem.installing = false;
835+ root.updatesAvailable -= 1;
836+ updateData.updateRequired = false;
837+ UpdateManager.updateClickScope();
838+ }
839+
840+ onProcessing: {
841+ console.warn("onProcessing: " + updateData.packageName + " " + path);
842+ updateItem.buttonAppUpdate.enabled = false;
843+ updateItem.installing = true;
844+ updateData.updateState = false;
845+ }
846+
847+ onStarted: {
848+ console.warn("onStarted: " + updateData.packageName + " " + success);
849+ if (success)
850+ updateData.updateState = true;
851+ else
852+ updateData.updateState = false;
853+ }
854+
855+ onPaused: {
856+ console.warn("onPaused: " + updateData.packageName + " " + success);
857+ if (success)
858+ updateData.updateState = false;
859+ else
860+ updateData.updateState = true;
861+ }
862+
863+ onResumed: {
864+ console.warn("onResumed: " + updateData.packageName + " " + success);
865+ if (success)
866+ updateData.updateState = true;
867+ else
868+ updateData.updateState = false;
869+ }
870+
871+ onCanceled: {
872+ console.warn("onCanceled: " + updateData.packageName + " " + success);
873+ if (success) {
874+ updateData.updateState = false;
875+ updateData.selected = false;
876+ }
877+ }
878+
879+ onErrorFound: {
880+ console.warn("onErrorFound: " + updateData.packageName + " " + error);
881+ updateData.updateState = false;
882+ updateItem.retry = true;
883+ updateItem.installing = false;
884+ }
885 }
886- iconSource: Qt.resolvedUrl(modelData.iconUrl)
887- iconFrame: modelData.systemUpdate ? false : true
888- height: visible ? textArea.height + units.gu(2) : 0
889- highlightWhenPressed: false
890- showDivider: false
891- visible: opacity > 0
892- opacity: installed ? 0 : 1
893- Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
894-
895- property alias actionButton: buttonAppUpdate
896- property alias progressBar: progress
897- property bool installing: !modelData.systemUpdate && (modelData.updateReady || (progressBar.value === progressBar.maximumValue))
898- property bool installed: false
899- property bool retry: false
900-
901+
902 function pause () {
903- console.warn("PAUSE: " + modelData.packageName);
904- if (modelData.systemUpdate)
905- return UpdateManager.pauseDownload(modelData.packageName);
906- modelData.updateState = false;
907+ console.warn("PAUSE: " + updateData.packageName);
908+ if (updateData.systemUpdate)
909+ return UpdateManager.pauseDownload(updateData.packageName);
910+ updateData.updateState = false;
911 tracker.pause();
912 }
913
914 function resume () {
915- console.warn("RESUME: " + modelData.packageName);
916- if (modelData.systemUpdate)
917- return UpdateManager.startDownload(modelData.packageName);
918- modelData.updateState = true;
919+ console.warn("RESUME: " + updateData.packageName);
920+ if (updateData.systemUpdate)
921+ return UpdateManager.startDownload(updateData.packageName);
922+ updateData.updateState = true;
923 tracker.resume();
924 }
925
926 function start () {
927- console.warn("START: " + modelData.packageName);
928- modelData.selected = true;
929- modelData.updateState = true;
930- UpdateManager.startDownload(modelData.packageName);
931- }
932- Column {
933- id: textArea
934- objectName: "textArea"
935- anchors {
936- left: parent.left
937- right: parent.right
938- }
939- spacing: units.gu(0.5)
940-
941- Item {
942- anchors {
943- left: parent.left
944- right: parent.right
945- }
946- height: buttonAppUpdate.height
947-
948- Label {
949- id: labelTitle
950- objectName: "labelTitle"
951- anchors {
952- left: parent.left
953- right: buttonAppUpdate.visible ? buttonAppUpdate.left : parent.right
954- verticalCenter: parent.verticalCenter
955- }
956- text: modelData.title
957- font.bold: true
958- elide: Text.ElideMiddle
959- }
960-
961- Button {
962- id: buttonAppUpdate
963- objectName: "buttonAppUpdate"
964- anchors.right: parent.right
965- height: labelTitle.height + units.gu(1)
966- enabled: !installing
967- text: {
968- if (retry)
969- return i18n.tr("Retry");
970- if (modelData.systemUpdate) {
971- if (modelData.updateReady) {
972- return i18n.tr("Install…");
973- } else if (!modelData.updateState && !modelData.selected) {
974- return i18n.tr("Download");
975- }
976- }
977- if (modelData.updateState) {
978- return i18n.tr("Pause");
979- } else if (modelData.selected) {
980- return i18n.tr("Resume");
981- }
982- return i18n.tr("Update");
983- }
984-
985- onClicked: {
986- if (retry) {
987- retry = false;
988- return UpdateManager.retryDownload(modelData.packageName);
989- }
990- if (modelData.updateState)
991- return pause();
992- if (!modelData.updateState && modelData.selected)
993- return resume();
994- if (!modelData.updateState && !modelData.selected && !modelData.updateReady)
995- return start();
996- if (modelData.updateReady)
997- PopupUtils.open(dialogInstallComponent);
998- }
999- }
1000- }
1001-
1002- Item {
1003- id: labelUpdateStatus
1004- anchors {
1005- left: parent.left
1006- right: parent.right
1007- }
1008- height: childrenRect.height
1009- visible: opacity > 0
1010- opacity: (modelData.updateState && modelData.selected && !modelData.updateReady) || (installing || installed) ? 1 : 0
1011- Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
1012- Label {
1013- objectName: "labelUpdateStatus"
1014- anchors.left: parent.left
1015- anchors.right: updateStatusLabel.left
1016- elide: Text.ElideMiddle
1017- fontSize: "small"
1018- text: {
1019- if (retry)
1020- return modelData.error;
1021- if (installing)
1022- return i18n.tr("Installing");
1023- if (installed)
1024- return i18n.tr("Installed");
1025- return i18n.tr("Downloading");
1026- }
1027- }
1028- Label {
1029- id: updateStatusLabel
1030- anchors.right: parent.right
1031- visible: !labelSize.visible && !installing && !installed
1032- fontSize: "small"
1033- text: {
1034- if (!labelUpdateStatus.visible)
1035- return Utilities.formatSize(modelData.binaryFilesize);
1036-
1037- return i18n.tr("%1 of %2").arg(
1038- Utilities.formatSize(modelData.binaryFilesize * (progress.value * 0.01))).arg(
1039- Utilities.formatSize(modelData.binaryFilesize)
1040- );
1041- }
1042- }
1043- }
1044-
1045- ProgressBar {
1046- id: progress
1047- objectName: "progress"
1048- height: units.gu(2)
1049- anchors {
1050- left: parent.left
1051- right: parent.right
1052- }
1053- visible: opacity > 0
1054- opacity: modelData.selected && !modelData.updateReady && !installed ? 1 : 0
1055- value: modelData.systemUpdate ? modelData.downloadProgress : tracker.progress
1056- minimumValue: 0
1057- maximumValue: 100
1058-
1059- DownloadTracker {
1060- id: tracker
1061- objectName: "tracker"
1062- packageName: modelData.packageName
1063- clickToken: modelData.clickToken
1064- download: modelData.downloadUrl
1065- downloadSha512: modelData.downloadSha512
1066-
1067- onFinished: {
1068- progress.visible = false;
1069- buttonAppUpdate.visible = false;
1070- installed = true;
1071- installing = false;
1072- root.updatesAvailable -= 1;
1073- modelData.updateRequired = false;
1074- UpdateManager.updateClickScope();
1075- }
1076-
1077- onProcessing: {
1078- console.warn("onProcessing: " + modelData.packageName + " " + path);
1079- buttonAppUpdate.enabled = false;
1080- installing = true;
1081- modelData.updateState = false;
1082- }
1083-
1084- onStarted: {
1085- console.warn("onStarted: " + modelData.packageName + " " + success);
1086- if (success)
1087- modelData.updateState = true;
1088- else
1089- modelData.updateState = false;
1090- }
1091-
1092- onPaused: {
1093- console.warn("onPaused: " + modelData.packageName + " " + success);
1094- if (success)
1095- modelData.updateState = false;
1096- else
1097- modelData.updateState = true;
1098- }
1099-
1100- onResumed: {
1101- console.warn("onResumed: " + modelData.packageName + " " + success);
1102- if (success)
1103- modelData.updateState = true;
1104- else
1105- modelData.updateState = false;
1106- }
1107-
1108- onCanceled: {
1109- console.warn("onCanceled: " + modelData.packageName + " " + success);
1110- if (success) {
1111- modelData.updateState = false;
1112- modelData.selected = false;
1113- }
1114- }
1115-
1116- onErrorFound: {
1117- console.warn("onErrorFound: " + modelData.packageName + " " + error);
1118- modelData.updateState = false;
1119- retry = true;
1120- installing = false;
1121- }
1122- }
1123-
1124- Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
1125- }
1126-
1127- Item {
1128- anchors {
1129- left: parent.left
1130- right: parent.right
1131- }
1132- height: childrenRect.height
1133- Label {
1134- id: labelVersion
1135- objectName: "labelVersion"
1136- anchors.left: parent.left
1137- text: modelData.remoteVersion ? i18n.tr("Version: ") + modelData.remoteVersion : ""
1138- elide: Text.ElideRight
1139- fontSize: "small"
1140- }
1141-
1142- Label {
1143- id: labelSize
1144- objectName: "labelSize"
1145- anchors.right: parent.right
1146- text: Utilities.formatSize(modelData.binaryFilesize)
1147- fontSize: "small"
1148- visible: !labelUpdateStatus.visible && !installing && !installed
1149- }
1150- }
1151+ console.warn("START: " + updateData.packageName);
1152+ updateData.selected = true;
1153+ updateData.updateState = true;
1154+ UpdateManager.startDownload(updateData.packageName);
1155 }
1156 }
1157 }
1158@@ -633,7 +455,7 @@
1159 left: parent.left
1160 right: parent.right
1161 }
1162- ListItem.ThinDivider {}
1163+ ListItems.ThinDivider {}
1164
1165 Label {
1166 text: i18n.tr("Sign in to Ubuntu One to receive updates for apps.")
1167@@ -652,6 +474,7 @@
1168 leftMargin: units.gu(2)
1169 rightMargin: units.gu(2)
1170 }
1171+ color: UbuntuColors.lightGrey
1172 onClicked: uoaConfig.exec()
1173 }
1174
1175@@ -727,8 +550,8 @@
1176 anchors.bottom: parent.bottom
1177 anchors.left: parent.left
1178 anchors.right: parent.right
1179- ListItem.ThinDivider {}
1180- ListItem.SingleValue {
1181+ ListItems.ThinDivider {}
1182+ SettingsListItems.SingleValueProgression {
1183 objectName: "configuration"
1184 text: i18n.tr("Auto download")
1185 value: {
1186@@ -739,7 +562,6 @@
1187 else if (UpdateManager.downloadMode === 2)
1188 return i18n.tr("Always")
1189 }
1190- progression: true
1191 onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml"))
1192 }
1193 }
1194
1195=== added file 'plugins/system-update/UpdateItem.qml'
1196--- plugins/system-update/UpdateItem.qml 1970-01-01 00:00:00 +0000
1197+++ plugins/system-update/UpdateItem.qml 2015-12-09 19:33:29 +0000
1198@@ -0,0 +1,251 @@
1199+/*
1200+ * This file is part of system-settings
1201+ *
1202+ * Copyright (C) 2015 Canonical Ltd.
1203+ *
1204+ * This program is free software: you can redistribute it and/or modify it
1205+ * under the terms of the GNU General Public License version 3, as published
1206+ * by the Free Software Foundation.
1207+ *
1208+ * This program is distributed in the hope that it will be useful, but
1209+ * WITHOUT ANY WARRANTY; without even the implied warranties of
1210+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1211+ * PURPOSE. See the GNU General Public License for more details.
1212+ *
1213+ * You should have received a copy of the GNU General Public License along
1214+ * with this program. If not, see <http://www.gnu.org/licenses/>.
1215+ */
1216+
1217+import QtQuick 2.4
1218+import Ubuntu.Components 1.3
1219+import Ubuntu.Components.Popups 1.3
1220+
1221+ListItem {
1222+ id: updateItem
1223+ property alias actionButton: buttonAppUpdate
1224+ property alias progressBar: progress
1225+ property variant updateData
1226+ property variant tracker
1227+ property bool installing: !updateData.systemUpdate && (updateData.updateReady || (progressBar.value === progressBar.maximumValue))
1228+ property bool installed: false
1229+ property bool retry: false
1230+ height: layout.height + divider.height
1231+
1232+ SlotsLayout {
1233+ id: layout
1234+ padding {
1235+ top: units.gu(1)
1236+ bottom: units.gu(1)
1237+ }
1238+ visible: opacity > 0
1239+ opacity: installed ? 0 : 1
1240+ Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
1241+
1242+ UbuntuShape {
1243+ SlotsLayout.position: SlotsLayout.Leading
1244+ width: units.gu(4)
1245+ height: width
1246+ source: Image {
1247+ anchors.fill: parent
1248+ source: Qt.resolvedUrl(updateData.iconUrl)
1249+ }
1250+ aspect: updateData.systemUpdate ? UbuntuShape.Flat : UbuntuShape.Inset
1251+ }
1252+
1253+ Column {
1254+ SlotsLayout.position: SlotsLayout.Trailing
1255+ width: buttonAppUpdate.width
1256+
1257+ Button {
1258+ id: buttonAppUpdate
1259+ objectName: "buttonAppUpdate"
1260+ anchors {
1261+ right: parent.right
1262+ }
1263+ height: labelTitle.height + units.gu(1)
1264+ enabled: !installing
1265+ text: {
1266+ if (retry)
1267+ return i18n.tr("Retry");
1268+ if (updateData.systemUpdate) {
1269+ if (updateData.updateReady) {
1270+ return i18n.tr("Update");
1271+ } else if (!updateData.updateState && !updateData.selected) {
1272+ return i18n.tr("Download");
1273+ }
1274+ }
1275+ if (updateData.updateState) {
1276+ return i18n.tr("Pause");
1277+ } else if (updateData.selected) {
1278+ return i18n.tr("Resume");
1279+ }
1280+ return i18n.tr("Update");
1281+ }
1282+
1283+ onClicked: {
1284+ if (retry) {
1285+ retry = false;
1286+ return UpdateManager.retryDownload(updateData.packageName);
1287+ }
1288+ if (updateData.updateState)
1289+ return pause();
1290+ if (!updateData.updateState && updateData.selected)
1291+ return resume();
1292+ if (!updateData.updateState && !updateData.selected && !updateData.updateReady)
1293+ return start();
1294+ if (updateData.updateReady)
1295+ PopupUtils.open(dialogInstallComponent);
1296+ }
1297+ }
1298+
1299+ Label {
1300+ id: updateStatusLabel
1301+ anchors.right: parent.right
1302+ visible: updateData.updateState && !retry
1303+ fontSize: "small"
1304+ text: {
1305+ if (installing)
1306+ return i18n.tr("Installing");
1307+ if (installed)
1308+ return i18n.tr("Installed");
1309+ return i18n.tr("%1 of %2").arg(
1310+ Utilities.formatSize(updateData.binaryFilesize * (progress.value * 0.01))).arg(
1311+ Utilities.formatSize(updateData.binaryFilesize)
1312+ );
1313+ }
1314+ }
1315+ }
1316+
1317+ mainSlot: Column {
1318+ id: updateColumn
1319+ objectName: "updateColumn"
1320+ SlotsLayout.padding.top: 0
1321+ spacing: units.gu(0.5)
1322+ height: childrenRect.height
1323+
1324+ Label {
1325+ id: labelTitle
1326+ objectName: "labelTitle"
1327+ text: updateData.title
1328+ font.bold: true
1329+ elide: Text.ElideMiddle
1330+ }
1331+
1332+ Item {
1333+ anchors {
1334+ left: parent.left
1335+ right: parent.right
1336+ }
1337+ height: childrenRect.height
1338+ Row {
1339+ spacing: units.gu(1)
1340+ Label {
1341+ id: labelVersion
1342+ objectName: "labelVersion"
1343+ text: updateData.remoteVersion ? i18n.tr("Version: ") + updateData.remoteVersion : ""
1344+ elide: Text.ElideRight
1345+ fontSize: "small"
1346+ }
1347+
1348+ Icon {
1349+ name: "info"
1350+ height: labelVersion.height
1351+ width: height
1352+ MouseArea {
1353+ anchors.fill: parent
1354+ onClicked: {
1355+ PopupUtils.open(infoDialogComponent, undefined, {"title": updateData.title, "version": updateData.remoteVersion, "changelog": updateData.changelog})
1356+ console.warn(updateData.changelog)
1357+ }
1358+ }
1359+ }
1360+ }
1361+ }
1362+
1363+ /* Not in the new design?
1364+ Item {
1365+ id: labelUpdateStatus
1366+ anchors {
1367+ left: parent.left
1368+ right: parent.right
1369+ }
1370+ height: childrenRect.height
1371+ visible: opacity > 0
1372+ opacity: (updateData.updateState && updateData.selected && !updateData.updateReady) || (installing || installed) ? 1 : 0
1373+ Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
1374+ Label {
1375+ objectName: "labelUpdateStatus"
1376+ anchors.left: parent.left
1377+ elide: Text.ElideMiddle
1378+ fontSize: "small"
1379+ text: {
1380+ if (retry)
1381+ return updateData.error;
1382+ if (installing)
1383+ return i18n.tr("Installing");
1384+ if (installed)
1385+ return i18n.tr("Installed");
1386+ return i18n.tr("Downloading");
1387+ }
1388+ }
1389+ }
1390+ */
1391+
1392+ ProgressBar {
1393+ id: progress
1394+ objectName: "progress"
1395+ height: units.gu(2)
1396+ anchors {
1397+ left: parent.left
1398+ right: parent.right
1399+ }
1400+ visible: opacity > 0
1401+ opacity: updateData.selected && !updateData.updateReady && !installed ? 1 : 0
1402+ value: updateData.systemUpdate ? updateData.downloadProgress : tracker.progress
1403+ minimumValue: 0
1404+ maximumValue: 100
1405+
1406+ Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
1407+ }
1408+ }
1409+
1410+ Component {
1411+ id: infoDialogComponent
1412+ Dialog {
1413+ id: infoDialog
1414+ property string title
1415+ property string version
1416+ property string changelog
1417+
1418+ Column {
1419+ spacing: units.gu(2)
1420+ Label {
1421+ anchors.left: parent.left
1422+ text: title
1423+ fontSize: "x-large"
1424+ font.bold: true
1425+ }
1426+ Label {
1427+ anchors.left: parent.left
1428+ text: version
1429+ fontSize: "medium"
1430+ }
1431+ Label {
1432+ anchors.left: parent.left
1433+ text: changelog
1434+ fontSize: "medium"
1435+ }
1436+
1437+ Button {
1438+ anchors.right: parent.right
1439+ text: i18n.tr("OK")
1440+ width: units.gu(6)
1441+ onClicked: {
1442+ PopupUtils.close(infoDialog);
1443+ }
1444+ }
1445+ }
1446+ }
1447+ }
1448+ }
1449+}
1450
1451=== modified file 'plugins/system-update/network.cpp'
1452--- plugins/system-update/network.cpp 2015-12-01 17:55:31 +0000
1453+++ plugins/system-update/network.cpp 2015-12-09 19:33:29 +0000
1454@@ -231,6 +231,7 @@
1455 auto icon_url = object["icon_url"].toString();
1456 auto url = object["download_url"].toString();
1457 auto download_sha512 = object["download_sha512"].toString();
1458+ auto changelog = object["changelog"].toString();
1459 auto size = object["binary_filesize"].toInt();
1460 if (m_apps.contains(name)) {
1461 m_apps[name]->setRemoteVersion(version);
1462@@ -239,6 +240,7 @@
1463 m_apps[name]->setDownloadUrl(url);
1464 m_apps[name]->setBinaryFilesize(size);
1465 m_apps[name]->setDownloadSha512(download_sha512);
1466+ m_apps[name]->setChangelog(changelog);
1467 updates = true;
1468 }
1469 }
1470
1471=== modified file 'plugins/system-update/update.h'
1472--- plugins/system-update/update.h 2015-08-27 09:40:29 +0000
1473+++ plugins/system-update/update.h 2015-12-09 19:33:29 +0000
1474@@ -57,6 +57,7 @@
1475 Q_PROPERTY(QString downloadUrl READ downloadUrl NOTIFY downloadUrlChanged)
1476 Q_PROPERTY(QString clickToken READ clickToken NOTIFY clickTokenChanged)
1477 Q_PROPERTY(QString downloadSha512 READ downloadSha512 NOTIFY downloadSha512Changed)
1478+ Q_PROPERTY(QString changelog READ changelog WRITE setChangelog NOTIFY changelogChanged)
1479
1480 Q_SIGNALS:
1481 void systemUpdateChanged();
1482@@ -76,6 +77,7 @@
1483 void clickTokenChanged();
1484 void packageNameChanged();
1485 void downloadSha512Changed();
1486+ void changelogChanged();
1487
1488 public:
1489 explicit Update(QObject *parent = 0);
1490@@ -99,6 +101,7 @@
1491 QString downloadUrl() { return m_downloadUrl; }
1492 QString clickToken() { return m_clickToken; }
1493 QString downloadSha512() { return m_download_sha512; }
1494+ QString changelog() { return m_changelog; }
1495
1496 void setSystemUpdate(bool isSystem);
1497 void initializeApplication(QString packagename, QString title,
1498@@ -118,6 +121,7 @@
1499 void setDownloadUrl(const QString &url);
1500 void setClickToken(const QString &token) { m_clickToken = token; Q_EMIT clickTokenChanged(); }
1501 void setDownloadSha512(const QString &sha512) { m_download_sha512 = sha512; Q_EMIT downloadSha512Changed(); }
1502+ void setChangelog(const QString &changelog) { m_changelog = changelog; Q_EMIT changelogChanged(); }
1503
1504 private:
1505 int m_binary_filesize;
1506@@ -138,6 +142,7 @@
1507 bool m_update_ready;
1508 bool m_update_state;
1509 QString m_download_sha512;
1510+ QString m_changelog;
1511
1512 bool getIgnoreUpdates();
1513 };

Subscribers

People subscribed via source and target branches