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
=== modified file 'plugins/security-privacy/AppAccess.qml'
--- plugins/security-privacy/AppAccess.qml 2015-09-18 14:18:11 +0000
+++ plugins/security-privacy/AppAccess.qml 2015-12-09 19:33:29 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013 Canonical Ltd2 * Copyright (C) 2013-2015 Canonical Ltd
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU General Public License version 3 as
@@ -18,10 +18,11 @@
18 */18 */
1919
20import QtQuick 2.420import QtQuick 2.4
21import SystemSettings 1.0
22import SystemSettings.ListItems 1.0 as SettingsListItems
21import Ubuntu.Components 1.323import Ubuntu.Components 1.3
22import Ubuntu.Components.ListItems 1.3 as ListItem24import Ubuntu.Components.ListItems 1.3 as ListItems
23import Ubuntu.SystemSettings.SecurityPrivacy 1.025import Ubuntu.SystemSettings.SecurityPrivacy 1.0
24import SystemSettings 1.0
2526
26ItemPage {27ItemPage {
27 id: root28 id: root
@@ -42,7 +43,7 @@
42 anchors.left: parent.left43 anchors.left: parent.left
43 anchors.right: parent.right44 anchors.right: parent.right
4445
45 ListItem.Caption {46 ListItems.Caption {
46 text: i18n.tr("Apps that you have granted access to:")47 text: i18n.tr("Apps that you have granted access to:")
47 }48 }
4849
@@ -68,10 +69,10 @@
68 Repeater {69 Repeater {
69 model: appsModel70 model: appsModel
7071
71 ListItem.SingleValue {72 SettingsListItems.SingleValueProgression {
72 text: i18n.tr(model.name)73 text: i18n.tr(model.name)
73 enabled: trustStoreModel.count > 074 enabled: trustStoreModel.count > 0
74 progression: enabled ? true : false75 progressionVisible: enabled ? true : false
75 value: trustStoreModel.count > 0 ?76 value: trustStoreModel.count > 0 ?
76 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :77 i18n.tr("%1/%2").arg(trustStoreModel.grantedCount).arg(trustStoreModel.count) :
77 i18n.tr("0")78 i18n.tr("0")
@@ -81,19 +82,19 @@
81 "model": trustStoreModel,82 "model": trustStoreModel,
82 })83 })
8384
84 TrustStoreModel {85 resources: TrustStoreModel {
85 id: trustStoreModel86 id: trustStoreModel
86 serviceName: model.trustStoreService87 serviceName: model.trustStoreService
87 }88 }
88 }89 }
89 }90 }
9091
91 ListItem.Caption {92 ListItems.Caption {
92 text: i18n.tr("Apps may also request access to online accounts.")93 text: i18n.tr("Apps may also request access to online accounts.")
93 }94 }
9495
95 ListItem.SingleControl {96 SettingsListItems.SingleControl {
96 control: Button {97 Button {
97 text: i18n.tr("Online Accounts…")98 text: i18n.tr("Online Accounts…")
98 width: parent.width - units.gu(4)99 width: parent.width - units.gu(4)
99 onClicked: {100 onClicked: {
100101
=== modified file 'plugins/security-privacy/AppAccessControl.qml'
--- plugins/security-privacy/AppAccessControl.qml 2015-08-10 13:31:45 +0000
+++ plugins/security-privacy/AppAccessControl.qml 2015-12-09 19:33:29 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013 Canonical Ltd2 * Copyright (C) 2013-2015 Canonical Ltd
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU General Public License version 3 as
@@ -18,9 +18,10 @@
18 */18 */
1919
20import QtQuick 2.420import QtQuick 2.4
21import SystemSettings 1.0
22import SystemSettings.ListItems 1.0 as SettingsListItems
21import Ubuntu.Components 1.323import Ubuntu.Components 1.3
22import Ubuntu.Components.ListItems 1.3 as ListItem24import Ubuntu.Components.ListItems 1.3 as ListItems
23import SystemSettings 1.0
2425
25ItemPage {26ItemPage {
26 id: root27 id: root
@@ -43,17 +44,17 @@
43 anchors.left: parent.left44 anchors.left: parent.left
44 anchors.right: parent.right45 anchors.right: parent.right
4546
46 ListItem.Caption {47 ListItems.Caption {
47 id: captionLabel48 id: captionLabel
48 }49 }
4950
50 Repeater {51 Repeater {
51 id: repeater52 id: repeater
5253
53 ListItem.Standard {54 SettingsListItems.Standard {
54 text: model.applicationName55 text: model.applicationName
55 iconSource: model.iconName56 iconSource: model.iconName
56 control: Switch {57 Switch {
57 id: welcomeStatsSwitch58 id: welcomeStatsSwitch
58 checked: model.granted59 checked: model.granted
59 onClicked: root.model.setEnabled(index, !model.granted)60 onClicked: root.model.setEnabled(index, !model.granted)
6061
=== modified file 'plugins/security-privacy/Location.qml'
--- plugins/security-privacy/Location.qml 2015-09-18 14:18:11 +0000
+++ plugins/security-privacy/Location.qml 2015-12-09 19:33:29 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2013 Canonical Ltd2 * Copyright (C) 2013-2015 Canonical Ltd
3 *3 *
4 * This program is free software: you can redistribute it and/or modify4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as5 * it under the terms of the GNU General Public License version 3 as
@@ -22,10 +22,11 @@
22import QMenuModel 0.122import QMenuModel 0.1
23import Qt.labs.folderlistmodel 2.123import Qt.labs.folderlistmodel 2.1
24import QtQuick 2.424import QtQuick 2.4
25import SystemSettings 1.0
26import SystemSettings.ListItems 1.0 as SettingsListItems
25import Ubuntu.Components 1.327import Ubuntu.Components 1.3
26import Ubuntu.Components.ListItems 1.3 as ListItem28import Ubuntu.Components.ListItems 1.3 as ListItems
27import Ubuntu.SystemSettings.SecurityPrivacy 1.029import Ubuntu.SystemSettings.SecurityPrivacy 1.0
28import SystemSettings 1.0
2930
30ItemPage {31ItemPage {
31 id: locationPage32 id: locationPage
@@ -94,7 +95,7 @@
94 text: i18n.tr("Let the phone detect your location:")95 text: i18n.tr("Let the phone detect your location:")
95 }96 }
9697
97 ListItem.ItemSelector {98 ListItems.ItemSelector {
98 id: detection99 id: detection
99100
100 /* Helper that toggles location detection and HERE based on101 /* Helper that toggles location detection and HERE based on
@@ -199,7 +200,7 @@
199 }200 }
200 }201 }
201202
202 ListItem.Caption {203 ListItems.Caption {
203 /* TODO: replace by real info from the location service */204 /* TODO: replace by real info from the location service */
204 property int locationInfo: 0205 property int locationInfo: 0
205206
@@ -235,10 +236,10 @@
235236
236 Repeater {237 Repeater {
237 model: trustStoreModel238 model: trustStoreModel
238 ListItem.Standard {239 SettingsListItems.Icon {
239 text: model.applicationName240 text: model.applicationName
240 iconSource: model.iconName241 iconSource: model.iconName
241 control: Switch {242 Switch {
242 checked: model.granted243 checked: model.granted
243 onClicked: trustStoreModel.setEnabled(index, !model.granted)244 onClicked: trustStoreModel.setEnabled(index, !model.granted)
244 }245 }
@@ -246,12 +247,11 @@
246 }247 }
247 }248 }
248249
249 ListItem.Standard {250 SettingsListItems.Standard {
250 text: i18n.tr("None requested")251 text: i18n.tr("None requested")
251 visible: trustStoreModel.count === 0252 visible: trustStoreModel.count === 0
252 enabled: false253 enabled: false
253 }254 }
254 }255 }
255
256 }256 }
257}257}
258258
=== modified file 'plugins/security-privacy/LockSecurity.qml'
--- plugins/security-privacy/LockSecurity.qml 2015-08-10 13:31:45 +0000
+++ plugins/security-privacy/LockSecurity.qml 2015-12-09 19:33:29 +0000
@@ -21,11 +21,12 @@
21import GSettings 1.021import GSettings 1.0
22import QtQuick 2.422import QtQuick 2.4
23import QtQuick.Layouts 1.123import QtQuick.Layouts 1.1
24import SystemSettings 1.0
25import SystemSettings.ListItems 1.0 as SettingsListItems
24import Ubuntu.Components 1.326import Ubuntu.Components 1.3
25import Ubuntu.Components.ListItems 1.3 as ListItem27import Ubuntu.Components.ListItems 1.3 as ListItems
26import Ubuntu.Components.Popups 1.328import Ubuntu.Components.Popups 1.3
27import Ubuntu.SystemSettings.SecurityPrivacy 1.029import Ubuntu.SystemSettings.SecurityPrivacy 1.0
28import SystemSettings 1.0
2930
30ItemPage {31ItemPage {
31 id: page32 id: page
@@ -445,7 +446,7 @@
445 text: i18n.tr("Unlock the phone using:")446 text: i18n.tr("Unlock the phone using:")
446 }447 }
447448
448 ListItem.ItemSelector {449 ListItems.ItemSelector {
449 property string swipe: i18n.tr("Swipe (no security)")450 property string swipe: i18n.tr("Swipe (no security)")
450 property string passcode: i18n.tr("4-digit passcode")451 property string passcode: i18n.tr("4-digit passcode")
451 property string passphrase: i18n.tr("Passphrase")452 property string passphrase: i18n.tr("Passphrase")
@@ -487,13 +488,13 @@
487 value: methodToIndex(securityPrivacy.securityType)488 value: methodToIndex(securityPrivacy.securityType)
488 }489 }
489490
490 ListItem.SingleControl {491 SettingsListItems.SingleControl {
491492
492 id: changeControl493 id: changeControl
493 visible: securityPrivacy.securityType !==494 visible: securityPrivacy.securityType !==
494 UbuntuSecurityPrivacyPanel.Swipe495 UbuntuSecurityPrivacyPanel.Swipe
495496
496 control: Button {497 Button {
497 property string changePasscode: i18n.tr("Change passcode…")498 property string changePasscode: i18n.tr("Change passcode…")
498 property string changePassphrase: i18n.tr("Change passphrase…")499 property string changePassphrase: i18n.tr("Change passphrase…")
499500
500501
=== modified file 'plugins/security-privacy/PageComponent.qml'
--- plugins/security-privacy/PageComponent.qml 2015-10-16 13:42:50 +0000
+++ plugins/security-privacy/PageComponent.qml 2015-12-09 19:33:29 +0000
@@ -1,7 +1,7 @@
1/*1/*
2 * This file is part of system-settings2 * This file is part of system-settings
3 *3 *
4 * Copyright (C) 2013 Canonical Ltd.4 * Copyright (C) 2013-2015 Canonical Ltd.
5 *5 *
6 * Contact: Evan Dandrea <evan.dandrea@canonical.com>6 * Contact: Evan Dandrea <evan.dandrea@canonical.com>
7 *7 *
@@ -21,8 +21,9 @@
21import GSettings 1.021import GSettings 1.0
22import QMenuModel 0.122import QMenuModel 0.1
23import QtQuick 2.423import QtQuick 2.4
24import SystemSettings.ListItems 1.0 as SettingsListItems
24import Ubuntu.Components 1.325import Ubuntu.Components 1.3
25import Ubuntu.Components.ListItems 1.3 as ListItem26import Ubuntu.Components.ListItems 1.3 as ListItems
26import SystemSettings 1.027import SystemSettings 1.0
27import Ubuntu.SystemSettings.Battery 1.028import Ubuntu.SystemSettings.Battery 1.0
28import Ubuntu.SystemSettings.Diagnostics 1.029import Ubuntu.SystemSettings.Diagnostics 1.0
@@ -110,18 +111,17 @@
110 anchors.left: parent.left111 anchors.left: parent.left
111 anchors.right: parent.right112 anchors.right: parent.right
112113
113 ListItem.Header {114 SettingsItemTitle {
114 id: securityTitle115 id: securityTitle
115 text: i18n.tr("Security")116 text: i18n.tr("Security")
116 }117 }
117 ListItem.SingleValue {118 SettingsListItems.SingleValueProgression {
118 id: lockingControl119 id: lockingControl
119 objectName: "lockingControl"120 objectName: "lockingControl"
120 text: i18n.tr("Locking and unlocking")121 text: i18n.tr("Screen Lock")
121 progression: true
122 onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {usePowerd: usePowerd, powerSettings: powerSettings})122 onClicked: pageStack.push(Qt.resolvedUrl("PhoneLocking.qml"), {usePowerd: usePowerd, powerSettings: powerSettings})
123 }123 }
124 ListItem.SingleValue {124 SettingsListItems.SingleValueProgression {
125 id: simControl125 id: simControl
126 objectName: "simControl"126 objectName: "simControl"
127 text: i18n.tr("SIM PIN")127 text: i18n.tr("SIM PIN")
@@ -134,28 +134,27 @@
134 return i18n.tr("Off");134 return i18n.tr("Off");
135 }135 }
136 visible: simsPresent > 0136 visible: simsPresent > 0
137 progression: true
138 onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims })137 onClicked: pageStack.push(Qt.resolvedUrl("SimPin.qml"), { sims: sims })
139 }138 }
140 ListItem.Standard {139 SettingsListItems.Standard {
141 text: i18n.tr("Encryption")140 text: i18n.tr("Encryption")
142 control: Switch {141 Switch {
143 id: encryptionSwitch142 id: encryptionSwitch
144 checked: false143 checked: false
145 }144 }
146 visible: showAllUI145 visible: showAllUI
147 }146 }
148 ListItem.Caption {147 ListItems.Caption {
149 text: i18n.tr(148 text: i18n.tr(
150 "Encryption protects against access to phone data when the phone is connected to a PC or other device.")149 "Encryption protects against access to phone data when the phone is connected to a PC or other device.")
151 visible: showAllUI150 visible: showAllUI
152 }151 }
153 ListItem.Header {152 SettingsItemTitle {
154 text: i18n.tr("Privacy")153 text: i18n.tr("Privacy")
155 }154 }
156 ListItem.Standard {155 SettingsListItems.Standard {
157 text: i18n.tr("Stats on welcome screen")156 text: i18n.tr("Stats on welcome screen")
158 control: Switch {157 Switch {
159 property bool serverChecked: securityPrivacy.statsWelcomeScreen158 property bool serverChecked: securityPrivacy.statsWelcomeScreen
160 onServerCheckedChanged: checked = serverChecked159 onServerCheckedChanged: checked = serverChecked
161 Component.onCompleted: checked = serverChecked160 Component.onCompleted: checked = serverChecked
@@ -163,9 +162,9 @@
163 }162 }
164 }163 }
165164
166 ListItem.Standard {165 SettingsListItems.Standard {
167 text: i18n.tr("Messages on welcome screen")166 text: i18n.tr("Messages on welcome screen")
168 control: Switch {167 Switch {
169 property bool serverChecked: securityPrivacy.messagesWelcomeScreen168 property bool serverChecked: securityPrivacy.messagesWelcomeScreen
170 onServerCheckedChanged: checked = serverChecked169 onServerCheckedChanged: checked = serverChecked
171 Component.onCompleted: checked = serverChecked170 Component.onCompleted: checked = serverChecked
@@ -184,12 +183,11 @@
184183
185 Component.onCompleted: start()184 Component.onCompleted: start()
186 }185 }
187 ListItem.SingleValue {186 SettingsListItems.SingleValueProgression {
188 id: locationItem187 id: locationItem
189 objectName: "locationItem"188 objectName: "locationItem"
190 text: i18n.tr("Location")189 text: i18n.tr("Location")
191 value: ""190 value: ""
192 progression: true
193 onClicked: pageStack.push(Qt.resolvedUrl("Location.qml"))191 onClicked: pageStack.push(Qt.resolvedUrl("Location.qml"))
194 visible: true192 visible: true
195 enabled: true193 enabled: true
@@ -204,14 +202,12 @@
204 property: "locationEnabled"202 property: "locationEnabled"
205 value: locationActionGroup.enabled.state203 value: locationActionGroup.enabled.state
206 }204 }
207 ListItem.SingleValue {205 SettingsListItems.SingleValueProgression {
208 text: i18n.tr("App permissions")206 text: i18n.tr("App permissions")
209 progression: true
210 onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})207 onClicked: pageStack.push(Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager})
211 }208 }
212 ListItem.SingleValue {209 SettingsListItems.SingleValueProgression {
213 text: i18n.tr("Diagnostics")210 text: i18n.tr("Diagnostics")
214 progression: true
215 value: diagnosticsWidget.reportCrashes ?211 value: diagnosticsWidget.reportCrashes ?
216 /* TRANSLATORS: This string is shown when crash212 /* TRANSLATORS: This string is shown when crash
217 reports are to be sent by the system. */213 reports are to be sent by the system. */
218214
=== modified file 'plugins/security-privacy/PhoneLocking.qml'
--- plugins/security-privacy/PhoneLocking.qml 2015-09-18 14:18:11 +0000
+++ plugins/security-privacy/PhoneLocking.qml 2015-12-09 19:33:29 +0000
@@ -1,7 +1,7 @@
1/*1/*
2 * This file is part of system-settings2 * This file is part of system-settings
3 *3 *
4 * Copyright (C) 2013 Canonical Ltd.4 * Copyright (C) 2013-2015 Canonical Ltd.
5 *5 *
6 * Contact: Iain Lane <iain.lane@canonical.com>6 * Contact: Iain Lane <iain.lane@canonical.com>
7 *7 *
@@ -21,8 +21,9 @@
21import GSettings 1.021import GSettings 1.0
22import QtQuick 2.422import QtQuick 2.4
23import SystemSettings 1.023import SystemSettings 1.0
24import SystemSettings.ListItems 1.0 as SettingsListItems
24import Ubuntu.Components 1.325import Ubuntu.Components 1.3
25import Ubuntu.Components.ListItems 1.3 as ListItem26import Ubuntu.Components.ListItems 1.3 as ListItems
26import Ubuntu.SystemSettings.SecurityPrivacy 1.027import Ubuntu.SystemSettings.SecurityPrivacy 1.0
2728
28ItemPage {29ItemPage {
@@ -52,7 +53,7 @@
52 anchors.left: parent.left53 anchors.left: parent.left
53 anchors.right: parent.right54 anchors.right: parent.right
5455
55 ListItem.SingleValue {56 SettingsListItems.SingleValueProgression {
56 property string swipe: i18n.ctr("Unlock with swipe", "None")57 property string swipe: i18n.ctr("Unlock with swipe", "None")
57 property string passcode: i18n.tr("Passcode")58 property string passcode: i18n.tr("Passcode")
58 property string passphrase: i18n.tr("Passphrase")59 property string passphrase: i18n.tr("Passphrase")
@@ -69,11 +70,10 @@
69 return passphrase70 return passphrase
70 }71 }
71 }72 }
72 progression: true
73 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))73 onClicked: pageStack.push(Qt.resolvedUrl("LockSecurity.qml"))
74 }74 }
7575
76 ListItem.SingleValue {76 SettingsListItems.SingleValueProgression {
77 objectName: "lockTimeout"77 objectName: "lockTimeout"
78 property bool lockOnSuspend: securityPrivacy.securityType !==78 property bool lockOnSuspend: securityPrivacy.securityType !==
79 UbuntuSecurityPrivacyPanel.Swipe79 UbuntuSecurityPrivacyPanel.Swipe
@@ -99,15 +99,14 @@
99 i18n.tr("Never")99 i18n.tr("Never")
100 }100 }
101 }101 }
102 progression: true
103 onClicked:102 onClicked:
104 pageStack.push(103 pageStack.push(
105 Qt.resolvedUrl("../battery/SleepValues.qml"),104 Qt.resolvedUrl("../battery/SleepValues.qml"),
106 { title: text, lockOnSuspend: lockOnSuspend } )105 { title: text, lockOnSuspend: lockOnSuspend } )
107 }106 }
108107
109 ListItem.Standard {108 SettingsListItems.Standard {
110 control: CheckBox {109 CheckBox {
111 checked: true110 checked: true
112 }111 }
113 text: i18n.tr("Sleep locks immediately")112 text: i18n.tr("Sleep locks immediately")
@@ -118,9 +117,9 @@
118 text: i18n.tr("When locked, allow:")117 text: i18n.tr("When locked, allow:")
119 }118 }
120119
121 ListItem.Standard {120 SettingsListItems.Standard {
122 text: i18n.tr("Launcher")121 text: i18n.tr("Launcher")
123 control: CheckBox {122 CheckBox {
124 id: launcherCheck123 id: launcherCheck
125 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe124 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
126125
@@ -131,9 +130,9 @@
131 }130 }
132 }131 }
133132
134 ListItem.Standard {133 SettingsListItems.Standard {
135 text: i18n.tr("Notifications and quick settings")134 text: i18n.tr("Notifications and quick settings")
136 control: CheckBox {135 CheckBox {
137 id: indicatorsCheck136 id: indicatorsCheck
138 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe137 enabled: securityPrivacy.securityType !== UbuntuSecurityPrivacyPanel.Swipe
139138
@@ -144,7 +143,7 @@
144 }143 }
145 }144 }
146145
147 ListItem.Caption {146 ListItems.Caption {
148 text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?147 text: securityPrivacy.securityType === UbuntuSecurityPrivacyPanel.Swipe ?
149 i18n.tr("Turn on lock security to restrict access when the phone is locked.") :148 i18n.tr("Turn on lock security to restrict access when the phone is locked.") :
150 i18n.tr("Other apps and functions will prompt you to unlock.")149 i18n.tr("Other apps and functions will prompt you to unlock.")
151150
=== modified file 'plugins/security-privacy/SimPin.qml'
--- plugins/security-privacy/SimPin.qml 2015-08-10 13:31:45 +0000
+++ plugins/security-privacy/SimPin.qml 2015-12-09 19:33:29 +0000
@@ -19,14 +19,15 @@
19 */19 */
2020
21import GSettings 1.021import GSettings 1.0
22import MeeGo.QOfono 0.2
22import QtQuick 2.423import QtQuick 2.4
23import QtQuick.Layouts 1.124import QtQuick.Layouts 1.1
25import SystemSettings 1.0
26import SystemSettings.ListItems 1.0 as SettingsListItems
24import Ubuntu.Components 1.327import Ubuntu.Components 1.3
25import Ubuntu.Components.ListItems 1.3 as ListItem28import Ubuntu.Components.ListItems 1.3 as ListItems
26import Ubuntu.Components.Popups 1.329import Ubuntu.Components.Popups 1.3
27import SystemSettings 1.0
28import Ubuntu.SystemSettings.SecurityPrivacy 1.030import Ubuntu.SystemSettings.SecurityPrivacy 1.0
29import MeeGo.QOfono 0.2
30import "sims.js" as Sims31import "sims.js" as Sims
3132
3233
@@ -388,14 +389,14 @@
388 }389 }
389 }390 }
390391
391 ListItem.Standard {392 SettingsListItems.Standard {
392 text: sims[index].title393 text: sims[index].title
393 visible: sims.length > 1394 visible: sims.length > 1
394 }395 }
395396
396 ListItem.Standard {397 SettingsListItems.Standard {
397 text: i18n.tr("SIM PIN")398 text: i18n.tr("SIM PIN")
398 control: Switch {399 Switch {
399 id: simPinSwitch400 id: simPinSwitch
400 objectName: "simPinSwitch"401 objectName: "simPinSwitch"
401 checked: sims[index].simMng.lockedPins.length > 0402 checked: sims[index].simMng.lockedPins.length > 0
@@ -406,11 +407,11 @@
406 }407 }
407 }408 }
408409
409 ListItem.Standard {410 SettingsListItems.Standard {
410 id: changeControl411 id: changeControl
411 visible: sim.state === "unlocked"412 visible: sim.state === "unlocked"
412 text: i18n.tr("Unlocked")413 text: i18n.tr("Unlocked")
413 control: Button {414 Button {
414 enabled: parent.visible415 enabled: parent.visible
415 text: i18n.tr("Change PIN…")416 text: i18n.tr("Change PIN…")
416 onClicked: {417 onClicked: {
@@ -420,11 +421,11 @@
420 }421 }
421 }422 }
422423
423 ListItem.Standard {424 SettingsListItems.Standard {
424 id: lockControl425 id: lockControl
425 visible: sim.state === "locked"426 visible: sim.state === "locked"
426 text: i18n.tr("Locked")427 text: i18n.tr("Locked")
427 control: Button {428 Button {
428 objectName: "unlock"429 objectName: "unlock"
429 enabled: sims[index].simMng.pinRequired !== 'none'430 enabled: sims[index].simMng.pinRequired !== 'none'
430 text: i18n.tr("Unlock…")431 text: i18n.tr("Unlock…")
@@ -433,18 +434,18 @@
433 }434 }
434 }435 }
435436
436 ListItem.Divider {437 ListItems.Divider {
437 visible: index < (sims.length - 1)438 visible: index < (sims.length - 1)
438 }439 }
439440
440 }441 }
441 }442 }
442443
443 ListItem.Caption {444 ListItems.Caption {
444 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.")445 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.")
445 }446 }
446447
447 ListItem.Caption {448 ListItems.Caption {
448 text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")449 text: i18n.tr("Entering an incorrect PIN repeatedly may lock the SIM permanently.")
449 }450 }
450 }451 }
451452
=== modified file 'plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml'
--- plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml 2015-08-10 13:31:45 +0000
+++ plugins/security-privacy/diagnostics/DiagnosticsCheckEntry.qml 2015-12-09 19:33:29 +0000
@@ -20,9 +20,9 @@
2020
21import QtQuick 2.421import QtQuick 2.4
22import Ubuntu.Components 1.322import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem23import Ubuntu.Components.ListItems 1.3 as ListItems
2424
25ListItem.Base {25ListItems.Base {
26 property string textEntry: "";26 property string textEntry: "";
27 property alias checked: checkBox.checked;27 property alias checked: checkBox.checked;
28 onClicked: checked = !checked;28 onClicked: checked = !checked;
2929
=== modified file 'plugins/security-privacy/diagnostics/PageComponent.qml'
--- plugins/security-privacy/diagnostics/PageComponent.qml 2015-10-16 13:42:50 +0000
+++ plugins/security-privacy/diagnostics/PageComponent.qml 2015-12-09 19:33:29 +0000
@@ -20,8 +20,9 @@
2020
21import QtQuick 2.421import QtQuick 2.4
22import SystemSettings 1.022import SystemSettings 1.0
23import SystemSettings.ListItems 1.0 as SettingsListItems
23import Ubuntu.Components 1.324import Ubuntu.Components 1.3
24import Ubuntu.Components.ListItems 1.3 as ListItem25import Ubuntu.Components.ListItems 1.3 as ListItems
25import Ubuntu.SystemSettings.Diagnostics 1.026import Ubuntu.SystemSettings.Diagnostics 1.0
2627
27ItemPage {28ItemPage {
@@ -54,15 +55,14 @@
54 anchors.left: parent.left55 anchors.left: parent.left
55 anchors.right: parent.right56 anchors.right: parent.right
5657
57 ListItem.SingleValue {58 SettingsListItems.SingleValueProgression {
58 text: i18n.tr("Privacy policy")59 text: i18n.tr("Privacy policy")
59 progression: true
60 onClicked: {60 onClicked: {
61 Qt.openUrlExternally("http://www.ubuntu.com/aboutus/privacypolicy?crashdb")61 Qt.openUrlExternally("http://www.ubuntu.com/aboutus/privacypolicy?crashdb")
62 }62 }
63 }63 }
6464
65 ListItem.Standard {65 SettingsListItems.Standard {
66 text: i18n.tr("Report to Canonical:")66 text: i18n.tr("Report to Canonical:")
67 }67 }
6868
@@ -80,20 +80,19 @@
80 textEntry: i18n.tr("App crashes and errors")80 textEntry: i18n.tr("App crashes and errors")
81 }81 }
8282
83 ListItem.SingleValue {83 SettingsListItems.SingleValueProgression {
84 id: previousReports84 id: previousReports
85 property string ident: diagnosticsWidget.systemIdentifier()85 property string ident: diagnosticsWidget.systemIdentifier()
86 text: i18n.tr("Previous error reports")86 text: i18n.tr("Previous error reports")
87 progression: previousReports.ident != ""87 enabled: previousReports.ident != ""
88 progressionVisible: enabled
88 onClicked: {89 onClicked: {
89 var base = "https://errors.ubuntu.com/user/"90 var base = "https://errors.ubuntu.com/user/"
90 if (previousReports.progression) {91 Qt.openUrlExternally(base + ident)
91 Qt.openUrlExternally(base + ident)
92 }
93 }92 }
94 }93 }
9594
96 ListItem.Caption {95 ListItems.Caption {
97 text: i18n.tr("Includes info about what an app was doing when it failed.")96 text: i18n.tr("Includes info about what an app was doing when it failed.")
98 }97 }
99 }98 }
10099
=== modified file 'plugins/system-update/CMakeLists.txt'
--- plugins/system-update/CMakeLists.txt 2015-08-26 16:35:05 +0000
+++ plugins/system-update/CMakeLists.txt 2015-12-09 19:33:29 +0000
@@ -1,4 +1,4 @@
1set(QML_SOURCES PageComponent.qml Configuration.qml)1set(QML_SOURCES PageComponent.qml Configuration.qml UpdateItem.qml)
2SET (CMAKE_AUTOMOC ON)2SET (CMAKE_AUTOMOC ON)
33
4add_library(UbuntuUpdatePanel MODULE plugin.h plugin.cpp4add_library(UbuntuUpdatePanel MODULE plugin.h plugin.cpp
55
=== modified file 'plugins/system-update/Configuration.qml'
--- plugins/system-update/Configuration.qml 2015-08-10 13:31:45 +0000
+++ plugins/system-update/Configuration.qml 2015-12-09 19:33:29 +0000
@@ -1,7 +1,7 @@
1/*1/*
2 * This file is part of system-settings2 * This file is part of system-settings
3 *3 *
4 * Copyright (C) 2013-2014 Canonical Ltd.4 * Copyright (C) 2013-2015 Canonical Ltd.
5 *5 *
6 * This program is free software: you can redistribute it and/or modify it6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 3, as published7 * under the terms of the GNU General Public License version 3, as published
@@ -19,7 +19,7 @@
19import QtQuick 2.419import QtQuick 2.4
20import SystemSettings 1.020import SystemSettings 1.0
21import Ubuntu.Components 1.321import Ubuntu.Components 1.3
22import Ubuntu.Components.ListItems 1.3 as ListItem22import Ubuntu.Components.ListItems 1.3 as ListItems
23import Ubuntu.SystemSettings.Update 1.023import Ubuntu.SystemSettings.Update 1.0
2424
2525
@@ -28,7 +28,7 @@
28 objectName: "configurationPage"28 objectName: "configurationPage"
29 title: i18n.tr("Auto download")29 title: i18n.tr("Auto download")
3030
31 ListItem.ItemSelector {31 ListItems.ItemSelector {
32 id: upgradePolicySelector32 id: upgradePolicySelector
33 expanded: true33 expanded: true
34 text: i18n.tr ("Download future updates automatically:")34 text: i18n.tr ("Download future updates automatically:")
3535
=== modified file 'plugins/system-update/EntryComponent.qml'
--- plugins/system-update/EntryComponent.qml 2015-08-10 13:31:45 +0000
+++ plugins/system-update/EntryComponent.qml 2015-12-09 19:33:29 +0000
@@ -1,7 +1,7 @@
1/*1/*
2 * This file is part of system-settings2 * This file is part of system-settings
3 *3 *
4 * Copyright (C) 2014 Canonical Ltd.4 * Copyright (C) 2014-2015 Canonical Ltd.
5 *5 *
6 * Contact: Diego Sarmentero <diego.sarmentero@canonical.com>6 * Contact: Diego Sarmentero <diego.sarmentero@canonical.com>
7 *7 *
@@ -19,18 +19,15 @@
19 */19 */
2020
21import QtQuick 2.421import QtQuick 2.4
22import SystemSettings.ListItems 1.0 as SettingsListItems
22import Ubuntu.Components 1.323import Ubuntu.Components 1.3
23import Ubuntu.Components.ListItems 1.3 as ListItem
24import Ubuntu.SystemSettings.Update 1.024import Ubuntu.SystemSettings.Update 1.0
2525
26ListItem.SingleValue {26SettingsListItems.IconProgression {
27 id: root27 id: root
28 text: i18n.tr(model.displayName)28 text: i18n.tr(model.displayName)
29 objectName: "entryComponent-updates"29 objectName: "entryComponent-updates"
30 iconSource: Qt.resolvedUrl(model.icon)30 iconSource: Qt.resolvedUrl(model.icon)
31 iconFrame: false
32 progression: true
33 value: updatesAvailable > 0 ? updatesAvailable : ""
3431
35 property int updatesAvailable: 032 property int updatesAvailable: 0
3633
@@ -43,7 +40,7 @@
43 updatesAvailable = _updatesAvailable;40 updatesAvailable = _updatesAvailable;
44 }41 }
4542
46 Connections {43 resources: Connections {
47 id: updateManager44 id: updateManager
48 objectName: "updateManager"45 objectName: "updateManager"
49 target: UpdateManager46 target: UpdateManager
@@ -52,4 +49,8 @@
52 }49 }
5350
54 onClicked: main.loadPluginByName("system-update");51 onClicked: main.loadPluginByName("system-update");
52 Label {
53 SlotsLayout.position: SlotsLayout.Trailing
54 text: updatesAvailable > 0 ? updatesAvailable : ""
55 }
55}56}
5657
=== modified file 'plugins/system-update/PageComponent.qml'
--- plugins/system-update/PageComponent.qml 2015-11-03 16:26:27 +0000
+++ plugins/system-update/PageComponent.qml 2015-12-09 19:33:29 +0000
@@ -22,8 +22,9 @@
22import QMenuModel 0.122import QMenuModel 0.1
23import QtQuick 2.423import QtQuick 2.4
24import SystemSettings 1.024import SystemSettings 1.0
25import SystemSettings.ListItems 1.0 as SettingsListItems
25import Ubuntu.Components 1.326import Ubuntu.Components 1.3
26import Ubuntu.Components.ListItems 1.3 as ListItem27import Ubuntu.Components.ListItems 1.3 as ListItems
27import Ubuntu.Components.Popups 1.328import Ubuntu.Components.Popups 1.3
28import Ubuntu.OnlineAccounts.Client 0.129import Ubuntu.OnlineAccounts.Client 0.1
29import Ubuntu.SystemSettings.Update 1.030import Ubuntu.SystemSettings.Update 1.0
@@ -99,7 +100,7 @@
99 Button {100 Button {
100 text: i18n.tr("Restart & Install")101 text: i18n.tr("Restart & Install")
101 visible: root.batterySafeForUpdate ? true : false102 visible: root.batterySafeForUpdate ? true : false
102 color: UbuntuColors.orange103 color: UbuntuColors.green
103 onClicked: {104 onClicked: {
104 installingImageUpdate.visible = true;105 installingImageUpdate.visible = true;
105 UpdateManager.applySystemUpdate();106 UpdateManager.applySystemUpdate();
@@ -108,12 +109,12 @@
108 }109 }
109 Button {110 Button {
110 text: i18n.tr("Cancel")111 text: i18n.tr("Cancel")
111 color: UbuntuColors.warmGrey112 color: UbuntuColors.lightGrey
112 onClicked: {113 onClicked: {
113 updateList.currentIndex = 0;114 updateList.currentIndex = 0;
114 var item = updateList.currentItem;115 var item = updateList.currentItem;
115 var modelItem = UpdateManager.model[0];116 var modelItem = UpdateManager.model[0];
116 item.actionButton.text = i18n.tr("Install");117 item.actionButton.text = i18n.tr("Update");
117 item.progressBar.opacity = 0;118 item.progressBar.opacity = 0;
118 modelItem.updateReady = true;119 modelItem.updateReady = true;
119 modelItem.selected = false;120 modelItem.selected = false;
@@ -133,7 +134,7 @@
133134
134 Button {135 Button {
135 text: i18n.tr("OK")136 text: i18n.tr("OK")
136 color: UbuntuColors.orange137 color: UbuntuColors.green
137 onClicked: {138 onClicked: {
138 PopupUtils.close(dialogueError);139 PopupUtils.close(dialogueError);
139 }140 }
@@ -261,10 +262,9 @@
261 }262 }
262 height: childrenRect.height263 height: childrenRect.height
263264
264 ListItem.Base {265 ListItems.Base {
265 id: checkForUpdatesArea266 id: checkForUpdatesArea
266 objectName: "checkForUpdatesArea"267 objectName: "checkForUpdatesArea"
267 showDivider: false
268 visible: false268 visible: false
269269
270 ActivityIndicator {270 ActivityIndicator {
@@ -293,20 +293,18 @@
293 }293 }
294 }294 }
295295
296 ListItem.SingleControl {296 SettingsListItems.SingleValue {
297 height: installAllButton.visible ? units.gu(8) : units.gu(2)297 height: installAllButton.visible ? units.gu(8) : units.gu(2)
298 highlightWhenPressed: false298 highlightWhenPressed: false
299 control: Button {299 text: includeSystemUpdate ?
300 i18n.tr("%1 update available", "%1 updates available", root.updatesAvailable).arg(root.updatesAvailable) :
301 i18n.tr("%1 update available", "%1 updates available", root.updatesAvailable).arg(root.updatesAvailable)
302 Button {
300 id: installAllButton303 id: installAllButton
301 objectName: "installAllButton"304 objectName: "installAllButton"
302 property string primaryText: includeSystemUpdate ?305 SlotsLayout.position: SlotsLayout.Trailing
303 i18n.tr("Install %1 update…", "Install %1 updates…", root.updatesAvailable).arg(root.updatesAvailable) :306 color: UbuntuColors.green
304 i18n.tr("Install %1 update", "Install %1 updates", root.updatesAvailable).arg(root.updatesAvailable)307 text: root.installAll ? i18n.tr("Pause all") : i18n.tr("Update all")
305 property string secondaryText: i18n.tr("Pause All")
306 color: UbuntuColors.orange
307 text: root.installAll ? secondaryText : primaryText
308 width: parent.width - units.gu(4)
309
310 onClicked: {308 onClicked: {
311 for (var i=0; i < updateList.count; i++) {309 for (var i=0; i < updateList.count; i++) {
312 updateList.currentIndex = i;310 updateList.currentIndex = i;
@@ -339,7 +337,6 @@
339 root.installAll = !root.installAll;337 root.installAll = !root.installAll;
340 }338 }
341 }339 }
342 showDivider: false
343 }340 }
344341
345 ListView {342 ListView {
@@ -354,270 +351,95 @@
354 interactive: false351 interactive: false
355 spacing: 0352 spacing: 0
356353
357 delegate: ListItem.Subtitled {354 delegate: UpdateItem {
358 id: listItem355 id: updateItem
359 anchors {356 updateData: modelData
360 left: parent.left357 tracker: DownloadTracker {
361 right: parent.right358 id: tracker
362 topMargin: units.gu(1)359 objectName: "tracker"
363 bottomMargin: units.gu(1)360 packageName: updateData.packageName
361 clickToken: updateData.clickToken
362 download: updateData.downloadUrl
363 downloadSha512: updateData.downloadSha512
364
365 onFinished: {
366 updateItem.progress.visible = false;
367 updateItem.buttonAppUpdate.visible = false;
368 updateItem.installed = true;
369 updateItem.installing = false;
370 root.updatesAvailable -= 1;
371 updateData.updateRequired = false;
372 UpdateManager.updateClickScope();
373 }
374
375 onProcessing: {
376 console.warn("onProcessing: " + updateData.packageName + " " + path);
377 updateItem.buttonAppUpdate.enabled = false;
378 updateItem.installing = true;
379 updateData.updateState = false;
380 }
381
382 onStarted: {
383 console.warn("onStarted: " + updateData.packageName + " " + success);
384 if (success)
385 updateData.updateState = true;
386 else
387 updateData.updateState = false;
388 }
389
390 onPaused: {
391 console.warn("onPaused: " + updateData.packageName + " " + success);
392 if (success)
393 updateData.updateState = false;
394 else
395 updateData.updateState = true;
396 }
397
398 onResumed: {
399 console.warn("onResumed: " + updateData.packageName + " " + success);
400 if (success)
401 updateData.updateState = true;
402 else
403 updateData.updateState = false;
404 }
405
406 onCanceled: {
407 console.warn("onCanceled: " + updateData.packageName + " " + success);
408 if (success) {
409 updateData.updateState = false;
410 updateData.selected = false;
411 }
412 }
413
414 onErrorFound: {
415 console.warn("onErrorFound: " + updateData.packageName + " " + error);
416 updateData.updateState = false;
417 updateItem.retry = true;
418 updateItem.installing = false;
419 }
364 }420 }
365 iconSource: Qt.resolvedUrl(modelData.iconUrl)421
366 iconFrame: modelData.systemUpdate ? false : true
367 height: visible ? textArea.height + units.gu(2) : 0
368 highlightWhenPressed: false
369 showDivider: false
370 visible: opacity > 0
371 opacity: installed ? 0 : 1
372 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
373
374 property alias actionButton: buttonAppUpdate
375 property alias progressBar: progress
376 property bool installing: !modelData.systemUpdate && (modelData.updateReady || (progressBar.value === progressBar.maximumValue))
377 property bool installed: false
378 property bool retry: false
379
380 function pause () {422 function pause () {
381 console.warn("PAUSE: " + modelData.packageName);423 console.warn("PAUSE: " + updateData.packageName);
382 if (modelData.systemUpdate)424 if (updateData.systemUpdate)
383 return UpdateManager.pauseDownload(modelData.packageName);425 return UpdateManager.pauseDownload(updateData.packageName);
384 modelData.updateState = false;426 updateData.updateState = false;
385 tracker.pause();427 tracker.pause();
386 }428 }
387429
388 function resume () {430 function resume () {
389 console.warn("RESUME: " + modelData.packageName);431 console.warn("RESUME: " + updateData.packageName);
390 if (modelData.systemUpdate)432 if (updateData.systemUpdate)
391 return UpdateManager.startDownload(modelData.packageName);433 return UpdateManager.startDownload(updateData.packageName);
392 modelData.updateState = true;434 updateData.updateState = true;
393 tracker.resume();435 tracker.resume();
394 }436 }
395437
396 function start () {438 function start () {
397 console.warn("START: " + modelData.packageName);439 console.warn("START: " + updateData.packageName);
398 modelData.selected = true;440 updateData.selected = true;
399 modelData.updateState = true;441 updateData.updateState = true;
400 UpdateManager.startDownload(modelData.packageName);442 UpdateManager.startDownload(updateData.packageName);
401 }
402 Column {
403 id: textArea
404 objectName: "textArea"
405 anchors {
406 left: parent.left
407 right: parent.right
408 }
409 spacing: units.gu(0.5)
410
411 Item {
412 anchors {
413 left: parent.left
414 right: parent.right
415 }
416 height: buttonAppUpdate.height
417
418 Label {
419 id: labelTitle
420 objectName: "labelTitle"
421 anchors {
422 left: parent.left
423 right: buttonAppUpdate.visible ? buttonAppUpdate.left : parent.right
424 verticalCenter: parent.verticalCenter
425 }
426 text: modelData.title
427 font.bold: true
428 elide: Text.ElideMiddle
429 }
430
431 Button {
432 id: buttonAppUpdate
433 objectName: "buttonAppUpdate"
434 anchors.right: parent.right
435 height: labelTitle.height + units.gu(1)
436 enabled: !installing
437 text: {
438 if (retry)
439 return i18n.tr("Retry");
440 if (modelData.systemUpdate) {
441 if (modelData.updateReady) {
442 return i18n.tr("Install…");
443 } else if (!modelData.updateState && !modelData.selected) {
444 return i18n.tr("Download");
445 }
446 }
447 if (modelData.updateState) {
448 return i18n.tr("Pause");
449 } else if (modelData.selected) {
450 return i18n.tr("Resume");
451 }
452 return i18n.tr("Update");
453 }
454
455 onClicked: {
456 if (retry) {
457 retry = false;
458 return UpdateManager.retryDownload(modelData.packageName);
459 }
460 if (modelData.updateState)
461 return pause();
462 if (!modelData.updateState && modelData.selected)
463 return resume();
464 if (!modelData.updateState && !modelData.selected && !modelData.updateReady)
465 return start();
466 if (modelData.updateReady)
467 PopupUtils.open(dialogInstallComponent);
468 }
469 }
470 }
471
472 Item {
473 id: labelUpdateStatus
474 anchors {
475 left: parent.left
476 right: parent.right
477 }
478 height: childrenRect.height
479 visible: opacity > 0
480 opacity: (modelData.updateState && modelData.selected && !modelData.updateReady) || (installing || installed) ? 1 : 0
481 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
482 Label {
483 objectName: "labelUpdateStatus"
484 anchors.left: parent.left
485 anchors.right: updateStatusLabel.left
486 elide: Text.ElideMiddle
487 fontSize: "small"
488 text: {
489 if (retry)
490 return modelData.error;
491 if (installing)
492 return i18n.tr("Installing");
493 if (installed)
494 return i18n.tr("Installed");
495 return i18n.tr("Downloading");
496 }
497 }
498 Label {
499 id: updateStatusLabel
500 anchors.right: parent.right
501 visible: !labelSize.visible && !installing && !installed
502 fontSize: "small"
503 text: {
504 if (!labelUpdateStatus.visible)
505 return Utilities.formatSize(modelData.binaryFilesize);
506
507 return i18n.tr("%1 of %2").arg(
508 Utilities.formatSize(modelData.binaryFilesize * (progress.value * 0.01))).arg(
509 Utilities.formatSize(modelData.binaryFilesize)
510 );
511 }
512 }
513 }
514
515 ProgressBar {
516 id: progress
517 objectName: "progress"
518 height: units.gu(2)
519 anchors {
520 left: parent.left
521 right: parent.right
522 }
523 visible: opacity > 0
524 opacity: modelData.selected && !modelData.updateReady && !installed ? 1 : 0
525 value: modelData.systemUpdate ? modelData.downloadProgress : tracker.progress
526 minimumValue: 0
527 maximumValue: 100
528
529 DownloadTracker {
530 id: tracker
531 objectName: "tracker"
532 packageName: modelData.packageName
533 clickToken: modelData.clickToken
534 download: modelData.downloadUrl
535 downloadSha512: modelData.downloadSha512
536
537 onFinished: {
538 progress.visible = false;
539 buttonAppUpdate.visible = false;
540 installed = true;
541 installing = false;
542 root.updatesAvailable -= 1;
543 modelData.updateRequired = false;
544 UpdateManager.updateClickScope();
545 }
546
547 onProcessing: {
548 console.warn("onProcessing: " + modelData.packageName + " " + path);
549 buttonAppUpdate.enabled = false;
550 installing = true;
551 modelData.updateState = false;
552 }
553
554 onStarted: {
555 console.warn("onStarted: " + modelData.packageName + " " + success);
556 if (success)
557 modelData.updateState = true;
558 else
559 modelData.updateState = false;
560 }
561
562 onPaused: {
563 console.warn("onPaused: " + modelData.packageName + " " + success);
564 if (success)
565 modelData.updateState = false;
566 else
567 modelData.updateState = true;
568 }
569
570 onResumed: {
571 console.warn("onResumed: " + modelData.packageName + " " + success);
572 if (success)
573 modelData.updateState = true;
574 else
575 modelData.updateState = false;
576 }
577
578 onCanceled: {
579 console.warn("onCanceled: " + modelData.packageName + " " + success);
580 if (success) {
581 modelData.updateState = false;
582 modelData.selected = false;
583 }
584 }
585
586 onErrorFound: {
587 console.warn("onErrorFound: " + modelData.packageName + " " + error);
588 modelData.updateState = false;
589 retry = true;
590 installing = false;
591 }
592 }
593
594 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
595 }
596
597 Item {
598 anchors {
599 left: parent.left
600 right: parent.right
601 }
602 height: childrenRect.height
603 Label {
604 id: labelVersion
605 objectName: "labelVersion"
606 anchors.left: parent.left
607 text: modelData.remoteVersion ? i18n.tr("Version: ") + modelData.remoteVersion : ""
608 elide: Text.ElideRight
609 fontSize: "small"
610 }
611
612 Label {
613 id: labelSize
614 objectName: "labelSize"
615 anchors.right: parent.right
616 text: Utilities.formatSize(modelData.binaryFilesize)
617 fontSize: "small"
618 visible: !labelUpdateStatus.visible && !installing && !installed
619 }
620 }
621 }443 }
622 }444 }
623 }445 }
@@ -633,7 +455,7 @@
633 left: parent.left455 left: parent.left
634 right: parent.right456 right: parent.right
635 }457 }
636 ListItem.ThinDivider {}458 ListItems.ThinDivider {}
637459
638 Label {460 Label {
639 text: i18n.tr("Sign in to Ubuntu One to receive updates for apps.")461 text: i18n.tr("Sign in to Ubuntu One to receive updates for apps.")
@@ -652,6 +474,7 @@
652 leftMargin: units.gu(2)474 leftMargin: units.gu(2)
653 rightMargin: units.gu(2)475 rightMargin: units.gu(2)
654 }476 }
477 color: UbuntuColors.lightGrey
655 onClicked: uoaConfig.exec()478 onClicked: uoaConfig.exec()
656 }479 }
657480
@@ -727,8 +550,8 @@
727 anchors.bottom: parent.bottom550 anchors.bottom: parent.bottom
728 anchors.left: parent.left551 anchors.left: parent.left
729 anchors.right: parent.right552 anchors.right: parent.right
730 ListItem.ThinDivider {}553 ListItems.ThinDivider {}
731 ListItem.SingleValue {554 SettingsListItems.SingleValueProgression {
732 objectName: "configuration"555 objectName: "configuration"
733 text: i18n.tr("Auto download")556 text: i18n.tr("Auto download")
734 value: {557 value: {
@@ -739,7 +562,6 @@
739 else if (UpdateManager.downloadMode === 2)562 else if (UpdateManager.downloadMode === 2)
740 return i18n.tr("Always")563 return i18n.tr("Always")
741 }564 }
742 progression: true
743 onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml"))565 onClicked: pageStack.push(Qt.resolvedUrl("Configuration.qml"))
744 }566 }
745 }567 }
746568
=== added file 'plugins/system-update/UpdateItem.qml'
--- plugins/system-update/UpdateItem.qml 1970-01-01 00:00:00 +0000
+++ plugins/system-update/UpdateItem.qml 2015-12-09 19:33:29 +0000
@@ -0,0 +1,251 @@
1/*
2 * This file is part of system-settings
3 *
4 * Copyright (C) 2015 Canonical Ltd.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 3, as published
8 * by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranties of
12 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13 * PURPOSE. See the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19import QtQuick 2.4
20import Ubuntu.Components 1.3
21import Ubuntu.Components.Popups 1.3
22
23ListItem {
24 id: updateItem
25 property alias actionButton: buttonAppUpdate
26 property alias progressBar: progress
27 property variant updateData
28 property variant tracker
29 property bool installing: !updateData.systemUpdate && (updateData.updateReady || (progressBar.value === progressBar.maximumValue))
30 property bool installed: false
31 property bool retry: false
32 height: layout.height + divider.height
33
34 SlotsLayout {
35 id: layout
36 padding {
37 top: units.gu(1)
38 bottom: units.gu(1)
39 }
40 visible: opacity > 0
41 opacity: installed ? 0 : 1
42 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
43
44 UbuntuShape {
45 SlotsLayout.position: SlotsLayout.Leading
46 width: units.gu(4)
47 height: width
48 source: Image {
49 anchors.fill: parent
50 source: Qt.resolvedUrl(updateData.iconUrl)
51 }
52 aspect: updateData.systemUpdate ? UbuntuShape.Flat : UbuntuShape.Inset
53 }
54
55 Column {
56 SlotsLayout.position: SlotsLayout.Trailing
57 width: buttonAppUpdate.width
58
59 Button {
60 id: buttonAppUpdate
61 objectName: "buttonAppUpdate"
62 anchors {
63 right: parent.right
64 }
65 height: labelTitle.height + units.gu(1)
66 enabled: !installing
67 text: {
68 if (retry)
69 return i18n.tr("Retry");
70 if (updateData.systemUpdate) {
71 if (updateData.updateReady) {
72 return i18n.tr("Update");
73 } else if (!updateData.updateState && !updateData.selected) {
74 return i18n.tr("Download");
75 }
76 }
77 if (updateData.updateState) {
78 return i18n.tr("Pause");
79 } else if (updateData.selected) {
80 return i18n.tr("Resume");
81 }
82 return i18n.tr("Update");
83 }
84
85 onClicked: {
86 if (retry) {
87 retry = false;
88 return UpdateManager.retryDownload(updateData.packageName);
89 }
90 if (updateData.updateState)
91 return pause();
92 if (!updateData.updateState && updateData.selected)
93 return resume();
94 if (!updateData.updateState && !updateData.selected && !updateData.updateReady)
95 return start();
96 if (updateData.updateReady)
97 PopupUtils.open(dialogInstallComponent);
98 }
99 }
100
101 Label {
102 id: updateStatusLabel
103 anchors.right: parent.right
104 visible: updateData.updateState && !retry
105 fontSize: "small"
106 text: {
107 if (installing)
108 return i18n.tr("Installing");
109 if (installed)
110 return i18n.tr("Installed");
111 return i18n.tr("%1 of %2").arg(
112 Utilities.formatSize(updateData.binaryFilesize * (progress.value * 0.01))).arg(
113 Utilities.formatSize(updateData.binaryFilesize)
114 );
115 }
116 }
117 }
118
119 mainSlot: Column {
120 id: updateColumn
121 objectName: "updateColumn"
122 SlotsLayout.padding.top: 0
123 spacing: units.gu(0.5)
124 height: childrenRect.height
125
126 Label {
127 id: labelTitle
128 objectName: "labelTitle"
129 text: updateData.title
130 font.bold: true
131 elide: Text.ElideMiddle
132 }
133
134 Item {
135 anchors {
136 left: parent.left
137 right: parent.right
138 }
139 height: childrenRect.height
140 Row {
141 spacing: units.gu(1)
142 Label {
143 id: labelVersion
144 objectName: "labelVersion"
145 text: updateData.remoteVersion ? i18n.tr("Version: ") + updateData.remoteVersion : ""
146 elide: Text.ElideRight
147 fontSize: "small"
148 }
149
150 Icon {
151 name: "info"
152 height: labelVersion.height
153 width: height
154 MouseArea {
155 anchors.fill: parent
156 onClicked: {
157 PopupUtils.open(infoDialogComponent, undefined, {"title": updateData.title, "version": updateData.remoteVersion, "changelog": updateData.changelog})
158 console.warn(updateData.changelog)
159 }
160 }
161 }
162 }
163 }
164
165 /* Not in the new design?
166 Item {
167 id: labelUpdateStatus
168 anchors {
169 left: parent.left
170 right: parent.right
171 }
172 height: childrenRect.height
173 visible: opacity > 0
174 opacity: (updateData.updateState && updateData.selected && !updateData.updateReady) || (installing || installed) ? 1 : 0
175 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
176 Label {
177 objectName: "labelUpdateStatus"
178 anchors.left: parent.left
179 elide: Text.ElideMiddle
180 fontSize: "small"
181 text: {
182 if (retry)
183 return updateData.error;
184 if (installing)
185 return i18n.tr("Installing");
186 if (installed)
187 return i18n.tr("Installed");
188 return i18n.tr("Downloading");
189 }
190 }
191 }
192 */
193
194 ProgressBar {
195 id: progress
196 objectName: "progress"
197 height: units.gu(2)
198 anchors {
199 left: parent.left
200 right: parent.right
201 }
202 visible: opacity > 0
203 opacity: updateData.selected && !updateData.updateReady && !installed ? 1 : 0
204 value: updateData.systemUpdate ? updateData.downloadProgress : tracker.progress
205 minimumValue: 0
206 maximumValue: 100
207
208 Behavior on opacity { PropertyAnimation { duration: UbuntuAnimation.SleepyDuration } }
209 }
210 }
211
212 Component {
213 id: infoDialogComponent
214 Dialog {
215 id: infoDialog
216 property string title
217 property string version
218 property string changelog
219
220 Column {
221 spacing: units.gu(2)
222 Label {
223 anchors.left: parent.left
224 text: title
225 fontSize: "x-large"
226 font.bold: true
227 }
228 Label {
229 anchors.left: parent.left
230 text: version
231 fontSize: "medium"
232 }
233 Label {
234 anchors.left: parent.left
235 text: changelog
236 fontSize: "medium"
237 }
238
239 Button {
240 anchors.right: parent.right
241 text: i18n.tr("OK")
242 width: units.gu(6)
243 onClicked: {
244 PopupUtils.close(infoDialog);
245 }
246 }
247 }
248 }
249 }
250 }
251}
0252
=== modified file 'plugins/system-update/network.cpp'
--- plugins/system-update/network.cpp 2015-12-01 17:55:31 +0000
+++ plugins/system-update/network.cpp 2015-12-09 19:33:29 +0000
@@ -231,6 +231,7 @@
231 auto icon_url = object["icon_url"].toString();231 auto icon_url = object["icon_url"].toString();
232 auto url = object["download_url"].toString();232 auto url = object["download_url"].toString();
233 auto download_sha512 = object["download_sha512"].toString();233 auto download_sha512 = object["download_sha512"].toString();
234 auto changelog = object["changelog"].toString();
234 auto size = object["binary_filesize"].toInt();235 auto size = object["binary_filesize"].toInt();
235 if (m_apps.contains(name)) {236 if (m_apps.contains(name)) {
236 m_apps[name]->setRemoteVersion(version);237 m_apps[name]->setRemoteVersion(version);
@@ -239,6 +240,7 @@
239 m_apps[name]->setDownloadUrl(url);240 m_apps[name]->setDownloadUrl(url);
240 m_apps[name]->setBinaryFilesize(size);241 m_apps[name]->setBinaryFilesize(size);
241 m_apps[name]->setDownloadSha512(download_sha512);242 m_apps[name]->setDownloadSha512(download_sha512);
243 m_apps[name]->setChangelog(changelog);
242 updates = true;244 updates = true;
243 }245 }
244 }246 }
245247
=== modified file 'plugins/system-update/update.h'
--- plugins/system-update/update.h 2015-08-27 09:40:29 +0000
+++ plugins/system-update/update.h 2015-12-09 19:33:29 +0000
@@ -57,6 +57,7 @@
57 Q_PROPERTY(QString downloadUrl READ downloadUrl NOTIFY downloadUrlChanged)57 Q_PROPERTY(QString downloadUrl READ downloadUrl NOTIFY downloadUrlChanged)
58 Q_PROPERTY(QString clickToken READ clickToken NOTIFY clickTokenChanged)58 Q_PROPERTY(QString clickToken READ clickToken NOTIFY clickTokenChanged)
59 Q_PROPERTY(QString downloadSha512 READ downloadSha512 NOTIFY downloadSha512Changed)59 Q_PROPERTY(QString downloadSha512 READ downloadSha512 NOTIFY downloadSha512Changed)
60 Q_PROPERTY(QString changelog READ changelog WRITE setChangelog NOTIFY changelogChanged)
6061
61Q_SIGNALS:62Q_SIGNALS:
62 void systemUpdateChanged();63 void systemUpdateChanged();
@@ -76,6 +77,7 @@
76 void clickTokenChanged();77 void clickTokenChanged();
77 void packageNameChanged();78 void packageNameChanged();
78 void downloadSha512Changed();79 void downloadSha512Changed();
80 void changelogChanged();
7981
80public:82public:
81 explicit Update(QObject *parent = 0);83 explicit Update(QObject *parent = 0);
@@ -99,6 +101,7 @@
99 QString downloadUrl() { return m_downloadUrl; }101 QString downloadUrl() { return m_downloadUrl; }
100 QString clickToken() { return m_clickToken; }102 QString clickToken() { return m_clickToken; }
101 QString downloadSha512() { return m_download_sha512; }103 QString downloadSha512() { return m_download_sha512; }
104 QString changelog() { return m_changelog; }
102105
103 void setSystemUpdate(bool isSystem);106 void setSystemUpdate(bool isSystem);
104 void initializeApplication(QString packagename, QString title,107 void initializeApplication(QString packagename, QString title,
@@ -118,6 +121,7 @@
118 void setDownloadUrl(const QString &url);121 void setDownloadUrl(const QString &url);
119 void setClickToken(const QString &token) { m_clickToken = token; Q_EMIT clickTokenChanged(); }122 void setClickToken(const QString &token) { m_clickToken = token; Q_EMIT clickTokenChanged(); }
120 void setDownloadSha512(const QString &sha512) { m_download_sha512 = sha512; Q_EMIT downloadSha512Changed(); }123 void setDownloadSha512(const QString &sha512) { m_download_sha512 = sha512; Q_EMIT downloadSha512Changed(); }
124 void setChangelog(const QString &changelog) { m_changelog = changelog; Q_EMIT changelogChanged(); }
121125
122private:126private:
123 int m_binary_filesize;127 int m_binary_filesize;
@@ -138,6 +142,7 @@
138 bool m_update_ready;142 bool m_update_ready;
139 bool m_update_state;143 bool m_update_state;
140 QString m_download_sha512;144 QString m_download_sha512;
145 QString m_changelog;
141146
142 bool getIgnoreUpdates();147 bool getIgnoreUpdates();
143};148};

Subscribers

People subscribed via source and target branches