Merge lp:~ken-vandine/content-hub/1_3 into lp:content-hub
- 1_3
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michael Sheldon |
Approved revision: | 251 |
Merged at revision: | 249 |
Proposed branch: | lp:~ken-vandine/content-hub/1_3 |
Merge into: | lp:content-hub |
Diff against target: |
399 lines (+361/-1) 5 files modified
debian/changelog (+6/-0) import/Ubuntu/Content/ContentPageHeader.qml (+97/-0) import/Ubuntu/Content/ContentPeerPicker13.qml (+253/-0) import/Ubuntu/Content/contenthubplugin.cpp (+2/-1) import/Ubuntu/Content/qmldir (+3/-0) |
To merge this branch: | bzr merge lp:~ken-vandine/content-hub/1_3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Sheldon (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Review via email: mp+270560@code.launchpad.net |
Commit message
Added ContentPeerPick
Description of the change
Added ContentPeerPick
PS Jenkins bot (ps-jenkins) wrote : | # |
- 244. By Ken VanDine
-
merged trunk
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:244
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 245. By Ken VanDine
-
Added ContentPageHeader (copied from webbrowser-app) to provide our own header
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:245
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 246. By Ken VanDine
-
Added a read-only property to ContentPeerPicker to expose the title
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:246
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 247. By Ken VanDine
-
dropped the title property added in the previous commit
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:247
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 248. By Ken VanDine
-
Updated for UbuntuShape deprecations
Ken VanDine (ken-vandine) wrote : | # |
Are there any related MPs required for this MP to build/function as expected? Please list.
* No
Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
* Yes
Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
* Yes
Did you successfully run all tests found in your component's Test Plan (https:/
* Yes
If you changed the UI, was the change specified/approved by design?
* No
If you changed UI labels, did you update the pot file?
* No
If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
* No
- 249. By Ken VanDine
-
merged trunk
- 250. By Ken VanDine
-
Major version bump
- 251. By Ken VanDine
-
removed hardcoded color
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:248
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:251
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Michael Sheldon (michael-sheldon) wrote : | # |
Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
* Yes
Did CI run pass? If not, please explain why.
* Yes
Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
* Yes
Preview Diff
1 | === modified file 'debian/changelog' |
2 | --- debian/changelog 2015-09-09 16:58:40 +0000 |
3 | +++ debian/changelog 2015-09-21 15:10:37 +0000 |
4 | @@ -1,3 +1,9 @@ |
5 | +content-hub (0.1-0ubuntu1) UNRELEASED; urgency=medium |
6 | + |
7 | + * Major version bump |
8 | + |
9 | + -- Ken VanDine <ken.vandine@canonical.com> Mon, 21 Sep 2015 10:57:36 -0400 |
10 | + |
11 | content-hub (0.0+15.10.20150909-0ubuntu1) wily; urgency=medium |
12 | |
13 | [ Ken VanDine ] |
14 | |
15 | === added file 'import/Ubuntu/Content/ContentPageHeader.qml' |
16 | --- import/Ubuntu/Content/ContentPageHeader.qml 1970-01-01 00:00:00 +0000 |
17 | +++ import/Ubuntu/Content/ContentPageHeader.qml 2015-09-21 15:10:37 +0000 |
18 | @@ -0,0 +1,97 @@ |
19 | + /* |
20 | + * Copyright 2015 Canonical Ltd. |
21 | + * |
22 | + * This file is part of content-hub. |
23 | + * |
24 | + * webbrowser-app is free software; you can redistribute it and/or modify |
25 | + * it under the terms of the GNU General Public License as published by |
26 | + * the Free Software Foundation; version 3. |
27 | + * |
28 | + * webbrowser-app is distributed in the hope that it will be useful, |
29 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
30 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
31 | + * GNU General Public License for more details. |
32 | + * |
33 | + * You should have received a copy of the GNU General Public License |
34 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
35 | + */ |
36 | + |
37 | +import QtQuick 2.4 |
38 | +import Ubuntu.Components 1.3 |
39 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
40 | + |
41 | +/* |
42 | + * Component to use as page header in the ContentPeerPicker |
43 | + * |
44 | + * It has a cancel() signal fired when cancel button is pressed and a title |
45 | + * property to set the page title |
46 | + */ |
47 | + |
48 | +Column { |
49 | + id: root |
50 | + signal cancel() |
51 | + property string title |
52 | + |
53 | + height: childrenRect.height |
54 | + |
55 | + anchors { |
56 | + left: parent.left |
57 | + right: parent.right |
58 | + } |
59 | + |
60 | + Rectangle { |
61 | + id: title |
62 | + |
63 | + height: units.gu(7) - divider.height |
64 | + anchors { left: parent.left; right: parent.right } |
65 | + |
66 | + Rectangle { |
67 | + anchors.fill: parent |
68 | + color: Theme.palette.normal.background |
69 | + } |
70 | + |
71 | + AbstractButton { |
72 | + id: cancelButton |
73 | + objectName: "cancelButton" |
74 | + |
75 | + width: height |
76 | + |
77 | + onTriggered: root.cancel() |
78 | + anchors { |
79 | + top: parent.top |
80 | + bottom: parent.bottom |
81 | + left: parent.left |
82 | + } |
83 | + |
84 | + Rectangle { |
85 | + anchors.fill: parent |
86 | + anchors.leftMargin: units.gu(1) |
87 | + anchors.rightMargin: units.gu(1) |
88 | + color: "#E6E6E6" |
89 | + visible: parent.pressed |
90 | + } |
91 | + |
92 | + Icon { |
93 | + name: "close" |
94 | + anchors { |
95 | + fill: parent |
96 | + topMargin: units.gu(2) |
97 | + bottomMargin: units.gu(2) |
98 | + } |
99 | + } |
100 | + } |
101 | + |
102 | + Label { |
103 | + anchors { |
104 | + left: cancelButton.right |
105 | + verticalCenter: parent.verticalCenter |
106 | + } |
107 | + text: root.title |
108 | + fontSize: 'x-large' |
109 | + } |
110 | + } |
111 | + |
112 | + ListItem.Divider { |
113 | + id: divider |
114 | + } |
115 | +} |
116 | |
117 | === added file 'import/Ubuntu/Content/ContentPeerPicker13.qml' |
118 | --- import/Ubuntu/Content/ContentPeerPicker13.qml 1970-01-01 00:00:00 +0000 |
119 | +++ import/Ubuntu/Content/ContentPeerPicker13.qml 2015-09-21 15:10:37 +0000 |
120 | @@ -0,0 +1,253 @@ |
121 | +/* |
122 | + * Copyright 2013-2015 Canonical Ltd. |
123 | + * |
124 | + * This program is free software; you can redistribute it and/or modify |
125 | + * it under the terms of the GNU Lesser General Public License as published by |
126 | + * the Free Software Foundation; version 3. |
127 | + * |
128 | + * This program is distributed in the hope that it will be useful, |
129 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
130 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
131 | + * GNU Lesser General Public License for more details. |
132 | + * |
133 | + * You should have received a copy of the GNU Lesser General Public License |
134 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
135 | + */ |
136 | + |
137 | +import QtQuick 2.4 |
138 | +import Ubuntu.Components 1.3 |
139 | +import Ubuntu.Components.Popups 1.3 |
140 | +import Ubuntu.Components.ListItems 1.3 as ListItem |
141 | +import Ubuntu.Content 1.3 |
142 | + |
143 | +/*! |
144 | + \internal |
145 | + Documentation is in ContentPeerPicker.qdoc |
146 | +*/ |
147 | +Item { |
148 | + id: root |
149 | + anchors.fill: parent |
150 | + |
151 | + property var handler |
152 | + property var contentType |
153 | + property alias showTitle: header.visible |
154 | + property var peer |
155 | + property var customPeerModelLoader |
156 | + property string headerText |
157 | + property var completed: false |
158 | + |
159 | + signal peerSelected |
160 | + signal cancelPressed |
161 | + |
162 | + Rectangle { |
163 | + id: background |
164 | + anchors.fill: parent |
165 | + color: Theme.palette.normal.background |
166 | + } |
167 | + |
168 | + ContentPageHeader { |
169 | + id: header |
170 | + title: headerText ? headerText : (handler === ContentHandler.Source) ? i18n.dtr("content-hub", "Choose from") : (handler === ContentHandler.Destination ? i18n.dtr("content-hub", "Open with") : i18n.dtr("content-hub", "Share to")) |
171 | + onCancel: { |
172 | + if(root.activeTransfer) { |
173 | + root.activeTransfer.state = ContentTransfer.Aborted; |
174 | + } |
175 | + cancelPressed() |
176 | + } |
177 | + } |
178 | + |
179 | + Loader { |
180 | + id: peerModelLoader |
181 | + active: false |
182 | + asynchronous: true |
183 | + sourceComponent: ContentPeerModel { } |
184 | + onLoaded: { |
185 | + item.handler = root.handler; |
186 | + item.contentType = root.contentType; |
187 | + } |
188 | + } |
189 | + |
190 | + Component.onCompleted: { |
191 | + if (root.visible) { |
192 | + if (customPeerModelLoader) { |
193 | + customPeerModelLoader.active = true; |
194 | + } else { |
195 | + peerModelLoader.active = true; |
196 | + } |
197 | + } |
198 | + completed = true; |
199 | + } |
200 | + |
201 | + onVisibleChanged: { |
202 | + if (completed) { |
203 | + if (customPeerModelLoader) { |
204 | + customPeerModelLoader.active = true; |
205 | + } else { |
206 | + peerModelLoader.active = true; |
207 | + } |
208 | + } |
209 | + } |
210 | + |
211 | + onHandlerChanged: { |
212 | + if (!customPeerModelLoader && peerModelLoader.item) { |
213 | + appPeers.model = undefined; // Clear grid view |
214 | + peerModelLoader.item.handler = root.handler; |
215 | + appPeers.model = peerModelLoader.item.peers; |
216 | + } |
217 | + } |
218 | + |
219 | + onContentTypeChanged: { |
220 | + if (!customPeerModelLoader && peerModelLoader.item) { |
221 | + appPeers.model = undefined; // Clear grid view |
222 | + peerModelLoader.item.contentType = root.contentType; |
223 | + appPeers.model = peerModelLoader.item.peers; |
224 | + } |
225 | + } |
226 | + |
227 | + Component { |
228 | + id: peerDelegate |
229 | + Item { |
230 | + width: units.gu(13.5) |
231 | + height: units.gu(16) |
232 | + AbstractButton { |
233 | + width: parent.width |
234 | + height: icon.height + label.height |
235 | + UbuntuShape { |
236 | + id: icon |
237 | + anchors { |
238 | + top: parent.top |
239 | + horizontalCenter: parent.horizontalCenter |
240 | + } |
241 | + radius: "medium" |
242 | + width: units.gu(8) |
243 | + height: units.gu(7.5) |
244 | + sourceHorizontalAlignment: Image.AlignHCenter |
245 | + sourceVerticalAlignment: Image.AlignVCenter |
246 | + source: Image { |
247 | + id: image |
248 | + objectName: "image" |
249 | + sourceSize { width: icon.width; height: icon.height } |
250 | + asynchronous: true |
251 | + cache: false |
252 | + source: "image://content-hub/" + modelData.appId |
253 | + } |
254 | + } |
255 | + |
256 | + Label { |
257 | + id: label |
258 | + objectName: "label" |
259 | + anchors { |
260 | + baseline: icon.bottom |
261 | + baselineOffset: units.gu(2) |
262 | + left: parent.left |
263 | + right: parent.right |
264 | + leftMargin: units.gu(1) |
265 | + rightMargin: units.gu(1) |
266 | + } |
267 | + |
268 | + opacity: 0.9 |
269 | + fontSize: "small" |
270 | + elide: Text.ElideMiddle |
271 | + horizontalAlignment: Text.AlignHCenter |
272 | + text: modelData.name || modelData.appId |
273 | + } |
274 | + |
275 | + onClicked: { |
276 | + peer = modelData |
277 | + peerSelected() |
278 | + } |
279 | + } |
280 | + |
281 | + } |
282 | + } |
283 | + |
284 | + ListItem.Header { |
285 | + id: appTitle |
286 | + anchors.top: header.visible ? header.bottom : parent.top |
287 | + text: i18n.dtr("content-hub", "Apps") |
288 | + } |
289 | + |
290 | + Rectangle { |
291 | + id: apps |
292 | + color: ColorUtils.luminance(background.color) >= 0.85 ? "#FFFFFF" : Qt.darker(background.color) |
293 | + clip: true |
294 | + anchors { |
295 | + left: parent.left |
296 | + right: parent.right |
297 | + top: appTitle.bottom |
298 | + bottom: devTitle.visible ? devTitle.top : parent.bottom |
299 | + bottomMargin: units.gu(1) |
300 | + } |
301 | + |
302 | + Flickable { |
303 | + anchors.fill: parent |
304 | + |
305 | + ResponsiveGridView { |
306 | + id: appPeers |
307 | + anchors.fill: parent |
308 | + minimumHorizontalSpacing: units.gu(0.5) |
309 | + maximumNumberOfColumns: 6 |
310 | + delegateWidth: units.gu(11) |
311 | + delegateHeight: units.gu(9.5) |
312 | + verticalSpacing: units.gu(2) |
313 | + model: customPeerModelLoader ? customPeerModelLoader.item.peers : peerModelLoader.item.peers |
314 | + delegate: peerDelegate |
315 | + |
316 | + Label { |
317 | + anchors.top: parent.top |
318 | + anchors.topMargin: units.gu(2.5) |
319 | + anchors.horizontalCenter: parent.horizontalCenter |
320 | + width: parent.width - units.gu(5) |
321 | + wrapMode: Text.WordWrap |
322 | + horizontalAlignment: Text.AlignHCenter |
323 | + text: root.handler === ContentHandler.Source ? i18n.dtr("content-hub", "Sorry, there aren't currently any apps installed that can provide this type of content.") : i18n.dtr("content-hub", "Sorry, there aren't currently any apps installed that can handle this type of content.") |
324 | + visible: appPeers.model ? appPeers.model.length == 0 : false |
325 | + } |
326 | + } |
327 | + } |
328 | + } |
329 | + |
330 | + ListItem.Header { |
331 | + id: devTitle |
332 | + // TODO: make this visible when we have a way to populate devices |
333 | + visible: false |
334 | + anchors { |
335 | + left: parent.left |
336 | + right: parent.right |
337 | + top: apps.bottom |
338 | + } |
339 | + text: i18n.dtr("content-hub", "Devices") |
340 | + } |
341 | + |
342 | + Rectangle { |
343 | + id: devices |
344 | + // TODO: make this visible when we have a way to populate devices |
345 | + visible: false |
346 | + color: ColorUtils.luminance(background.color) >= 0.85 ? "#FFFFFF" : Qt.darker(background.color) |
347 | + width: parent.width |
348 | + radius: 0 |
349 | + anchors { |
350 | + left: parent.left |
351 | + right: parent.right |
352 | + top: devTitle.bottom |
353 | + bottom: parent.bottom |
354 | + bottomMargin: units.gu(1) |
355 | + } |
356 | + |
357 | + Flickable { |
358 | + anchors.fill: parent |
359 | + |
360 | + ResponsiveGridView { |
361 | + id: devPeers |
362 | + anchors.fill: parent |
363 | + minimumHorizontalSpacing: units.gu(0.5) |
364 | + maximumNumberOfColumns: 6 |
365 | + delegateWidth: units.gu(11) |
366 | + delegateHeight: units.gu(9.5) |
367 | + verticalSpacing: units.gu(2) |
368 | + delegate: peerDelegate |
369 | + } |
370 | + } |
371 | + } |
372 | + |
373 | +} |
374 | |
375 | === modified file 'import/Ubuntu/Content/contenthubplugin.cpp' |
376 | --- import/Ubuntu/Content/contenthubplugin.cpp 2014-09-03 20:41:11 +0000 |
377 | +++ import/Ubuntu/Content/contenthubplugin.cpp 2015-09-21 15:10:37 +0000 |
378 | @@ -70,8 +70,9 @@ |
379 | versions.append(QPair<int, int>(0, 1)); |
380 | versions.append(QPair<int, int>(1, 0)); |
381 | versions.append(QPair<int, int>(1, 1)); |
382 | + versions.append(QPair<int, int>(1, 3)); |
383 | |
384 | - // Register common types for version 0.1, 1.0 and 1.1 |
385 | + // Register common types for version 0.1, 1.0, 1.1 and 1.3 |
386 | for(int i = 0; i < versions.length(); i++) { |
387 | int versionMajor = versions[i].first; |
388 | int versionMinor = versions[i].second; |
389 | |
390 | === modified file 'import/Ubuntu/Content/qmldir' |
391 | --- import/Ubuntu/Content/qmldir 2014-07-21 16:51:46 +0000 |
392 | +++ import/Ubuntu/Content/qmldir 2015-09-21 15:10:37 +0000 |
393 | @@ -11,3 +11,6 @@ |
394 | |
395 | #1.1 |
396 | ContentPeerPicker 1.1 ContentPeerPicker11.qml |
397 | + |
398 | +#1.3 |
399 | +ContentPeerPicker 1.3 ContentPeerPicker13.qml |
PASSED: Continuous integration, rev:243 jenkins. qa.ubuntu. com/job/ content- hub-ci/ 280/ jenkins. qa.ubuntu. com/job/ content- hub-vivid- amd64-ci/ 62 jenkins. qa.ubuntu. com/job/ content- hub-vivid- armhf-ci/ 62 jenkins. qa.ubuntu. com/job/ content- hub-vivid- armhf-ci/ 62/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ content- hub-vivid- i386-ci/ 62
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/content- hub-ci/ 280/rebuild
http://