Merge lp:~mzanetti/reminders-app/busy-init into lp:reminders-app

Proposed by Michael Zanetti
Status: Merged
Approved by: Riccardo Padovani
Approved revision: 269
Merged at revision: 269
Proposed branch: lp:~mzanetti/reminders-app/busy-init
Merge into: lp:reminders-app
Diff against target: 153 lines (+27/-17)
2 files modified
po/com.ubuntu.reminders.pot (+8/-8)
src/app/qml/reminders.qml (+19/-9)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/busy-init
Reviewer Review Type Date Requested Status
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+237674@code.launchpad.net

Commit message

improve startup sequence

* clean up debug prints
* replace the "No notes available" text while not connected with an ActivityIndicator

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

LGTM, but you forgot few semicolons :-)
Reported in inline comments

lp:~mzanetti/reminders-app/busy-init updated
268. By Michael Zanetti

revert unwanted change

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
lp:~mzanetti/reminders-app/busy-init updated
269. By Michael Zanetti

fix missing semicolons

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> LGTM, but you forgot few semicolons :-)
> Reported in inline comments

all fixed

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

lgtm, thanks for your work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/com.ubuntu.reminders.pot'
2--- po/com.ubuntu.reminders.pot 2014-09-28 09:10:46 +0000
3+++ po/com.ubuntu.reminders.pot 2014-10-09 16:42:29 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: \n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2014-09-28 11:05+0200\n"
9+"POT-Creation-Date: 2014-10-09 18:42+0200\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13@@ -17,7 +17,7 @@
14 "Content-Type: text/plain; charset=CHARSET\n"
15 "Content-Transfer-Encoding: 8bit\n"
16
17-#: com.ubuntu.reminders.desktop.in.in.h:1 src/app/qml/reminders.qml:266
18+#: com.ubuntu.reminders.desktop.in.in.h:1 src/app/qml/reminders.qml:268
19 msgid "Reminders"
20 msgstr ""
21
22@@ -55,29 +55,29 @@
23 msgid "Mark as done"
24 msgstr ""
25
26-#: src/app/qml/reminders.qml:205
27+#: src/app/qml/reminders.qml:207
28 msgid "Notes"
29 msgstr ""
30
31-#: src/app/qml/reminders.qml:236
32+#: src/app/qml/reminders.qml:238
33 msgid "Notebooks"
34 msgstr ""
35
36-#: src/app/qml/reminders.qml:286
37+#: src/app/qml/reminders.qml:296
38 msgid ""
39 "No note selected.\n"
40 "Select a note to see it in detail."
41 msgstr ""
42
43-#: src/app/qml/reminders.qml:323
44+#: src/app/qml/reminders.qml:333
45 msgid "No account available"
46 msgstr ""
47
48-#: src/app/qml/reminders.qml:324
49+#: src/app/qml/reminders.qml:334
50 msgid "Please configure and authorize an Evernote account in System Settings"
51 msgstr ""
52
53-#: src/app/qml/reminders.qml:344 src/app/qml/ui/AccountSelectorPage.qml:63
54+#: src/app/qml/reminders.qml:354 src/app/qml/ui/AccountSelectorPage.qml:63
55 msgid "Add account"
56 msgstr ""
57
58
59=== modified file 'src/app/qml/reminders.qml'
60--- src/app/qml/reminders.qml 2014-09-23 20:56:26 +0000
61+++ src/app/qml/reminders.qml 2014-10-09 16:42:29 +0000
62@@ -26,10 +26,6 @@
63 import Ubuntu.OnlineAccounts 0.1
64 import Ubuntu.OnlineAccounts.Client 0.1
65
66-/*!
67- \brief MainView with a Label and Button elements.
68-*/
69-
70 MainView {
71 id: root
72
73@@ -46,12 +42,10 @@
74 when the device is rotated. The default is false.
75 */
76 //automaticOrientation: true
77- onWidthChanged: print("********************* width", width)
78
79 property bool narrowMode: root.width < units.gu(80)
80
81 onNarrowModeChanged: {
82- print("#################################", narrowMode)
83 if (narrowMode) {
84 // Clean the toolbar
85 notesPage.selectedNote = null;
86@@ -68,7 +62,7 @@
87 }
88 var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));
89 accountPage = component.createObject(root, {accounts: accounts, isChangingAccount: isChangingAccount});
90- accountPage.accountSelected.connect(function(handle) { accountService.objectHandle = handle; pagestack.pop(); });
91+ accountPage.accountSelected.connect(function(handle) { accountService.objectHandle = handle; pagestack.pop(); root.accountPage = null });
92 pagestack.push(accountPage);
93 }
94
95@@ -103,26 +97,33 @@
96 }
97
98 function doLogin() {
99- print("got accounts:", accounts.count)
100 var accountName = preferences.accountName;
101 if (accountName) {
102+ print("Last used account:", accountName);
103 var i;
104 for (i = 0; i < accounts.count; i++) {
105 if (accounts.get(i, "displayName") == accountName) {
106+ print("Account", accountName, "still valid in Online Accounts.");
107 accountService.objectHandle = accounts.get(i, "accountServiceHandle");
108 }
109 }
110 }
111+ if (accountName && !accountService.objectHandle) {
112+ print("Last used account doesn't seem to be valid any more");
113+ }
114+
115 if (!accountService.objectHandle) {
116 switch (accounts.count) {
117 case 0:
118- PopupUtils.open(noAccountDialog)
119+ PopupUtils.open(noAccountDialog, root);
120 print("No account available! Please setup an account in the system settings");
121 break;
122 case 1:
123+ print("Connecting to account", accounts.get(0, "displayName"), "as there is only one account available");
124 accountService.objectHandle = accounts.get(0, "accountServiceHandle");
125 break;
126 default:
127+ print("There are multiple accounts. Allowing user to select one.");
128 openAccountPage(false);
129 }
130 }
131@@ -195,6 +196,7 @@
132 PageStack {
133 id: pagestack
134 anchors.rightMargin: root.narrowMode ? 0 : root.width - units.gu(40)
135+ opacity: root.accountPage || EvernoteConnection.isConnected ? 1 : 0
136
137 Tabs {
138 id: rootTabs
139@@ -279,6 +281,14 @@
140 }
141 }
142
143+ ActivityIndicator {
144+ anchors.centerIn: parent
145+ anchors.verticalCenterOffset: units.gu(4.5)
146+ running: visible
147+ visible: !EvernoteConnection.isConnected && root.accountPage == null
148+ }
149+
150+
151 Label {
152 anchors.centerIn: parent
153 anchors.horizontalCenterOffset: pagestack.width / 2

Subscribers

People subscribed via source and target branches