Merge lp:~schwann/content-hub/content-export-component into lp:~content-hub-team/content-hub/trunk
- content-export-component
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Ken VanDine |
Proposed branch: | lp:~schwann/content-hub/content-export-component |
Merge into: | lp:~content-hub-team/content-hub/trunk |
Diff against target: |
697 lines (+498/-73) 13 files modified
CMakeLists.txt (+6/-0) contenthub.qmlproject (+13/-0) debian/qtdeclarative5-ubuntu-content0.1.install (+1/-0) examples/export-qml/export.qml (+78/-63) examples/import-qml/import.qml (+7/-1) import/Ubuntu/Content/CMakeLists.txt (+13/-6) import/Ubuntu/Content/ContentExportChrome.qml (+187/-0) import/Ubuntu/Content/ContentImportHint.qml (+67/-0) import/Ubuntu/Content/contenthub.cpp (+9/-3) import/Ubuntu/Content/qmldir (+2/-0) po/CMakeLists.txt (+39/-0) po/content-hub.pot (+38/-0) po/de.po (+38/-0) |
To merge this branch: | bzr merge lp:~schwann/content-hub/content-export-component |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bill Filler (community) | Needs Fixing | ||
PS Jenkins bot | continuous-integration | Approve | |
Ken VanDine | Needs Fixing | ||
Review via email: mp+185293@code.launchpad.net |
Commit message
Add QML UI component for the source to provide a unified experience
Description of the change
Add QML UI component for the source to provide a unified experience
PS Jenkins bot (ps-jenkins) wrote : | # |
Ken VanDine (ken-vandine) wrote : | # |
A couple of typos, "slectedItemsCount" in several places and "activeTranser" on line 304.
I'm not sure about the name of the component, ContentExportCh
- 41. By Günter Schwann
-
Fix typos
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:41
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:41
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:41
http://
Executed test runs:
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:41
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:41
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
- 42. By Günter Schwann
-
Trunk merged
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:42
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 43. By Günter Schwann
-
Add another component, that the import should use to indicate the ongoing transfer
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:43
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 44. By Günter Schwann
-
Use a ActivityIndicator instead of the text
- 45. By Günter Schwann
-
Using a Dialog to make the indicator full size
- 46. By Günter Schwann
-
Trunk merged
Ken VanDine (ken-vandine) wrote : | # |
The cancel button in ContentExportChrome doesn't work because of a typo, exportCanceled should be exportCancelled. With that change, it does abort the transfer, however the ActivityIndicator doesn't stop when the state changes to aborted, not sure why.
Ken VanDine (ken-vandine) wrote : | # |
Also, in the export-qml example, the All/None toggle doesn't do anything. The example doesn't connect to the signal in the component. Since this is an implementation detail, perhaps we should hide that button by default in the component and only show it if the developer has an implementation for it.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:44
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 47. By Günter Schwann
-
Add property to show the select all/none button only optionally
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:46
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:47
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Bill Filler (bfiller) wrote : | # |
There are few problems that need to be fixed:
1) please split this into 2 MR's. It's critical we get the animation spinner component right now and want to decouple from the exporter
2) regarding importer component (ran the import.qml example)
-- it takes too long for it to appear. should start as soon as you press the import button
-- as soon as app looses focus (active=false I believe) or the transfer fails for whatever reason you should remove the component from the view. Otherwise on completion of the picker from the gallery you see the animation when switched back to the calling app. This should not happen.
Unmerged revisions
- 47. By Günter Schwann
-
Add property to show the select all/none button only optionally
- 46. By Günter Schwann
-
Trunk merged
- 45. By Günter Schwann
-
Using a Dialog to make the indicator full size
- 44. By Günter Schwann
-
Use a ActivityIndicator instead of the text
- 43. By Günter Schwann
-
Add another component, that the import should use to indicate the ongoing transfer
- 42. By Günter Schwann
-
Trunk merged
- 41. By Günter Schwann
-
Fix typos
- 40. By Günter Schwann
-
Merge Trunk
- 39. By Günter Schwann
-
Update export example and use selectiontype in export chrome
- 38. By Günter Schwann
-
Add translation
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2013-09-18 13:54:40 +0000 |
3 | +++ CMakeLists.txt 2013-09-24 18:11:33 +0000 |
4 | @@ -67,11 +67,17 @@ |
5 | set(CONTENT_HUB_VERSION_MINOR 0) |
6 | set(CONTENT_HUB_VERSION_PATCH 1) |
7 | |
8 | +file(GLOB_RECURSE I18N_SRC_FILES |
9 | + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} |
10 | + import/Ubuntu/Content/**.qml) |
11 | +list(SORT I18N_SRC_FILES) |
12 | + |
13 | include_directories(include) |
14 | |
15 | add_subdirectory(doc) |
16 | add_subdirectory(src) |
17 | add_subdirectory(import) |
18 | +add_subdirectory(po) |
19 | add_subdirectory(examples) |
20 | add_subdirectory(tests) |
21 | |
22 | |
23 | === added file 'contenthub.qmlproject' |
24 | --- contenthub.qmlproject 1970-01-01 00:00:00 +0000 |
25 | +++ contenthub.qmlproject 2013-09-24 18:11:33 +0000 |
26 | @@ -0,0 +1,13 @@ |
27 | +/* File generated by Qt Creator, version 2.5.2 */ |
28 | + |
29 | +import QmlProject 1.1 |
30 | + |
31 | +Project { |
32 | + mainFile: "examples/export-qml/export.qml" |
33 | + |
34 | + /* Include .qml, .js, and image files from current directory and subdirectories */ |
35 | + QmlFiles { |
36 | + directory: ["examples/export-qml", "examples/import-qml", |
37 | + "import/Ubuntu/Content"] |
38 | + } |
39 | +} |
40 | |
41 | === modified file 'debian/qtdeclarative5-ubuntu-content0.1.install' |
42 | --- debian/qtdeclarative5-ubuntu-content0.1.install 2013-08-23 11:44:18 +0000 |
43 | +++ debian/qtdeclarative5-ubuntu-content0.1.install 2013-09-24 18:11:33 +0000 |
44 | @@ -1,1 +1,2 @@ |
45 | usr/lib/*/qt5/qml/Ubuntu/Content/* |
46 | +usr/share/locale/*/LC_MESSAGES/content-hub.mo |
47 | |
48 | === modified file 'examples/export-qml/export.qml' |
49 | --- examples/export-qml/export.qml 2013-08-26 17:36:58 +0000 |
50 | +++ examples/export-qml/export.qml 2013-09-24 18:11:33 +0000 |
51 | @@ -5,62 +5,85 @@ |
52 | Rectangle { |
53 | id: root |
54 | width: 300 |
55 | - height: 200 |
56 | - |
57 | - property bool pickMode: false |
58 | - property list<ContentItem> selectedItems |
59 | - property var activeTransfer |
60 | - |
61 | - function __returnResult() { |
62 | - activeTransfer.items = selectedItems; |
63 | - activeTransfer.state = ContentTransfer.Charged; |
64 | - } |
65 | - |
66 | - Button { |
67 | - id: button1 |
68 | - anchors.top: parent.top |
69 | - anchors.left: parent.left |
70 | - enabled: pickMode |
71 | - text: "Return URL1" |
72 | - onClicked: { |
73 | - var result = resultComponent.createObject(root); |
74 | - result.url = "file:///picture_1.jpg"; |
75 | - selectedItems = [ result ]; |
76 | - root.__returnResult(); |
77 | - } |
78 | - } |
79 | - Button { |
80 | - id: button2 |
81 | - anchors.top: parent.top |
82 | - anchors.right: parent.right |
83 | - enabled: pickMode |
84 | - text: "Return Url2" |
85 | - onClicked: { |
86 | + height: 400 |
87 | + |
88 | + ListModel { |
89 | + id: urlsModel |
90 | + ListElement { |
91 | + name: "Photo 1" |
92 | + url: "file:///home/phablet/Pictures/img0001.jpg" |
93 | + selected: false |
94 | + } |
95 | + ListElement { |
96 | + name: "Photo 2" |
97 | + url: "file:///home/phablet/Pictures/img0002.jpg" |
98 | + selected: false |
99 | + } |
100 | + ListElement { |
101 | + name: "Photo 3" |
102 | + url: "file:///home/phablet/Pictures/img0003.jpg" |
103 | + selected: false |
104 | + } |
105 | + ListElement { |
106 | + name: "Photo 4" |
107 | + url: "file:///home/phablet/Pictures/img0004.jpg" |
108 | + selected: false |
109 | + } |
110 | + ListElement { |
111 | + name: "Photo 5" |
112 | + url: "file:///home/phablet/Pictures/img0005.jpg" |
113 | + selected: false |
114 | + } |
115 | + } |
116 | + |
117 | + ContentExportChrome { |
118 | + id: chrome |
119 | + |
120 | + anchors.fill: parent |
121 | + selectedItemsCount: 0 |
122 | + |
123 | + ListView { |
124 | + anchors.fill: parent |
125 | + model: urlsModel |
126 | + delegate: Rectangle { |
127 | + height: 40 |
128 | + width: parent.width |
129 | + color: (index % 2) === 0 ? "#aaeebb" : "#99ddaa" |
130 | + CheckBox { |
131 | + id: checkBox |
132 | + anchors.left: parent.left |
133 | + anchors.leftMargin: 10 |
134 | + anchors.verticalCenter: parent.verticalCenter |
135 | + checked: selected |
136 | + onClicked: { |
137 | + urlsModel.setProperty(index, "selected", checked) |
138 | + if (checked) |
139 | + chrome.selectedItemsCount += 1; |
140 | + else |
141 | + chrome.selectedItemsCount -= 1; |
142 | + } |
143 | + } |
144 | + Label { |
145 | + anchors.left: checkBox.right |
146 | + anchors.leftMargin: 10 |
147 | + anchors.verticalCenter: checkBox.verticalCenter |
148 | + text: name |
149 | + } |
150 | + } |
151 | + } |
152 | + |
153 | + onExportPressed: { |
154 | var results = []; |
155 | - |
156 | - var result = resultComponent.createObject(root); |
157 | - result.url = "file:///picture_1.jpg"; |
158 | - results.push(result); |
159 | - |
160 | - result = resultComponent.createObject(root); |
161 | - result.url = "file:///picture_2.jpg"; |
162 | - results.push(result); |
163 | - |
164 | - selectedItems = results; |
165 | - console.log(selectedItems[0].url + "/" + selectedItems[1].url) |
166 | - root.__returnResult(); |
167 | - } |
168 | - } |
169 | - |
170 | - Button { |
171 | - id: buttonAbort |
172 | - anchors.bottom: parent.bottom |
173 | - anchors.horizontalCenter: parent.horizontalCenter |
174 | - enabled: pickMode |
175 | - text: "Cancel" |
176 | - onClicked: { |
177 | - root.activeTransfer.state = ContentTransfer.Aborted; |
178 | - root.pickMode = false; |
179 | + for (var i=0; i<urlsModel.count; ++i) { |
180 | + console.log("urlsModel.get(i).selected : "+urlsModel.get(i).selected) |
181 | + if (urlsModel.get(i).selected) { |
182 | + var result = resultComponent.createObject(chrome); |
183 | + result.url = urlsModel.get(i).url; |
184 | + console.log("result.url: "+result.url) |
185 | + results.push(result); |
186 | + } |
187 | + } |
188 | + activeTransfer.items = results; |
189 | } |
190 | } |
191 | |
192 | @@ -68,12 +91,4 @@ |
193 | id: resultComponent |
194 | ContentItem {} |
195 | } |
196 | - |
197 | - Connections { |
198 | - target: ContentHub |
199 | - onExportRequested: { |
200 | - root.activeTransfer = transfer |
201 | - root.pickMode = true; |
202 | - } |
203 | - } |
204 | } |
205 | |
206 | === modified file 'examples/import-qml/import.qml' |
207 | --- examples/import-qml/import.qml 2013-09-19 21:49:23 +0000 |
208 | +++ examples/import-qml/import.qml 2013-09-24 18:11:33 +0000 |
209 | @@ -5,6 +5,7 @@ |
210 | import Ubuntu.Content 0.1 |
211 | |
212 | MainView { |
213 | + id: root |
214 | applicationName: "import-qml" |
215 | width: 300 |
216 | height: 200 |
217 | @@ -63,8 +64,13 @@ |
218 | } |
219 | } |
220 | |
221 | + ContentImportHint { |
222 | + anchors.fill: parent |
223 | + activeTransfer: root.activeTransfer |
224 | + } |
225 | + |
226 | Connections { |
227 | - target: activeTransfer |
228 | + target: root.activeTransfer |
229 | onStateChanged: { |
230 | console.log("StateChanged: " + activeTransfer.state); |
231 | if (activeTransfer.state === ContentTransfer.Charged) |
232 | |
233 | === modified file 'import/Ubuntu/Content/CMakeLists.txt' |
234 | --- import/Ubuntu/Content/CMakeLists.txt 2013-09-19 21:49:23 +0000 |
235 | +++ import/Ubuntu/Content/CMakeLists.txt 2013-09-24 18:11:33 +0000 |
236 | @@ -58,9 +58,16 @@ |
237 | install(TARGETS ${PLUGIN} DESTINATION ${CONTENT_HUB_IMPORTS_DIR}) |
238 | install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/qmldir DESTINATION ${CONTENT_HUB_IMPORTS_DIR}) |
239 | |
240 | -# for the qml-tests |
241 | -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qmldir |
242 | - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/qmldir |
243 | - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_CURRENT_BINARY_DIR}/qmldir) |
244 | -add_custom_target(copy_qmldir_file_to_build_dir DEPENDS qmldir) |
245 | -add_dependencies(${PLUGIN} copy_qmldir_file_to_build_dir) |
246 | +file(GLOB QML_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.qml qmldir) |
247 | +install(FILES ${QML_FILES} DESTINATION ${CONTENT_HUB_IMPORTS_DIR}) |
248 | + |
249 | +if(NOT ${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) |
250 | + # copy qml files and assets over to build dir to be able to import them uninstalled |
251 | + foreach(_file ${QML_FILES}) |
252 | + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file} |
253 | + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_file} |
254 | + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${CMAKE_CURRENT_BINARY_DIR}/${_file}) |
255 | + endforeach(_file) |
256 | + add_custom_target(copy_files_to_build_dir DEPENDS ${QML_FILES}) |
257 | + add_dependencies(${PLUGIN} copy_files_to_build_dir) |
258 | +endif() |
259 | |
260 | === added file 'import/Ubuntu/Content/ContentExportChrome.qml' |
261 | --- import/Ubuntu/Content/ContentExportChrome.qml 1970-01-01 00:00:00 +0000 |
262 | +++ import/Ubuntu/Content/ContentExportChrome.qml 2013-09-24 18:11:33 +0000 |
263 | @@ -0,0 +1,187 @@ |
264 | +/* |
265 | + * Copyright 2013 Canonical Ltd. |
266 | + * |
267 | + * This program is free software; you can redistribute it and/or modify |
268 | + * it under the terms of the GNU Lesser General Public License as published by |
269 | + * the Free Software Foundation; version 3. |
270 | + * |
271 | + * This program is distributed in the hope that it will be useful, |
272 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
273 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
274 | + * GNU Lesser General Public License for more details. |
275 | + * |
276 | + * You should have received a copy of the GNU Lesser General Public License |
277 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
278 | + */ |
279 | + |
280 | +import QtQuick 2.0 |
281 | +import Ubuntu.Components 0.1 |
282 | +import Ubuntu.Content 0.1 |
283 | + |
284 | +/*! |
285 | + \qmltype ContentExportChrome |
286 | + \inqmlmodule Ubuntu.Content 0.1 |
287 | + \brief TODO add documentation |
288 | + |
289 | + Example: |
290 | + \qml |
291 | + import QtQuick 2.0 |
292 | + import Ubuntu.Components 0.1 |
293 | + import Ubuntu.Content 0.1 |
294 | + |
295 | + Rectangle { |
296 | + width: 300 |
297 | + height: 400 |
298 | + |
299 | + ContentExportChrome { |
300 | + id: chrome |
301 | + anchors.fill: parent |
302 | + |
303 | + MySelectionComponent { |
304 | + anchors.fill: parent |
305 | + // set chrome.activeTransfer.items properly when the user selects items |
306 | + // or set the chrome.selectedItemsCount manually |
307 | + |
308 | + } |
309 | + } |
310 | + } |
311 | + \endqml |
312 | +*/ |
313 | +Item { |
314 | + id: root |
315 | + |
316 | + /// The current running transfer, is undefined when no transfer is running |
317 | + property var activeTransfer |
318 | + /// The number of selected items. |
319 | + /// Is calculcated from activeTransfer.items, if not set manually |
320 | + property int selectedItemsCount: activeTransfer ? activeTransfer.items.length : 0 |
321 | + /// If set to totrue and amultiSelect mode is used, a button to select all / none |
322 | + // is shown. The functionality needs to be hooked up using the selectAllToggled() |
323 | + /// signal |
324 | + property bool showSelectAllButton: false |
325 | + |
326 | + /// This signal is emitted when the user presses the cancel button |
327 | + /// The transfer is aborted automaically |
328 | + signal exportCanceled() |
329 | + /// This signal is emitted when the user presses the import/upload button |
330 | + /// The transfer is set to charged automatically. But the ctiveTranser.items |
331 | + /// needs to be filled |
332 | + signal exportPressed() |
333 | + /// Is emitted, when the user presses the button to select all/none |
334 | + signal selectAllToggled() |
335 | + |
336 | + /// To not be used |
337 | + // Used to put all Items to the children of the container |
338 | + // So "anchors.fill: parent" can be used by the Item(s), but the chrome is |
339 | + // still at the bottom, and the Item's sie is adapted accordingly |
340 | + default property alias content: container.children |
341 | + |
342 | + Item { |
343 | + id: container |
344 | + anchors { |
345 | + left: parent.left |
346 | + right: parent.right |
347 | + top: parent.top |
348 | + bottom: bottomChrome.top |
349 | + } |
350 | + } |
351 | + |
352 | + Rectangle { |
353 | + id: bottomChrome |
354 | + |
355 | + anchors { |
356 | + left: parent.left |
357 | + right: parent.right |
358 | + bottom: parent.bottom |
359 | + } |
360 | + |
361 | + // TODO get proper height without binding loop |
362 | + height: selectFeedback.height + cancelButton.height + internal.margin * 3 |
363 | + color: UbuntuColors.warmGrey |
364 | + |
365 | + Label { |
366 | + id: selectFeedback |
367 | + anchors { |
368 | + left: parent.left |
369 | + leftMargin: internal.margin |
370 | + right: parent.right |
371 | + bottom: cancelButton.top |
372 | + bottomMargin: internal.margin |
373 | + } |
374 | + text: i18n.dtr("content-hub", "%1 item selected", "%1 items selected", |
375 | + root.selectedItemsCount).arg(root.selectedItemsCount) |
376 | + } |
377 | + |
378 | + Button { |
379 | + id: cancelButton |
380 | + anchors { |
381 | + left: parent.left |
382 | + leftMargin: internal.margin |
383 | + bottom: parent.bottom |
384 | + bottomMargin: internal.margin |
385 | + } |
386 | + |
387 | + text: i18n.dtr("content-hub", "Cancel") |
388 | + enabled: internal.transferActive |
389 | + onClicked: { |
390 | + root.exportCanceled() |
391 | + if (root.activeTransfer.state === ContentTransfer.InProgress) |
392 | + root.activeTransfer.state = ContentTransfer.Aborted; |
393 | + } |
394 | + } |
395 | + |
396 | + Button { |
397 | + id: selectAllButton |
398 | + anchors { |
399 | + right: okButton.left |
400 | + rightMargin: internal.margin |
401 | + bottom: parent.bottom |
402 | + bottomMargin: internal.margin |
403 | + } |
404 | + |
405 | + text: i18n.dtr("content-hub", "All/None") |
406 | + visible: internal.multiSelect && root.showSelectAllButton |
407 | + onClicked: { |
408 | + root.selectAllToggled |
409 | + } |
410 | + } |
411 | + |
412 | + Button { |
413 | + id: okButton |
414 | + anchors { |
415 | + right: parent.right |
416 | + rightMargin: internal.margin |
417 | + bottom: parent.bottom |
418 | + bottomMargin: internal.margin |
419 | + } |
420 | + |
421 | + text: i18n.dtr("content-hub", "Import") // TODO set text according to context of the transfer (upload/import/...) |
422 | + enabled: internal.transferActive && root.selectedItemsCount > 0 |
423 | + onClicked: { |
424 | + root.exportPressed(); |
425 | + if (root.activeTransfer.state === ContentTransfer.InProgress) |
426 | + root.activeTransfer.state = ContentTransfer.Charged; |
427 | + } |
428 | + } |
429 | + |
430 | + Item { |
431 | + id: internal |
432 | + |
433 | + visible: false |
434 | + |
435 | + property bool transferActive: root.activeTransfer ? |
436 | + root.activeTransfer.state === ContentTransfer.InProgress |
437 | + : false |
438 | + property bool multiSelect: root.activeTransfer ? |
439 | + root.activeTransfer.selectionType === ContentTransfer.Multiple |
440 | + : false |
441 | + property int margin: units.gu(0.5) |
442 | + Connections { |
443 | + target: ContentHub |
444 | + onExportRequested: { |
445 | + root.activeTransfer = transfer; |
446 | + } |
447 | + } |
448 | + } |
449 | + } |
450 | +} |
451 | |
452 | === added file 'import/Ubuntu/Content/ContentImportHint.qml' |
453 | --- import/Ubuntu/Content/ContentImportHint.qml 1970-01-01 00:00:00 +0000 |
454 | +++ import/Ubuntu/Content/ContentImportHint.qml 2013-09-24 18:11:33 +0000 |
455 | @@ -0,0 +1,67 @@ |
456 | +/* |
457 | + * Copyright 2013 Canonical Ltd. |
458 | + * |
459 | + * This program is free software; you can redistribute it and/or modify |
460 | + * it under the terms of the GNU Lesser General Public License as published by |
461 | + * the Free Software Foundation; version 3. |
462 | + * |
463 | + * This program is distributed in the hope that it will be useful, |
464 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
465 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
466 | + * GNU Lesser General Public License for more details. |
467 | + * |
468 | + * You should have received a copy of the GNU Lesser General Public License |
469 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
470 | + */ |
471 | + |
472 | +import QtQuick 2.0 |
473 | +import Ubuntu.Components 0.1 |
474 | +import Ubuntu.Components.Popups 0.1 |
475 | +import Ubuntu.Content 0.1 |
476 | + |
477 | +/*! |
478 | + \qmltype ContentImportHint |
479 | + \inqmlmodule Ubuntu.Content 0.1 |
480 | + \brief Component that indicates that a trasnfer is active |
481 | + |
482 | + This component shows, that the transfer is currently running, and the source |
483 | + application is active. It blocks all input during that time. |
484 | + Place this component on top of your view. |
485 | + |
486 | + See documentation for \ContentHub to see an example |
487 | +*/ |
488 | +Item { |
489 | + id: root |
490 | + |
491 | + /// The current running transfer |
492 | + property var activeTransfer |
493 | + |
494 | + opacity: internal.isTransferRunning ? 1.0 : 0.0 |
495 | + |
496 | + Component { |
497 | + id: dialog |
498 | + Dialog { |
499 | + id: dialogue |
500 | + ActivityIndicator { |
501 | + anchors.centerIn: parent |
502 | + running: internal.isTransferRunning |
503 | + } |
504 | + } |
505 | + } |
506 | + |
507 | + QtObject { |
508 | + id: internal |
509 | + property bool isTransferRunning: root.activeTransfer ? |
510 | + root.activeTransfer.state === ContentTransfer.InProgress |
511 | + : false |
512 | + property var dialogue |
513 | + |
514 | + onIsTransferRunningChanged: { |
515 | + if (isTransferRunning) { |
516 | + dialogue = PopupUtils.open(dialog); |
517 | + } else { |
518 | + PopupUtils.close(dialogue); |
519 | + } |
520 | + } |
521 | + } |
522 | +} |
523 | |
524 | === modified file 'import/Ubuntu/Content/contenthub.cpp' |
525 | --- import/Ubuntu/Content/contenthub.cpp 2013-09-19 21:49:23 +0000 |
526 | +++ import/Ubuntu/Content/contenthub.cpp 2013-09-24 18:11:33 +0000 |
527 | @@ -42,6 +42,7 @@ |
528 | * import Ubuntu.Content 0.1 |
529 | * |
530 | * Rectangle { |
531 | + * id: root |
532 | * Button { |
533 | * text: "Import from default" |
534 | * onClicked: { |
535 | @@ -57,13 +58,18 @@ |
536 | * activeTransfer.start(); |
537 | * } |
538 | * } |
539 | + * ContentImportHint { |
540 | + * id: importHint |
541 | + * anchors.fill: parent |
542 | + * activeTransfer: root.activeTransfer |
543 | + * } |
544 | * property list<ContentItem> importItems |
545 | * property var activeTransfer |
546 | * Connections { |
547 | - * target: activeTransfer |
548 | + * target: root.activeTransfer |
549 | * onStateChanged: { |
550 | - * if (activeTransfer.state === ContentTransfer.Charged) |
551 | - * importItmes = activeTransfer.items; |
552 | + * if (root.activeTransfer.state === ContentTransfer.Charged) |
553 | + * importItmes = root.activeTransfer.items; |
554 | * } |
555 | * } |
556 | * } |
557 | |
558 | === modified file 'import/Ubuntu/Content/qmldir' |
559 | --- import/Ubuntu/Content/qmldir 2013-08-21 12:23:15 +0000 |
560 | +++ import/Ubuntu/Content/qmldir 2013-09-24 18:11:33 +0000 |
561 | @@ -1,3 +1,5 @@ |
562 | module Ubuntu.Content |
563 | plugin ubuntu-content-hub-plugin |
564 | |
565 | +ContentExportChrome 0.1 ContentExportChrome.qml |
566 | +ContentImportHint 0.1 ContentImportHint.qml |
567 | |
568 | === added directory 'po' |
569 | === added file 'po/CMakeLists.txt' |
570 | --- po/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
571 | +++ po/CMakeLists.txt 2013-09-24 18:11:33 +0000 |
572 | @@ -0,0 +1,39 @@ |
573 | +# Copyright © 2013 Canonical Ltd. |
574 | +# |
575 | +# This program is free software: you can redistribute it and/or modify |
576 | +# it under the terms of the GNU General Public License version 3 as |
577 | +# published by the Free Software Foundation. |
578 | +# |
579 | +# This program is distributed in the hope that it will be useful, |
580 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
581 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
582 | +# GNU General Public License for more details. |
583 | +# |
584 | +# You should have received a copy of the GNU General Public License |
585 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
586 | + |
587 | +include(FindGettext) |
588 | +find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext) |
589 | + |
590 | +set(DOMAIN "content-hub") |
591 | +set(POT_FILE ${DOMAIN}.pot) |
592 | +file(GLOB PO_FILES *.po) |
593 | + |
594 | +add_custom_target(${POT_FILE} |
595 | + COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE} |
596 | + -D ${CMAKE_SOURCE_DIR} |
597 | + --from-code=UTF-8 |
598 | + --c++ --qt --add-comments=TRANSLATORS |
599 | + --keyword=dtr:2 --keyword=dtr:2,3 |
600 | + --package-name=content-hub |
601 | + --copyright-holder='Canonical Ltd.' |
602 | + ${I18N_SRC_FILES}) |
603 | + |
604 | +foreach(PO_FILE ${PO_FILES}) |
605 | + get_filename_component(LANG ${PO_FILE} NAME_WE) |
606 | + gettext_process_po_files(${LANG} ALL PO_FILES ${PO_FILE}) |
607 | + set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES) |
608 | + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo |
609 | + DESTINATION ${INSTALL_DIR} |
610 | + RENAME ${DOMAIN}.mo) |
611 | +endforeach(PO_FILE) |
612 | |
613 | === added file 'po/content-hub.pot' |
614 | --- po/content-hub.pot 1970-01-01 00:00:00 +0000 |
615 | +++ po/content-hub.pot 2013-09-24 18:11:33 +0000 |
616 | @@ -0,0 +1,38 @@ |
617 | +# SOME DESCRIPTIVE TITLE. |
618 | +# Copyright (C) YEAR Canonical Ltd. |
619 | +# This file is distributed under the same license as the PACKAGE package. |
620 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
621 | +# |
622 | +#, fuzzy |
623 | +msgid "" |
624 | +msgstr "" |
625 | +"Project-Id-Version: content-hub\n" |
626 | +"Report-Msgid-Bugs-To: \n" |
627 | +"POT-Creation-Date: 2013-09-10 13:29+0200\n" |
628 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
629 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
630 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
631 | +"Language: \n" |
632 | +"MIME-Version: 1.0\n" |
633 | +"Content-Type: text/plain; charset=CHARSET\n" |
634 | +"Content-Transfer-Encoding: 8bit\n" |
635 | +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
636 | + |
637 | +#: import/Ubuntu/Content/ContentExportChrome.qml:107 |
638 | +#, qt-format |
639 | +msgid "%1 item selected" |
640 | +msgid_plural "%1 items selected" |
641 | +msgstr[0] "" |
642 | +msgstr[1] "" |
643 | + |
644 | +#: import/Ubuntu/Content/ContentExportChrome.qml:120 |
645 | +msgid "Cancel" |
646 | +msgstr "" |
647 | + |
648 | +#: import/Ubuntu/Content/ContentExportChrome.qml:138 |
649 | +msgid "All/None" |
650 | +msgstr "" |
651 | + |
652 | +#: import/Ubuntu/Content/ContentExportChrome.qml:154 |
653 | +msgid "Import" |
654 | +msgstr "" |
655 | |
656 | === added file 'po/de.po' |
657 | --- po/de.po 1970-01-01 00:00:00 +0000 |
658 | +++ po/de.po 2013-09-24 18:11:33 +0000 |
659 | @@ -0,0 +1,38 @@ |
660 | +# SOME DESCRIPTIVE TITLE. |
661 | +# Copyright (C) YEAR Canonical Ltd. |
662 | +# This file is distributed under the same license as the PACKAGE package. |
663 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
664 | +# |
665 | +#, fuzzy |
666 | +msgid "" |
667 | +msgstr "" |
668 | +"Project-Id-Version: content-hub\n" |
669 | +"Report-Msgid-Bugs-To: \n" |
670 | +"POT-Creation-Date: 2013-09-10 13:29+0200\n" |
671 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
672 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
673 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
674 | +"Language: \n" |
675 | +"MIME-Version: 1.0\n" |
676 | +"Content-Type: text/plain; charset=CHARSET\n" |
677 | +"Content-Transfer-Encoding: 8bit\n" |
678 | +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
679 | + |
680 | +#: import/Ubuntu/Content/ContentExportChrome.qml:107 |
681 | +#, qt-format |
682 | +msgid "%1 item selected" |
683 | +msgid_plural "%1 items selected" |
684 | +msgstr[0] "" |
685 | +msgstr[1] "" |
686 | + |
687 | +#: import/Ubuntu/Content/ContentExportChrome.qml:120 |
688 | +msgid "Abbrechen" |
689 | +msgstr "" |
690 | + |
691 | +#: import/Ubuntu/Content/ContentExportChrome.qml:138 |
692 | +msgid "All/None" |
693 | +msgstr "" |
694 | + |
695 | +#: import/Ubuntu/Content/ContentExportChrome.qml:154 |
696 | +msgid "Import" |
697 | +msgstr "" |
PASSED: Continuous integration, rev:40 jenkins. qa.ubuntu. com/job/ content- hub-ci/ 62/ jenkins. qa.ubuntu. com/job/ content- hub-saucy- amd64-ci/ 62 jenkins. qa.ubuntu. com/job/ content- hub-saucy- armhf-ci/ 62 jenkins. qa.ubuntu. com/job/ content- hub-saucy- armhf-ci/ 62/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ content- hub-saucy- i386-ci/ 62
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ content- hub-ci/ 62/rebuild
http://