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
=== modified file 'po/com.ubuntu.reminders.pot'
--- po/com.ubuntu.reminders.pot 2014-09-28 09:10:46 +0000
+++ po/com.ubuntu.reminders.pot 2014-10-09 16:42:29 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2014-09-28 11:05+0200\n"11"POT-Creation-Date: 2014-10-09 18:42+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,7 +17,7 @@
17"Content-Type: text/plain; charset=CHARSET\n"17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: com.ubuntu.reminders.desktop.in.in.h:1 src/app/qml/reminders.qml:26620#: com.ubuntu.reminders.desktop.in.in.h:1 src/app/qml/reminders.qml:268
21msgid "Reminders"21msgid "Reminders"
22msgstr ""22msgstr ""
2323
@@ -55,29 +55,29 @@
55msgid "Mark as done"55msgid "Mark as done"
56msgstr ""56msgstr ""
5757
58#: src/app/qml/reminders.qml:20558#: src/app/qml/reminders.qml:207
59msgid "Notes"59msgid "Notes"
60msgstr ""60msgstr ""
6161
62#: src/app/qml/reminders.qml:23662#: src/app/qml/reminders.qml:238
63msgid "Notebooks"63msgid "Notebooks"
64msgstr ""64msgstr ""
6565
66#: src/app/qml/reminders.qml:28666#: src/app/qml/reminders.qml:296
67msgid ""67msgid ""
68"No note selected.\n"68"No note selected.\n"
69"Select a note to see it in detail."69"Select a note to see it in detail."
70msgstr ""70msgstr ""
7171
72#: src/app/qml/reminders.qml:32372#: src/app/qml/reminders.qml:333
73msgid "No account available"73msgid "No account available"
74msgstr ""74msgstr ""
7575
76#: src/app/qml/reminders.qml:32476#: src/app/qml/reminders.qml:334
77msgid "Please configure and authorize an Evernote account in System Settings"77msgid "Please configure and authorize an Evernote account in System Settings"
78msgstr ""78msgstr ""
7979
80#: src/app/qml/reminders.qml:344 src/app/qml/ui/AccountSelectorPage.qml:6380#: src/app/qml/reminders.qml:354 src/app/qml/ui/AccountSelectorPage.qml:63
81msgid "Add account"81msgid "Add account"
82msgstr ""82msgstr ""
8383
8484
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml 2014-09-23 20:56:26 +0000
+++ src/app/qml/reminders.qml 2014-10-09 16:42:29 +0000
@@ -26,10 +26,6 @@
26import Ubuntu.OnlineAccounts 0.126import Ubuntu.OnlineAccounts 0.1
27import Ubuntu.OnlineAccounts.Client 0.127import Ubuntu.OnlineAccounts.Client 0.1
2828
29/*!
30 \brief MainView with a Label and Button elements.
31*/
32
33MainView {29MainView {
34 id: root30 id: root
3531
@@ -46,12 +42,10 @@
46 when the device is rotated. The default is false.42 when the device is rotated. The default is false.
47 */43 */
48 //automaticOrientation: true44 //automaticOrientation: true
49 onWidthChanged: print("********************* width", width)
5045
51 property bool narrowMode: root.width < units.gu(80)46 property bool narrowMode: root.width < units.gu(80)
5247
53 onNarrowModeChanged: {48 onNarrowModeChanged: {
54 print("#################################", narrowMode)
55 if (narrowMode) {49 if (narrowMode) {
56 // Clean the toolbar50 // Clean the toolbar
57 notesPage.selectedNote = null;51 notesPage.selectedNote = null;
@@ -68,7 +62,7 @@
68 }62 }
69 var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));63 var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));
70 accountPage = component.createObject(root, {accounts: accounts, isChangingAccount: isChangingAccount});64 accountPage = component.createObject(root, {accounts: accounts, isChangingAccount: isChangingAccount});
71 accountPage.accountSelected.connect(function(handle) { accountService.objectHandle = handle; pagestack.pop(); });65 accountPage.accountSelected.connect(function(handle) { accountService.objectHandle = handle; pagestack.pop(); root.accountPage = null });
72 pagestack.push(accountPage);66 pagestack.push(accountPage);
73 }67 }
7468
@@ -103,26 +97,33 @@
103 }97 }
10498
105 function doLogin() {99 function doLogin() {
106 print("got accounts:", accounts.count)
107 var accountName = preferences.accountName;100 var accountName = preferences.accountName;
108 if (accountName) {101 if (accountName) {
102 print("Last used account:", accountName);
109 var i;103 var i;
110 for (i = 0; i < accounts.count; i++) {104 for (i = 0; i < accounts.count; i++) {
111 if (accounts.get(i, "displayName") == accountName) {105 if (accounts.get(i, "displayName") == accountName) {
106 print("Account", accountName, "still valid in Online Accounts.");
112 accountService.objectHandle = accounts.get(i, "accountServiceHandle");107 accountService.objectHandle = accounts.get(i, "accountServiceHandle");
113 }108 }
114 }109 }
115 }110 }
111 if (accountName && !accountService.objectHandle) {
112 print("Last used account doesn't seem to be valid any more");
113 }
114
116 if (!accountService.objectHandle) {115 if (!accountService.objectHandle) {
117 switch (accounts.count) {116 switch (accounts.count) {
118 case 0:117 case 0:
119 PopupUtils.open(noAccountDialog)118 PopupUtils.open(noAccountDialog, root);
120 print("No account available! Please setup an account in the system settings");119 print("No account available! Please setup an account in the system settings");
121 break;120 break;
122 case 1:121 case 1:
122 print("Connecting to account", accounts.get(0, "displayName"), "as there is only one account available");
123 accountService.objectHandle = accounts.get(0, "accountServiceHandle");123 accountService.objectHandle = accounts.get(0, "accountServiceHandle");
124 break;124 break;
125 default:125 default:
126 print("There are multiple accounts. Allowing user to select one.");
126 openAccountPage(false);127 openAccountPage(false);
127 }128 }
128 }129 }
@@ -195,6 +196,7 @@
195 PageStack {196 PageStack {
196 id: pagestack197 id: pagestack
197 anchors.rightMargin: root.narrowMode ? 0 : root.width - units.gu(40)198 anchors.rightMargin: root.narrowMode ? 0 : root.width - units.gu(40)
199 opacity: root.accountPage || EvernoteConnection.isConnected ? 1 : 0
198200
199 Tabs {201 Tabs {
200 id: rootTabs202 id: rootTabs
@@ -279,6 +281,14 @@
279 }281 }
280 }282 }
281283
284 ActivityIndicator {
285 anchors.centerIn: parent
286 anchors.verticalCenterOffset: units.gu(4.5)
287 running: visible
288 visible: !EvernoteConnection.isConnected && root.accountPage == null
289 }
290
291
282 Label {292 Label {
283 anchors.centerIn: parent293 anchors.centerIn: parent
284 anchors.horizontalCenterOffset: pagestack.width / 2294 anchors.horizontalCenterOffset: pagestack.width / 2

Subscribers

People subscribed via source and target branches