Merge lp:~ken-vandine/gallery-app/oop_peer_picker into lp:gallery-app

Proposed by Ken VanDine
Status: Approved
Approved by: Arthur Mello
Approved revision: 1338
Proposed branch: lp:~ken-vandine/gallery-app/oop_peer_picker
Merge into: lp:gallery-app
Prerequisite: lp:~ken-vandine/gallery-app/add_profile
Diff against target: 255 lines (+42/-111)
7 files modified
debian/control (+2/-1)
rc/qml/EventsOverview.qml (+15/-34)
rc/qml/MediaViewer/MediaViewer.qml (+13/-30)
rc/qml/PhotosOverview.qml (+12/-31)
tests/autopilot/gallery_app/emulators/events_view.py (+0/-5)
tests/autopilot/gallery_app/emulators/photo_viewer.py (+0/-5)
tests/autopilot/gallery_app/emulators/photos_view.py (+0/-5)
To merge this branch: bzr merge lp:~ken-vandine/gallery-app/oop_peer_picker
Reviewer Review Type Date Requested Status
Arthur Mello (community) Approve
system-apps-ci-bot continuous-integration Approve
Review via email: mp+312292@code.launchpad.net

Commit message

Use new out of process peer picker for sharing

Description of the change

Use new out of process peer picker for sharing

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:1337
https://jenkins.canonical.com/system-apps/job/lp-gallery-app-ci/31/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2103
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/519
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2106
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1934/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1934
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1934/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-gallery-app-ci/31/rebuild

review: Approve (continuous-integration)
1338. By Ken VanDine

Bump depends for content-hub to >= 0.3 for the out of process peer picker

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:1338
https://jenkins.canonical.com/system-apps/job/lp-gallery-app-ci/33/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2158
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/554
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2161
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1989/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1989
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1989/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-gallery-app-ci/33/rebuild

review: Approve (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote :

lgtm

review: Approve

Unmerged revisions

1338. By Ken VanDine

Bump depends for content-hub to >= 0.3 for the out of process peer picker

1337. By Ken VanDine

Use new out of process peer picker for sharing

1336. By Ken VanDine

Depend on qtdeclarative5-ubuntu-ui-extras0.2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-12-08 14:51:07 +0000
+++ debian/control 2016-12-08 14:51:08 +0000
@@ -40,8 +40,9 @@
40 qml-module-ubuntu-thumbnailer0.1,40 qml-module-ubuntu-thumbnailer0.1,
41 qtdeclarative5-ubuntu-ui-toolkit-plugin | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,41 qtdeclarative5-ubuntu-ui-toolkit-plugin | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,
42 qtdeclarative5-window-plugin,42 qtdeclarative5-window-plugin,
43 qtdeclarative5-ubuntu-content1,43 qtdeclarative5-ubuntu-content1 (>= 0.3),
44 qtdeclarative5-ubuntu-thumbnailer0.1,44 qtdeclarative5-ubuntu-thumbnailer0.1,
45 qtdeclarative5-ubuntu-ui-extras0.2,
45Description: Photo gallery for Ubuntu46Description: Photo gallery for Ubuntu
46 gallery-app is a photo gallery for the Ubuntu platform.47 gallery-app is a photo gallery for the Ubuntu platform.
4748
4849
=== modified file 'rc/qml/EventsOverview.qml'
--- rc/qml/EventsOverview.qml 2016-04-13 19:00:29 +0000
+++ rc/qml/EventsOverview.qml 2016-12-08 14:51:08 +0000
@@ -147,8 +147,9 @@
147 PopupUtils.open(unableShareDialog, null);147 PopupUtils.open(unableShareDialog, null);
148 return;148 return;
149 }149 }
150 overview.pushPage(sharePicker);150 ContentHub.requestPeerForType(
151 sharePicker.visible = true;151 galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures,
152 ContentHandler.Share);
152 }153 }
153 }154 }
154 ]155 ]
@@ -184,38 +185,18 @@
184 ContentItem {}185 ContentItem {}
185 }186 }
186187
187 Page {188 Connections {
188 id: sharePicker189 target: ContentHub
189 visible: false190 onPeerSelected: {
190 title: i18n.tr("Share to")191 var curTransfer = peer.request();
191192 if (curTransfer.state === ContentTransfer.InProgress) {
192 ContentPeerPicker {193 var medias = organicEventView.selection.model.selectedMediasQML;
193 objectName: "sharePickerEvents"194 curTransfer.items = medias.filter(function(data) {
194 anchors.fill: parent195 return data.hasOwnProperty('type'); // filter out event headers
195 showTitle: false196 }).map(function(data) {
196197 return contentItemComp.createObject(parent, {"url": data.path});
197 contentType: organicEventView.selection.mediaType === MediaSource.Video ? ContentType.Videos : ContentType.Pictures198 });
198 handler: ContentHandler.Share199 curTransfer.state = ContentTransfer.Charged;
199
200 onPeerSelected: {
201 overview.popPage();
202 sharePicker.visible = false;
203
204 var curTransfer = peer.request();
205 if (curTransfer.state === ContentTransfer.InProgress)
206 {
207 var medias = organicEventView.selection.model.selectedMediasQML;
208 curTransfer.items = medias.filter(function(data) {
209 return data.hasOwnProperty('type'); // filter out event headers
210 }).map(function(data) {
211 return contentItemComp.createObject(parent, {"url": data.path});
212 });
213 curTransfer.state = ContentTransfer.Charged;
214 }
215 }
216 onCancelPressed: {
217 overview.popPage();
218 sharePicker.visible = false;
219 }200 }
220 }201 }
221 }202 }
222203
=== modified file 'rc/qml/MediaViewer/MediaViewer.qml'
--- rc/qml/MediaViewer/MediaViewer.qml 2016-02-24 17:24:38 +0000
+++ rc/qml/MediaViewer/MediaViewer.qml 2016-12-08 14:51:08 +0000
@@ -63,7 +63,7 @@
63 property bool isReady: model != null && model.count > 0 && galleryPhotoViewer.currentItem63 property bool isReady: model != null && model.count > 0 && galleryPhotoViewer.currentItem
6464
65 // tooolbar actions for the full view65 // tooolbar actions for the full view
66 property variant actions: (media && !sharePicker.visible) ? d.mediaActions : []66 property variant actions: media ? d.mediaActions : []
6767
68 property variant backAction: d.backAction68 property variant backAction: d.backAction
6969
@@ -172,33 +172,15 @@
172 ContentItem {}172 ContentItem {}
173 }173 }
174174
175 Page {175 Connections {
176 id: sharePicker176 target: ContentHub
177 visible: false177 onPeerSelected: {
178 title: i18n.tr("Share to")178 console.debug("onPeerSelected: " + peer);
179179 var curTransfer = peer.request();
180 onVisibleChanged: viewerWrapper.setHeaderVisibilityRequested(!visible)180 if (curTransfer.state === ContentTransfer.InProgress)
181181 {
182 ContentPeerPicker {182 curTransfer.items = [ contentItemComp.createObject(parent, {"url": viewerWrapper.media.path}) ];
183 objectName: "sharePicker"183 curTransfer.state = ContentTransfer.Charged;
184 showTitle: false
185 anchors.fill: parent
186 contentType: galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures
187 handler: ContentHandler.Share
188
189 onPeerSelected: {
190 overview.popPage();
191 sharePicker.visible = false;
192 var curTransfer = peer.request();
193 if (curTransfer.state === ContentTransfer.InProgress)
194 {
195 curTransfer.items = [ contentItemComp.createObject(parent, {"url": viewerWrapper.media.path}) ];
196 curTransfer.state = ContentTransfer.Charged;
197 }
198 }
199 onCancelPressed: {
200 overview.popPage();
201 sharePicker.visible = false;
202 }184 }
203 }185 }
204 }186 }
@@ -358,8 +340,9 @@
358 iconName: "share"340 iconName: "share"
359 visible: !APP.desktopMode341 visible: !APP.desktopMode
360 onTriggered: {342 onTriggered: {
361 overview.pushPage(sharePicker)343 ContentHub.requestPeerForType(
362 sharePicker.visible = true;344 galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures,
345 ContentHandler.Share);
363 }346 }
364 }347 }
365 ]348 ]
366349
=== modified file 'rc/qml/PhotosOverview.qml'
--- rc/qml/PhotosOverview.qml 2016-04-13 19:00:29 +0000
+++ rc/qml/PhotosOverview.qml 2016-12-08 14:51:08 +0000
@@ -173,9 +173,9 @@
173 PopupUtils.open(unableShareDialog, null);173 PopupUtils.open(unableShareDialog, null);
174 return;174 return;
175 }175 }
176176 ContentHub.requestPeerForType(
177 overview.pushPage(sharePicker)177 galleryPhotoViewer.media.type === MediaSource.Video ? ContentType.Videos : ContentType.Pictures,
178 sharePicker.visible = true;178 ContentHandler.Share);
179 }179 }
180 }180 }
181 ]181 ]
@@ -197,34 +197,15 @@
197 ContentItem {}197 ContentItem {}
198 }198 }
199199
200 Page {200 Connections {
201 id: sharePicker201 target: ContentHub
202 visible: false202 onPeerSelected: {
203 title: i18n.tr("Share to")203 var curTransfer = peer.request();
204204 if (curTransfer.state === ContentTransfer.InProgress) {
205 ContentPeerPicker {205 curTransfer.items = d.selection.model.selectedMediasQML.map(function(data) {
206 objectName: "sharePickerPhotos"206 return contentItemComp.createObject(parent, {"url": data.path});
207 showTitle: false207 });
208 anchors.fill: parent208 curTransfer.state = ContentTransfer.Charged;
209 contentType: d.selection.mediaType === MediaSource.Video ? ContentType.Videos : ContentType.Pictures
210 handler: ContentHandler.Share
211
212 onPeerSelected: {
213 overview.popPage();
214 sharePicker.visible = false;
215
216 var curTransfer = peer.request();
217 if (curTransfer.state === ContentTransfer.InProgress)
218 {
219 curTransfer.items = d.selection.model.selectedMediasQML.map(function(data) {
220 return contentItemComp.createObject(parent, {"url": data.path});
221 });
222 curTransfer.state = ContentTransfer.Charged;
223 }
224 }
225 onCancelPressed: {
226 overview.popPage();
227 sharePicker.visible = false;
228 }209 }
229 }210 }
230 }211 }
231212
=== modified file 'tests/autopilot/gallery_app/emulators/events_view.py'
--- tests/autopilot/gallery_app/emulators/events_view.py 2016-02-12 21:53:45 +0000
+++ tests/autopilot/gallery_app/emulators/events_view.py 2016-12-08 14:51:08 +0000
@@ -46,11 +46,6 @@
46 photo_delegates = event.select_many(objectName='eventPhoto')46 photo_delegates = event.select_many(objectName='eventPhoto')
47 return len(photo_delegates)47 return len(photo_delegates)
4848
49 def get_share_peer_picker(self):
50 """Returns the photo viewer share picker."""
51 return self.app.wait_select_single(objectName="sharePickerEvents",
52 visible=True)
53
54 def _get_image_in_event_view(self, image_name):49 def _get_image_in_event_view(self, image_name):
55 """Return the photo of the gallery based on image name.50 """Return the photo of the gallery based on image name.
5651
5752
=== modified file 'tests/autopilot/gallery_app/emulators/photo_viewer.py'
--- tests/autopilot/gallery_app/emulators/photo_viewer.py 2016-01-15 20:29:19 +0000
+++ tests/autopilot/gallery_app/emulators/photo_viewer.py 2016-12-08 14:51:08 +0000
@@ -97,11 +97,6 @@
97 return self.app.wait_select_single("PopupAlbumPicker",97 return self.app.wait_select_single("PopupAlbumPicker",
98 objectName="popupAlbumPicker")98 objectName="popupAlbumPicker")
9999
100 def get_share_peer_picker(self):
101 """Returns the photo viewer share picker."""
102 return self.app.wait_select_single(objectName="sharePicker",
103 visible=True)
104
105 def get_photo_editor(self):100 def get_photo_editor(self):
106 """Returns the photo edit dialog."""101 """Returns the photo edit dialog."""
107 return self.app.wait_select_single("PhotoEditor")102 return self.app.wait_select_single("PhotoEditor")
108103
=== modified file 'tests/autopilot/gallery_app/emulators/photos_view.py'
--- tests/autopilot/gallery_app/emulators/photos_view.py 2016-02-12 21:53:45 +0000
+++ tests/autopilot/gallery_app/emulators/photos_view.py 2016-12-08 14:51:08 +0000
@@ -28,8 +28,3 @@
28 photo_delegates = self.app.select_many("QQuickItem",28 photo_delegates = self.app.select_many("QQuickItem",
29 objectName="allPotosGridPhoto")29 objectName="allPotosGridPhoto")
30 return len(photo_delegates)30 return len(photo_delegates)
31
32 def get_share_peer_picker(self):
33 """Returns the photo viewer share picker."""
34 return self.app.wait_select_single(objectName="sharePickerPhotos",
35 visible=True)

Subscribers

People subscribed via source and target branches