Merge lp:~mardy/reminders-app/app-access2 into lp:reminders-app

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Planella
Approved revision: 45
Merged at revision: 143
Proposed branch: lp:~mardy/reminders-app/app-access2
Merge into: lp:reminders-app
Diff against target: 160 lines (+40/-3)
7 files modified
CMakeLists.txt (+4/-0)
com.ubuntu.reminders_reminders.application (+11/-0)
debian/control (+1/-0)
debian/reminders-app.install (+1/-0)
manifest.json (+2/-1)
src/app/qml/reminders.qml (+9/-2)
src/app/qml/ui/AccountSelectorPage.qml (+12/-0)
To merge this branch: bzr merge lp:~mardy/reminders-app/app-access2
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
David Planella Approve
Review via email: mp+219798@code.launchpad.net

Commit message

Request access to the Evernote account

Use the new OnlineAccounts.Client module to setup the Evernote account.

Description of the change

Request access to the Evernote account

Use the new OnlineAccounts.Client module to setup the Evernote account.

Notes:
- I tested this only on the desktop.
- (not directly related to this branch) The AccountSelectorPage will never open, because it's impossible to add a second account; I'd suggest adding an "Accounts" button on the toolbar to open it, so that we allow selecting accounts and create new ones. Or just remove the AccountSelectorPage, if we don't want to support having more than one account.

To post a comment you must log in.
lp:~mardy/reminders-app/app-access2 updated
43. By Alberto Mardegan

Translate button label

44. By Alberto Mardegan

Add missing dependency

Revision history for this message
David Planella (dpm) wrote :

This works well on the device, but when running the app from the desktop with Qt Creator, I get:

 file:///tmp/build-app-access2-Desktop-Default/src/app/qml/reminders.qml:326:17: Cannot assign to non-existent property "applicationId"
                      applicationId: "com.ubuntu.reminders_reminders"
                      ^
I manually installed /usr/share/accounts/applications/com.ubuntu.reminders_reminders.application, but that did not seem to make a difference.

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

In the last commit I added "qtdeclarative5-online-accounts-client0.1 (>= 0.3)" to debian/control; do you have it? (I have 0.3+14.10.20140506.1-0ubuntu1, FWIW)

Revision history for this message
David Planella (dpm) wrote :

I do, but while the 0.3 version is the same, you seem to have a more recent date, and for utopic

$ apt-cache policy qtdeclarative5-online-accounts-client0.1
qtdeclarative5-online-accounts-client0.1:
  Instaŀlat: 0.3+14.04.20140328-0ubuntu3
  Candidat: 0.3+14.04.20140328-0ubuntu3
  Taula de versió:
 *** 0.3+14.04.20140328-0ubuntu3 0
        500 http://de.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

lp:~mardy/reminders-app/app-access2 updated
45. By Alberto Mardegan

Update dependency version

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
David Planella (dpm) wrote :

Thanks, it seems that on 14.04 we'll need a backported version of some Online Accounts packages for Reminders to work. Alberto has put them in the core apps PPA, so if you are developing on 14.04, make sure you've added that PPA and that you update these packages:

qtdeclarative5-online-accounts-client0.1 (version: 0.3+14.10.20140506.1-0ubuntu2)
ubuntu-system-settings-online-accounts (version: 0.3+14.10.20140506.1)

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-05-12 11:19:30 +0000
3+++ CMakeLists.txt 2014-05-16 12:52:31 +0000
4@@ -12,6 +12,7 @@
5
6 set(APP_NAME reminders)
7 set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
8+set(APPLICATION_FILE "${PROJECT_NAME}_${APP_NAME}.application")
9 set(ICON ${APP_NAME}.png)
10 set(AUTOPILOT_DIR reminders)
11 set(APP_HARDCODE reminders)
12@@ -33,6 +34,7 @@
13 set(BIN_DIR /lib/${ARCH_TRIPLET}/bin)
14 set(DATA_DIR /)
15 set(DESKTOP_DIR ${DATA_DIR})
16+ set(APPLICATION_DIR ${DATA_DIR})
17 if(NOT BZR_REVNO)
18 set(BZR_REVNO "latest")
19 endif(NOT BZR_REVNO)
20@@ -50,6 +52,7 @@
21 set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE})
22 set(ICON "${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}")
23 set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications)
24+ set(APPLICATION_DIR ${CMAKE_INSTALL_DATADIR}/accounts/applications)
25 endif(CLICK_MODE)
26
27 file(GLOB_RECURSE I18N_SRC_FILES
28@@ -64,6 +67,7 @@
29
30 configure_file(${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
31 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
32+install(FILES ${APPLICATION_FILE} DESTINATION ${APPLICATION_DIR})
33
34 # Tests
35 enable_testing()
36
37=== added file 'com.ubuntu.reminders_reminders.application'
38--- com.ubuntu.reminders_reminders.application 1970-01-01 00:00:00 +0000
39+++ com.ubuntu.reminders_reminders.application 2014-05-16 12:52:31 +0000
40@@ -0,0 +1,11 @@
41+<?xml version="1.0" encoding="UTF-8" ?>
42+<application id="com.ubuntu.reminders_reminders">
43+ <description>Reminders</description>
44+
45+ <services>
46+ <service id="evernote">
47+ <description>Synchronize your reminders with Evernote</description>
48+ </service>
49+ </services>
50+
51+</application>
52
53=== modified file 'debian/control'
54--- debian/control 2014-05-08 17:56:49 +0000
55+++ debian/control 2014-05-16 12:52:31 +0000
56@@ -22,6 +22,7 @@
57 qtdeclarative5-evernote0.1,
58 qtdeclarative5-ubuntu-ui-toolkit-plugin | qt-components-ubuntu,
59 qtdeclarative5-localstorage-plugin,
60+ qtdeclarative5-online-accounts-client0.1 (>= 0.3+14.10.20140506),
61 qtdeclarative5-quicklayouts-plugin,
62 qtdeclarative5-qtquick2-plugin,
63 signon-plugin-oauth2 (>= 0.19-0~57~),
64
65=== modified file 'debian/reminders-app.install'
66--- debian/reminders-app.install 2014-01-30 13:45:37 +0000
67+++ debian/reminders-app.install 2014-05-16 12:52:31 +0000
68@@ -1,4 +1,5 @@
69 usr/bin/*
70+usr/share/accounts/applications/*
71 usr/share/applications/*
72 usr/share/locale
73 usr/share/reminders/*
74
75=== modified file 'manifest.json'
76--- manifest.json 2014-05-07 19:11:05 +0000
77+++ manifest.json 2014-05-16 12:52:31 +0000
78@@ -4,6 +4,7 @@
79 "architecture": "armhf",
80 "hooks": {
81 "reminders": {
82+ "account-application": "com.ubuntu.reminders_reminders.application",
83 "apparmor": "apparmor.json",
84 "desktop": "com.ubuntu.reminders.desktop"
85 }
86@@ -19,4 +20,4 @@
87 "x-test": {
88 "autopilot": "reminders"
89 }
90-}
91\ No newline at end of file
92+}
93
94=== modified file 'src/app/qml/reminders.qml'
95--- src/app/qml/reminders.qml 2014-05-10 09:22:59 +0000
96+++ src/app/qml/reminders.qml 2014-05-16 12:52:31 +0000
97@@ -24,6 +24,7 @@
98 import "ui"
99 import Evernote 0.1
100 import Ubuntu.OnlineAccounts 0.1
101+import Ubuntu.OnlineAccounts.Client 0.1
102
103 /*!
104 \brief MainView with a Label and Button elements.
105@@ -320,11 +321,17 @@
106 }
107 }
108
109+ Setup {
110+ id: setup
111+ applicationId: "com.ubuntu.reminders_reminders"
112+ providerId: "evernote"
113+ }
114+
115 Button {
116 objectName: "openAccountButton"
117- text: i18n.tr("Open account settings")
118+ text: i18n.tr("Add account")
119 color: UbuntuColors.orange
120- onClicked: Qt.openUrlExternally("settings:///system/online-accounts")
121+ onClicked: setup.exec()
122 }
123 }
124 }
125
126=== modified file 'src/app/qml/ui/AccountSelectorPage.qml'
127--- src/app/qml/ui/AccountSelectorPage.qml 2014-03-13 18:11:32 +0000
128+++ src/app/qml/ui/AccountSelectorPage.qml 2014-05-16 12:52:31 +0000
129@@ -20,6 +20,7 @@
130 import Ubuntu.Components 0.1
131 import Ubuntu.Components.ListItems 0.1
132 import Ubuntu.OnlineAccounts 0.1
133+import Ubuntu.OnlineAccounts.Client 0.1
134 import Evernote 0.1
135
136 Page {
137@@ -32,6 +33,12 @@
138
139 signal accountSelected(var handle)
140
141+ Setup {
142+ id: setup
143+ applicationId: "com.ubuntu.reminders_reminders"
144+ providerId: "evernote"
145+ }
146+
147 Column {
148 anchors { fill: parent; margins: units.gu(2) }
149 spacing: units.gu(1)
150@@ -51,6 +58,11 @@
151 onClicked: root.accountSelected(accountServiceHandle)
152 }
153 }
154+
155+ footer: Button {
156+ text: i18n.tr("Add account")
157+ onClicked: setup.exec()
158+ }
159 }
160 }
161

Subscribers

People subscribed via source and target branches