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

Proposed by Ken VanDine
Status: Superseded
Proposed branch: lp:~ken-vandine/ubuntu-system-settings/lp1505663
Merge into: lp:ubuntu-system-settings
Diff against target: 73 lines (+7/-23)
1 file modified
plugins/system-update/PageComponent.qml (+7/-23)
To merge this branch: bzr merge lp:~ken-vandine/ubuntu-system-settings/lp1505663
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Sebastien Bacher (community) Needs Fixing
Review via email: mp+275032@code.launchpad.net

This proposal has been superseded by a proposal from 2015-10-29.

Commit message

Ensure we only check for updates when NetworkingStatus.online is true

Description of the change

Ensure we only check for updates when NetworkingStatus.online is true

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks, you have a console.warn() in there though, I guess it's a debug leftover?

the onClicked change also needs wrong, shouldn't we rather disable the button instead of having the action showed to the user but not doing that it should?

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

Merged trunk

1547. By Ken VanDine

merged retry removable branch

1548. By Ken VanDine

Removed debugging output

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

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/system-update/PageComponent.qml'
--- plugins/system-update/PageComponent.qml 2015-09-18 14:18:11 +0000
+++ plugins/system-update/PageComponent.qml 2015-10-29 20:39:08 +0000
@@ -66,6 +66,7 @@
66 id: networkingStatus66 id: networkingStatus
67 target: NetworkingStatus67 target: NetworkingStatus
68 onOnlineChanged: {68 onOnlineChanged: {
69 console.warn("Online: " + NetworkingStatus.online);
69 if (NetworkingStatus.online) {70 if (NetworkingStatus.online) {
70 activity.running = true;71 activity.running = true;
71 root.state = "SEARCHING";72 root.state = "SEARCHING";
@@ -84,7 +85,8 @@
84 onFinished: {85 onFinished: {
85 credentialsNotification.visible = false;86 credentialsNotification.visible = false;
86 root.state = "SEARCHING";87 root.state = "SEARCHING";
87 UpdateManager.checkUpdates();88 if (NetworkingStatus.online)
89 UpdateManager.checkUpdates();
88 }90 }
89 }91 }
9092
@@ -147,7 +149,7 @@
147 PropertyChanges { target: installAllButton; visible: false}149 PropertyChanges { target: installAllButton; visible: false}
148 PropertyChanges { target: checkForUpdatesArea; visible: true}150 PropertyChanges { target: checkForUpdatesArea; visible: true}
149 PropertyChanges { target: updateNotification; visible: false}151 PropertyChanges { target: updateNotification; visible: false}
150 PropertyChanges { target: activity; running: true}152 PropertyChanges { target: activity; running: NetworkingStatus.online}
151 },153 },
152 State {154 State {
153 name: "NOUPDATES"155 name: "NOUPDATES"
@@ -179,7 +181,8 @@
179 Component.onCompleted: {181 Component.onCompleted: {
180 credentialsNotification.visible = false;182 credentialsNotification.visible = false;
181 root.state = "SEARCHING";183 root.state = "SEARCHING";
182 UpdateManager.checkUpdates();184 if (NetworkingStatus.online)
185 UpdateManager.checkUpdates();
183 }186 }
184187
185 onUpdateAvailableFound: {188 onUpdateAvailableFound: {
@@ -283,31 +286,12 @@
283 anchors {286 anchors {
284 left: activity.running ? activity.right : parent.left287 left: activity.running ? activity.right : parent.left
285 top: parent.top288 top: parent.top
286 right: btnRetry.visible ? btnRetry.left : parent.right289 right: parent.right
287 rightMargin: units.gu(2)290 rightMargin: units.gu(2)
288 leftMargin: units.gu(2)291 leftMargin: units.gu(2)
289 }292 }
290 height: parent.height293 height: parent.height
291 }294 }
292
293 Button {
294 id: btnRetry
295 text: i18n.tr("Retry")
296 color: UbuntuColors.orange
297 anchors {
298 right: parent.right
299 top: parent.top
300 bottom: parent.bottom
301 margins: units.gu(1)
302 }
303 visible: !activity.visible
304
305 onClicked: {
306 activity.running = true;
307 root.state = "SEARCHING";
308 UpdateManager.checkUpdates();
309 }
310 }
311 }295 }
312296
313 ListItem.SingleControl {297 ListItem.SingleControl {

Subscribers

People subscribed via source and target branches