Merge lp:~andrewsomething/ubuntu-system-settings-online-accounts/1235004 into lp:ubuntu-system-settings-online-accounts

Proposed by Andrew Starr-Bochicchio
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 56
Merged at revision: 60
Proposed branch: lp:~andrewsomething/ubuntu-system-settings-online-accounts/1235004
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 64 lines (+34/-0)
1 file modified
src/module/OAuth.qml (+34/-0)
To merge this branch: bzr merge lp:~andrewsomething/ubuntu-system-settings-online-accounts/1235004
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ken VanDine Approve
Alberto Mardegan (community) Approve
Review via email: mp+190160@code.launchpad.net

This proposal supersedes a proposal from 2013-10-08.

Commit message

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote : Posted in a previous version of this proposal

This looks pretty good, but you can simplify the visible property. Instead of:

 visible: loading = true

Since loading is a bool, you can just do this:

 visible: loading

review: Needs Fixing
Revision history for this message
Alberto Mardegan (mardy) wrote : Posted in a previous version of this proposal

Hi Andrew, this is excellent! Thanks a lot!

Just one very minor thing: can you replace the "..." with "…" in line 45?

review: Needs Fixing
Revision history for this message
Alberto Mardegan (mardy) wrote :

Looks good to me!

BTW, Andrew, you don't have to request a new merge when you add some commit. Just push it into the same branch, and launchpad will automatically update the diff. :-)

review: Approve
Revision history for this message
Ken VanDine (ken-vandine) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/module/OAuth.qml'
2--- src/module/OAuth.qml 2013-10-08 12:16:19 +0000
3+++ src/module/OAuth.qml 2013-10-09 15:23:24 +0000
4@@ -33,6 +33,7 @@
5 property bool isNewAccount: false
6 property variant __account: account
7 property alias globalAccountService: globalAccountSettings
8+ property bool loading: true
9
10 signal authenticated(variant reply)
11 signal authenticationError(variant error)
12@@ -40,6 +41,7 @@
13
14 anchors.left: parent.left
15 anchors.right: parent.right
16+ spacing: units.gu(2)
17
18 Component.onCompleted: {
19 isNewAccount = (account.accountId === 0)
20@@ -73,7 +75,37 @@
21 account: __account.objectHandle
22 }
23
24+ ListItem.Base {
25+ visible: loading
26+ height: units.gu(7)
27+ showDivider: false
28+
29+ Item {
30+ height: units.gu(5)
31+ width: units.gu(30)
32+ anchors.horizontalCenter: parent.horizontalCenter
33+ anchors.top: parent.top
34+ anchors.margins: units.gu(1)
35+
36+ ActivityIndicator {
37+ id: loadingIndicator
38+ anchors.verticalCenter: parent.verticalCenter
39+ anchors.left: parent.left
40+ anchors.leftMargin: units.gu(5)
41+ running: loading
42+ z: 1
43+ }
44+ Label {
45+ text: i18n.dtr("ubuntu-system-settings-online-accounts", "Loading…")
46+ anchors.verticalCenter: parent.verticalCenter
47+ anchors.left: loadingIndicator.right
48+ anchors.leftMargin: units.gu(3)
49+ }
50+ }
51+ }
52+
53 ListItem.SingleControl {
54+ showDivider: false
55 control: Button {
56 text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel")
57 width: parent.width - units.gu(4)
58@@ -148,4 +180,6 @@
59 onAuthenticated: completeCreation(reply)
60
61 onAuthenticationError: root.cancel()
62+
63+ onFinished: loading = false
64 }

Subscribers

People subscribed via source and target branches