Merge lp:~mzanetti/reminders-app/single-account-setup into lp:reminders-app

Proposed by Michael Zanetti
Status: Merged
Approved by: Riccardo Padovani
Approved revision: 367
Merged at revision: 370
Proposed branch: lp:~mzanetti/reminders-app/single-account-setup
Merge into: lp:reminders-app
Diff against target: 74 lines (+10/-13)
2 files modified
src/app/qml/reminders.qml (+8/-7)
src/app/qml/ui/AccountSelectorPage.qml (+2/-6)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/single-account-setup
Reviewer Review Type Date Requested Status
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+251649@code.launchpad.net

Commit message

Only keep a single AccountSetup declaration

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

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/reminders.qml'
2--- src/app/qml/reminders.qml 2015-03-01 22:32:41 +0000
3+++ src/app/qml/reminders.qml 2015-03-03 20:07:09 +0000
4@@ -104,7 +104,7 @@
5 accountPage.destroy(100)
6 }
7 var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));
8- accountPage = component.createObject(root, { accounts: accounts, unauthorizedAccounts: unauthorizedAccounts });
9+ accountPage = component.createObject(root, { accounts: accounts, unauthorizedAccounts: unauthorizedAccounts, oaSetup: setup });
10 accountPage.accountSelected.connect(function(username, handle) { accountService.startAuthentication(username, handle); pagestack.pop(); root.accountPage = null });
11 pagestack.push(accountPage);
12 }
13@@ -548,6 +548,7 @@
14 page: AccountSelectorPage {
15 accounts: accounts
16 unauthorizedAccounts: true
17+ oaSetup: setup
18 onAccountSelected: {
19 accountService.startAuthentication(username, handle)
20 rootTabs.selectedTabIndex = 0;
21@@ -593,6 +594,12 @@
22 }
23 }
24
25+ Setup {
26+ id: setup
27+ applicationId: "com.ubuntu.reminders_reminders"
28+ providerId: useSandbox ? "com.ubuntu.reminders_evernote-account-plugin-sandbox" : "com.ubuntu.reminders_evernote-account-plugin"
29+ }
30+
31 Component {
32 id: noAccountDialog
33 Dialog {
34@@ -613,12 +620,6 @@
35 }
36 }
37
38- Setup {
39- id: setup
40- applicationId: "com.ubuntu.reminders_reminders"
41- providerId: useSandbox ? "com.ubuntu.reminders_evernote-account-plugin-sandbox" : "com.ubuntu.reminders_evernote-account-plugin"
42- }
43-
44 RowLayout {
45 Button {
46 objectName: "openAccountButton"
47
48=== modified file 'src/app/qml/ui/AccountSelectorPage.qml'
49--- src/app/qml/ui/AccountSelectorPage.qml 2015-03-01 22:11:43 +0000
50+++ src/app/qml/ui/AccountSelectorPage.qml 2015-03-03 20:07:09 +0000
51@@ -30,14 +30,10 @@
52
53 property alias accounts: optionSelector.model
54 property bool unauthorizedAccounts
55+ property var oaSetup: null
56
57 signal accountSelected(string username, var handle)
58
59- Setup {
60- id: setup
61- applicationId: "com.ubuntu.reminders_reminders"
62- providerId: useSandbox ? "evernote-sandbox" : "evernote"
63- }
64
65 Column {
66 anchors { fill: parent; margins: units.gu(2) }
67@@ -94,7 +90,7 @@
68 width: parent.width - units.gu(2)
69 text: i18n.tr("Add new account")
70 color: UbuntuColors.orange
71- onClicked: setup.exec()
72+ onClicked: root.oaSetup.exec()
73 }
74 }
75

Subscribers

People subscribed via source and target branches