Merge lp:~notes-app-dev/reminders-app/uriHandler into lp:reminders-app
- uriHandler
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | David Planella | ||||||||
Approved revision: | 307 | ||||||||
Merged at revision: | 313 | ||||||||
Proposed branch: | lp:~notes-app-dev/reminders-app/uriHandler | ||||||||
Merge into: | lp:reminders-app | ||||||||
Diff against target: |
381 lines (+146/-37) 8 files modified
CMakeLists.txt (+2/-2) manifest.json.in (+2/-1) reminders.url-dispatcher (+5/-0) src/app/main.cpp (+31/-25) src/app/qml/reminders.qml (+101/-3) src/app/qml/ui/NotebooksPage.qml (+2/-2) src/app/qml/ui/TagsPage.qml (+2/-2) tests/autopilot/reminders/tests/__init__.py (+1/-2) |
||||||||
To merge this branch: | bzr merge lp:~notes-app-dev/reminders-app/uriHandler | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Planella | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Michael Zanetti (community) | Needs Fixing | ||
Review via email: mp+239961@code.launchpad.net |
Commit message
Created URI handlers to load the app from the scope
Description of the change
Created URI handlers to load the app from the scope
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Penk Chen (penk) wrote : | # |
I'm not sure why we handle commands in onIsConnectedCh
Penk Chen (penk) wrote : | # |
If I moved the switch/case to onOpened, it works.
Also since commands[1] is guid, we need to compose a note object from it, for example:
root.
Michael Zanetti (mzanetti) wrote : | # |
@Penk: Good catch! However, your branch isn't good either.
So the thing is, if you close the application and call the uri handler, we need to wait until the app is connected in order to be able to display/create notes. However, if the app is already running and connected, this indeed won't be triggered. We need another check in the uri handler to see if we're connected or not, and then either trigger the execution immediately or onConnectedChanged.
Michael Zanetti (mzanetti) wrote : | # |
See inline comment
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:290
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 291. By Riccardo Padovani
-
Better implementation of uri hooks
Riccardo Padovani (rpadovani) wrote : | # |
I created an external function that is called both onOpened and when connection changes, so if is onOpened is already connected it works, otherwise the uri is saved and processed later
Michael Zanetti (mzanetti) wrote : | # |
inline...
- 292. By Riccardo Padovani
-
Fixed wrong function name
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:291
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:292
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 293. By Riccardo Padovani
-
Better implementation of the switch
Riccardo Padovani (rpadovani) wrote : | # |
Fixed
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:293
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Penk Chen (penk) wrote : | # |
Still, if reminder-app has not initialized before "Open in Reminder" button being pressed, onOpened will never get invoked.
Does it sound like an upstream issue to you?
Michael Zanetti (mzanetti) wrote : | # |
So for me the app launches successfully using the url-dispatcher tool. Haven't been able to invoke something from the scope, which does seem more like a scope issue to me. The scope was freezing all the time and clicking some buttons would only open empty previews.
However, this one doesn't work for me either:
url-dispatcher evernote://newnote
it launches the app, but never actually does the newnote thing.
David Planella (dpm) wrote : | # |
I think the issue is that there is no function to display the "New note" page in the frontend. See inline comment.
David Planella (dpm) wrote : | # |
Here's the output of running `url-dispatcher evernote://newnote` on the phone, with the uriHandler branch installed as a click: http://
- 294. By Riccardo Padovani
-
Wait NotesStore is ready before call processUri()
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:294
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Riccardo Padovani (rpadovani) wrote : | # |
I'm not able to fix that.
If the app is already open, all uri work well, also the newnote one.
On the other hand, if the app is closed, only sometimes they work.
If you place a console.log() in onOpened signal in uriHandler, you see that isn't alway called, so sometimes uri is simply ignored.
I don't know if it's something wrong in our implementation or in SDK.
53 + Connections {
54 + target: UriHandler
55 + onOpened: {
console.log('HERE')
56 + commands = uris.toString(
57 + processUri();
58 + }
59 + }
- 295. By Michael Zanetti
-
fix uri handler stuff
Michael Zanetti (mzanetti) wrote : | # |
Ok... I've cleaned this up a bit. tested with the following uris:
(Obviously those guids won't work for your account)
OK evernote://notes
OK evernote:
OK evernote:
OK evernote://newnote
OK evernote:
OK evernote:
OK evernote://tags
OK evernote:
OK evernote:
However, this really only seems to work when the app is already running. While url-dispatcher does start the app, the handler is never called.
Michael Zanetti (mzanetti) wrote : | # |
Here's the bug I reported: https:/
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:295
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:296
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 296. By Michael Zanetti
-
rework command line args, allow processing of passed uris.
- 297. By Michael Zanetti
-
merge
- 298. By Michael Zanetti
-
make it a bit nicer
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:298
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 299. By Michael Zanetti
-
try dropping some arguments
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:299
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 300. By Michael Zanetti
-
add testability option
- 301. By Michael Zanetti
-
clean cmdline args before processing
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:300
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:301
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:302
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 302. By Michael Zanetti
-
clean it up and make it nicer to extend
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:302
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 303. By Michael Zanetti
-
revert removal of the manual handling of the testability option. Seems it'll only land upstream with Qt 5.4
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:303
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 304. By Michael Zanetti
-
merge trunk
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:304
http://
Executed test runs:
UNSTABLE: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 305. By Michael Zanetti
-
handle -testability ourselves again, QCommandLineParser doesn't like the single "-"
- 306. By Michael Zanetti
-
drop hack for cleaning args, we can use -- to skip parsing of --desktop_file_hint
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:305
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 307. By Michael Zanetti
-
fix typo in description
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:307
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
David Planella (dpm) wrote : | # |
Works as expected with `url-dispatcher evernote://newnote` now, thanks!
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2014-10-23 21:27:46 +0000 |
3 | +++ CMakeLists.txt 2014-11-13 10:34:13 +0000 |
4 | @@ -20,7 +20,7 @@ |
5 | set(AUTOPILOT_DIR reminders) |
6 | set(APP_HARDCODE reminders) |
7 | set(MAIN_QML ${APP_HARDCODE}.qml) |
8 | -set(EXEC "reminders") |
9 | +set(EXEC "reminders %u") |
10 | set(UBUNTU_MANIFEST_PATH "manifest.json.in" CACHE INTERNAL "Relative path to the manifest file") |
11 | |
12 | set(ACCOUNT_ICON_DIR ${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps) |
13 | @@ -69,7 +69,7 @@ |
14 | |
15 | add_custom_target(com_ubuntu_reminders_CLICKFiles ALL SOURCES ${CLICK_FILES}) |
16 | |
17 | - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json reminders.apparmor |
18 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.json reminders.apparmor reminders.url-dispatcher |
19 | DESTINATION ${CMAKE_INSTALL_PREFIX}) |
20 | install(FILES COPYING DESTINATION ${CMAKE_INSTALL_PREFIX}) |
21 | else(CLICK_MODE) |
22 | |
23 | === modified file 'manifest.json.in' |
24 | --- manifest.json.in 2014-09-25 11:38:12 +0000 |
25 | +++ manifest.json.in 2014-11-13 10:34:13 +0000 |
26 | @@ -7,7 +7,8 @@ |
27 | "account-application": "com.ubuntu.reminders_reminders.application", |
28 | "account-service": "@ACCOUNT_SERVICE_DIR@/com.ubuntu.reminders_reminders.service", |
29 | "apparmor": "reminders.apparmor", |
30 | - "desktop": "com.ubuntu.reminders.desktop" |
31 | + "desktop": "com.ubuntu.reminders.desktop", |
32 | + "urls": "reminders.url-dispatcher" |
33 | }, |
34 | "evernote-account-plugin": { |
35 | "account-qml-plugin": "@ACCOUNT_QML_PLUGIN_DIR@/evernote", |
36 | |
37 | === added file 'reminders.url-dispatcher' |
38 | --- reminders.url-dispatcher 1970-01-01 00:00:00 +0000 |
39 | +++ reminders.url-dispatcher 2014-11-13 10:34:13 +0000 |
40 | @@ -0,0 +1,5 @@ |
41 | +[ |
42 | + { |
43 | + "protocol": "evernote" |
44 | + } |
45 | +] |
46 | |
47 | === modified file 'src/app/main.cpp' |
48 | --- src/app/main.cpp 2014-11-10 00:54:16 +0000 |
49 | +++ src/app/main.cpp 2014-11-13 10:34:13 +0000 |
50 | @@ -28,7 +28,8 @@ |
51 | #include <QtQml/QtQml> |
52 | #include <QLibrary> |
53 | #include <QDir> |
54 | - |
55 | +#include <QCommandLineParser> |
56 | +#include <QCommandLineOption> |
57 | #include <QDebug> |
58 | |
59 | int main(int argc, char *argv[]) |
60 | @@ -44,30 +45,32 @@ |
61 | // in the sistem if there is one |
62 | importPathList.prepend(QCoreApplication::applicationDirPath() + "/../plugin/"); |
63 | |
64 | - QStringList args = a.arguments(); |
65 | - if (args.contains("-h") || args.contains("--help")) { |
66 | - qDebug() << "usage: " + args.at(0) + " [-p|--phone] [-t|--tablet] [-h|--help] [-I <path>]"; |
67 | - qDebug() << " -p|--phone If running on Desktop, start in a phone sized window."; |
68 | - qDebug() << " -t|--tablet If running on Desktop, start in a tablet sized window."; |
69 | - qDebug() << " -h|--help Print this help."; |
70 | - qDebug() << " -I <path> Give a path for an additional QML import directory. May be used multiple times."; |
71 | - qDebug() << " -s|--sandbox Connect to sandbox.evernote.com instead of evernote.com."; |
72 | - return 0; |
73 | - } |
74 | - |
75 | - |
76 | - for (int i = 0; i < args.count(); i++) { |
77 | - if (args.at(i) == "-I" && args.count() > i + 1) { |
78 | - QString addedPath = args.at(i+1); |
79 | - if (addedPath.startsWith('.')) { |
80 | - addedPath = addedPath.right(addedPath.length() - 1); |
81 | - addedPath.prepend(QDir::currentPath()); |
82 | - } |
83 | - importPathList.append(addedPath); |
84 | + QCommandLineParser cmdLineParser; |
85 | + cmdLineParser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); |
86 | + QCommandLineOption phoneFactorOption(QStringList() << "p" << "phone", "If running on Desktop, start in a phone sized window."); |
87 | + cmdLineParser.addOption(phoneFactorOption); |
88 | + QCommandLineOption tabletFactorOption(QStringList() << "t" << "tablet", "If running on Desktop, start in a tablet sized window."); |
89 | + cmdLineParser.addOption(tabletFactorOption); |
90 | + QCommandLineOption importPathOption("I", "Give a path for an additional QML import directory. May be used multiple times.", "paths"); |
91 | + cmdLineParser.addOption(importPathOption); |
92 | + QCommandLineOption sandboxOption(QStringList() << "s" << "sandbox", "Use sandbox.evernote.com instead of www.evernote.com."); |
93 | + cmdLineParser.addOption(sandboxOption); |
94 | + QCommandLineOption testabilityOption("testability", "Load the testability driver."); |
95 | + cmdLineParser.addOption(testabilityOption); |
96 | + cmdLineParser.addPositionalArgument("uri", "Uri to start the application in a specific mode. E.g. evernote://newnote to directly create and edit a new note."); |
97 | + cmdLineParser.addHelpOption(); |
98 | + |
99 | + cmdLineParser.process(a); |
100 | + |
101 | + foreach (QString addedPath, cmdLineParser.values(importPathOption)) { |
102 | + if (addedPath == "." || addedPath.startsWith("./")) { |
103 | + addedPath = addedPath.right(addedPath.length() - 1); |
104 | + addedPath.prepend(QDir::currentPath()); |
105 | } |
106 | + importPathList.append(addedPath); |
107 | } |
108 | |
109 | - if (args.contains(QLatin1String("-testability")) || getenv("QT_LOAD_TESTABILITY")) { |
110 | + if (cmdLineParser.isSet(testabilityOption) || getenv("QT_LOAD_TESTABILITY")) { |
111 | QLibrary testLib(QLatin1String("qttestability")); |
112 | if (testLib.load()) { |
113 | typedef void (*TasInitialize)(void); |
114 | @@ -82,7 +85,7 @@ |
115 | } |
116 | } |
117 | |
118 | - if (args.contains(QLatin1String("-s")) || args.contains("--sandbox")) { |
119 | + if (cmdLineParser.isSet(sandboxOption)) { |
120 | view.engine()->rootContext()->setContextProperty("useSandbox", QVariant(true)); |
121 | qDebug() << "Running against the sandbox server"; |
122 | } else { |
123 | @@ -92,10 +95,11 @@ |
124 | |
125 | view.engine()->rootContext()->setContextProperty("tablet", QVariant(false)); |
126 | view.engine()->rootContext()->setContextProperty("phone", QVariant(false)); |
127 | - if (args.contains("-t") || args.contains("--tablet")) { |
128 | + |
129 | + if (cmdLineParser.isSet(tabletFactorOption)) { |
130 | qDebug() << "running in tablet mode"; |
131 | view.engine()->rootContext()->setContextProperty("tablet", QVariant(true)); |
132 | - } else if (args.contains("-p") || args.contains("--phone")){ |
133 | + } else if (cmdLineParser.isSet(phoneFactorOption)){ |
134 | qDebug() << "running in phone mode"; |
135 | view.engine()->rootContext()->setContextProperty("phone", QVariant(true)); |
136 | } else if (qgetenv("QT_QPA_PLATFORM") != "ubuntumirclient") { |
137 | @@ -105,6 +109,8 @@ |
138 | |
139 | view.engine()->setImportPathList(importPathList); |
140 | |
141 | + view.engine()->rootContext()->setContextProperty("uriArgs", cmdLineParser.positionalArguments()); |
142 | + |
143 | // Set up account preferences |
144 | Preferences preferences; |
145 | view.engine()->rootContext()->setContextProperty("preferences", &preferences); |
146 | |
147 | === modified file 'src/app/qml/reminders.qml' |
148 | --- src/app/qml/reminders.qml 2014-11-07 20:45:48 +0000 |
149 | +++ src/app/qml/reminders.qml 2014-11-13 10:34:13 +0000 |
150 | @@ -44,6 +44,7 @@ |
151 | automaticOrientation: true |
152 | |
153 | property bool narrowMode: root.width < units.gu(80) |
154 | + property var uri: undefined |
155 | |
156 | onNarrowModeChanged: { |
157 | if (narrowMode) { |
158 | @@ -52,6 +53,23 @@ |
159 | } |
160 | } |
161 | |
162 | + Connections { |
163 | + target: UriHandler |
164 | + onOpened: { |
165 | + root.uri = uris[0]; |
166 | + processUri(); |
167 | + } |
168 | + } |
169 | + |
170 | + Connections { |
171 | + target: EvernoteConnection |
172 | + onIsConnectedChanged: { |
173 | + if (EvernoteConnection.isConnected) { |
174 | + processUri(); |
175 | + } |
176 | + } |
177 | + } |
178 | + |
179 | backgroundColor: "#dddddd" |
180 | |
181 | property var accountPage; |
182 | @@ -68,6 +86,7 @@ |
183 | } |
184 | |
185 | function displayNote(note) { |
186 | + print("displayNote:", note.guid) |
187 | if (root.narrowMode) { |
188 | print("creating noteview"); |
189 | var component = Qt.createComponent(Qt.resolvedUrl("ui/NotePage.qml")); |
190 | @@ -130,6 +149,79 @@ |
191 | } |
192 | } |
193 | |
194 | + function processUri() { |
195 | + var commands = root.uri.split("://")[1].split("/"); |
196 | + if (EvernoteConnection.isConnected && commands && NotesStore) { |
197 | + switch(commands[0].toLowerCase()) { |
198 | + case "notes": // evernote://notes |
199 | + rootTabs.selectedTabIndex = 0; |
200 | + break; |
201 | + |
202 | + case "note": // evernote://note/<noteguid> |
203 | + if (commands[1]) { |
204 | + var note = NotesStore.note(commands[1]) |
205 | + if (note) { |
206 | + displayNote(note); |
207 | + } else { |
208 | + console.warn("No such note:", commands[1]) |
209 | + } |
210 | + } |
211 | + break; |
212 | + |
213 | + case "newnote": // evernote://newnote or evernote://newnote/<notebookguid> |
214 | + if (commands[1]) { |
215 | + if (NotesStore.notebook(commands[1])) { |
216 | + NotesStore.createNote(i18n.tr("Untitled"), commands[1]); |
217 | + } else { |
218 | + console.warn("No such notebook."); |
219 | + } |
220 | + } else { |
221 | + NotesStore.createNote(i18n.tr("Untitled")); |
222 | + } |
223 | + break; |
224 | + |
225 | + case "editnote": // evernote://editnote/<noteguid> |
226 | + if (commands[1]) { |
227 | + var note = NotesStore.note(commands[1]); |
228 | + displayNote(note); |
229 | + switchToEditMode(note); |
230 | + } |
231 | + break; |
232 | + |
233 | + case "notebooks": // evernote://notebooks |
234 | + rootTabs.selectedTabIndex = 1; |
235 | + break; |
236 | + |
237 | + case "notebook": // evernote://notebook/<notebookguid> |
238 | + if (commands[1]) { |
239 | + if (NotesStore.notebook(commands[1])) { |
240 | + notebooksPage.openNotebook(commands[1]); |
241 | + } else { |
242 | + console.warn("No such notebook:", commands[1]); |
243 | + } |
244 | + } |
245 | + break; |
246 | + |
247 | + case "reminders": // evernote://reminders |
248 | + rootTabs.selectedTabIndex = 2; |
249 | + break; |
250 | + |
251 | + case "tags": // evernote://tags |
252 | + rootTabs.selectedTabIndex = 3; |
253 | + break; |
254 | + |
255 | + case "tag": // evernote://tag/<tagguid> |
256 | + if (commands[1]) { |
257 | + tagsPage.openTaggedNotes(commands[1]); |
258 | + } |
259 | + break; |
260 | + |
261 | + default: console.warn('WARNING: Unmanaged URI: ' + commands); |
262 | + } |
263 | + commands = undefined; |
264 | + } |
265 | + } |
266 | + |
267 | AccountServiceModel { |
268 | id: accounts |
269 | applicationId: "com.ubuntu.reminders_reminders" |
270 | @@ -171,6 +263,10 @@ |
271 | |
272 | pagestack.push(rootTabs); |
273 | doLogin(); |
274 | + |
275 | + if (uriArgs) { |
276 | + root.uri = uriArgs[0]; |
277 | + } |
278 | } |
279 | |
280 | Connections { |
281 | @@ -250,10 +346,12 @@ |
282 | narrowMode: root.narrowMode |
283 | |
284 | onOpenNotebook: { |
285 | + var notebook = NotesStore.notebook(notebookGuid) |
286 | + print("have notebook:", notebook, notebook.name) |
287 | var component = Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")) |
288 | var page = component.createObject(); |
289 | print("opening note page for notebook", notebookGuid) |
290 | - pagestack.push(page, {title: title, filterNotebookGuid: notebookGuid, narrowMode: narrowMode}); |
291 | + pagestack.push(page, {title: notebook.name, filterNotebookGuid: notebookGuid, narrowMode: root.narrowMode}); |
292 | page.selectedNoteChanged.connect(function() { |
293 | if (page.selectedNote) { |
294 | root.displayNote(page.selectedNote); |
295 | @@ -291,10 +389,11 @@ |
296 | id: tagsPage |
297 | |
298 | onOpenTaggedNotes: { |
299 | + var tag = NotesStore.tag(tagGuid); |
300 | var component = Qt.createComponent(Qt.resolvedUrl("ui/NotesPage.qml")) |
301 | var page = component.createObject(); |
302 | print("opening note page for tag", tagGuid) |
303 | - pagestack.push(page, {title: title, filterTagGuid: tagGuid, narrowMode: narrowMode}); |
304 | + pagestack.push(page, {title: tag.name, filterTagGuid: tagGuid, narrowMode: root.narrowMode}); |
305 | page.selectedNoteChanged.connect(function() { |
306 | if (page.selectedNote) { |
307 | root.displayNote(page.selectedNote); |
308 | @@ -308,7 +407,6 @@ |
309 | }) |
310 | NotesStore.refreshNotes(); |
311 | } |
312 | - |
313 | } |
314 | } |
315 | } |
316 | |
317 | === modified file 'src/app/qml/ui/NotebooksPage.qml' |
318 | --- src/app/qml/ui/NotebooksPage.qml 2014-11-07 22:23:56 +0000 |
319 | +++ src/app/qml/ui/NotebooksPage.qml 2014-11-13 10:34:13 +0000 |
320 | @@ -28,7 +28,7 @@ |
321 | |
322 | property bool narrowMode |
323 | |
324 | - signal openNotebook(string title, string notebookGuid, bool narrowMode) |
325 | + signal openNotebook(string notebookGuid) |
326 | |
327 | onActiveChanged: { |
328 | if (active) { |
329 | @@ -137,7 +137,7 @@ |
330 | delegate: NotebooksDelegate { |
331 | onClicked: { |
332 | print("selected notebook:", model.guid) |
333 | - root.openNotebook(name, model.guid, narrowMode) |
334 | + root.openNotebook(model.guid) |
335 | } |
336 | } |
337 | |
338 | |
339 | === modified file 'src/app/qml/ui/TagsPage.qml' |
340 | --- src/app/qml/ui/TagsPage.qml 2014-11-07 22:23:56 +0000 |
341 | +++ src/app/qml/ui/TagsPage.qml 2014-11-13 10:34:13 +0000 |
342 | @@ -28,7 +28,7 @@ |
343 | |
344 | property bool narrowMode |
345 | |
346 | - signal openTaggedNotes(string title, string tagGuid, bool narrowMode) |
347 | + signal openTaggedNotes(string tagGuid) |
348 | |
349 | onActiveChanged: { |
350 | if (active) { |
351 | @@ -145,7 +145,7 @@ |
352 | delegate: TagsDelegate { |
353 | onClicked: { |
354 | print("selected tag:", model.guid) |
355 | - root.openTaggedNotes(name, model.guid, narrowMode) |
356 | + root.openTaggedNotes(model.guid) |
357 | } |
358 | } |
359 | |
360 | |
361 | === modified file 'tests/autopilot/reminders/tests/__init__.py' |
362 | --- tests/autopilot/reminders/tests/__init__.py 2014-09-10 15:45:18 +0000 |
363 | +++ tests/autopilot/reminders/tests/__init__.py 2014-11-13 10:34:13 +0000 |
364 | @@ -81,7 +81,6 @@ |
365 | newvalue=os.path.join(self.local_location, 'src/plugin'))) |
366 | return self.launch_test_application( |
367 | self.local_location_binary, |
368 | - '-q', self.local_location_qml, |
369 | '-s', |
370 | app_type='qt', |
371 | emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase) |
372 | @@ -90,8 +89,8 @@ |
373 | def launch_test_installed(self): |
374 | return self.launch_test_application( |
375 | self.installed_location_binary, |
376 | - '-q ' + self.installed_location_qml, |
377 | '-s', |
378 | + '--', |
379 | '--desktop_file_hint=/usr/share/applications/' |
380 | 'com.ubuntu.reminders.desktop', |
381 | app_type='qt', |
PASSED: Continuous integration, rev:289 91.189. 93.70:8080/ job/reminders- app-ci/ 573/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1382 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1382/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/reminders- app-utopic- amd64-ci/ 269
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/reminders- app-ci/ 573/rebuild
http://