Merge lp:~artmello/camera-app/camera-app-show_preview_content_picker into lp:camera-app

Proposed by Arthur Mello
Status: Needs review
Proposed branch: lp:~artmello/camera-app/camera-app-show_preview_content_picker
Merge into: lp:camera-app
Diff against target: 206 lines (+42/-30)
4 files modified
GalleryView.qml (+27/-18)
GalleryViewHeader.qml (+5/-4)
PhotogridView.qml (+7/-7)
SlideshowView.qml (+3/-1)
To merge this branch: bzr merge lp:~artmello/camera-app/camera-app-show_preview_content_picker
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Sebastien Bacher Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+244615@code.launchpad.net

Commit message

Make the select mode beahvior on content picker equal to the user selection mode

Description of the change

Make the select mode beahvior on content picker equal to the user selection mode

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sebastien Bacher (seb128) wrote :

That has been sitting there for a while and now has merge conflicts, it needs at least to be rebased ... could you do that if it's still accurate, then maybe we can try to get it landed?

review: Needs Fixing
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

451. By Arthur Mello

Does not show the previous taken photo if we are in content picker

450. By Arthur Mello

Control the display of the actions drawer on the content picker

449. By Arthur Mello

Control the display of the select all button on the content picker

448. By Arthur Mello

Make the select mode beahvior on content picker equal to the user selection mode

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GalleryView.qml'
2--- GalleryView.qml 2014-12-05 18:50:53 +0000
3+++ GalleryView.qml 2014-12-12 15:31:30 +0000
4@@ -37,21 +37,28 @@
5 singleSelectionOnly: main.transfer.selectionType === ContentTransfer.Single
6 }
7
8- property bool gridMode: false
9+ property bool gridMode: main.contentExportMode
10 property bool showLastPhotoTakenPending: false
11
12 function showLastPhotoTaken() {
13- galleryView.gridMode = false;
14- // do not immediately try to show the photo in the slideshow as it
15- // might not be in the photo roll model yet
16- showLastPhotoTakenPending = true;
17+ if (!main.contentExportMode) {
18+ galleryView.gridMode = false;
19+ // do not immediately try to show the photo in the slideshow as it
20+ // might not be in the photo roll model yet
21+ showLastPhotoTakenPending = true;
22+ }
23 }
24
25- function exitUserSelectionMode() {
26+ function exitInSelectionMode() {
27 if (gridMode) {
28 model.clearSelection();
29- model.singleSelectionOnly = true;
30- userSelectionMode = false;
31+
32+ if (main.contentExportMode) {
33+ galleryView.exit();
34+ } else {
35+ model.singleSelectionOnly = true;
36+ userSelectionMode = false;
37+ }
38 } else {
39 gridMode = true;
40 }
41@@ -71,6 +78,7 @@
42 model: galleryView.model
43 visible: opacity != 0.0
44 inView: galleryView.inView
45+ showSlideshowActions: !main.contentExportMode
46 onToggleHeader: header.toggle();
47 }
48
49@@ -78,17 +86,17 @@
50 id: photogridView
51 anchors.fill: parent
52 headerHeight: header.height
53- userSelectionMode: galleryView.userSelectionMode
54 model: galleryView.model
55 visible: opacity != 0.0
56 inView: galleryView.inView
57 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
58+ showInSelectionActions: galleryView.userSelectionMode
59 onPhotoClicked: {
60 slideshowView.showPhotoAtIndex(index);
61 galleryView.gridMode = false;
62 }
63 onPhotoPressAndHold: {
64- if (!galleryView.userSelectionMode) {
65+ if (!main.contentExportMode && !galleryView.userSelectionMode) {
66 galleryView.userSelectionMode = true;
67 model.singleSelectionOnly = false;
68 model.toggleSelected(index);
69@@ -96,22 +104,23 @@
70 }
71
72 onPhotoSelectionAreaClicked: {
73- if (main.contentExportMode || galleryView.userSelectionMode)
74+ if (inSelectionMode)
75 model.toggleSelected(index);
76 }
77- onExitUserSelectionMode: galleryView.exitUserSelectionMode()
78+ onExitInSelectionMode: galleryView.exitInSelectionMode()
79 }
80
81 // FIXME: it would be better to use the standard header from the toolkit
82 GalleryViewHeader {
83 id: header
84 actions: currentView.actions
85- gridMode: galleryView.gridMode || main.contentExportMode
86- validationVisible: main.contentExportMode && model.selectedFiles.length > 0
87- userSelectionMode: galleryView.userSelectionMode
88+ gridMode: galleryView.gridMode
89+ validationVisible: galleryView.gridMode && main.contentExportMode && model.selectedFiles.length > 0
90+ inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
91+ singleSelectionOnly: model.singleSelectionOnly
92 onExit: {
93- if (userSelectionMode) {
94- galleryView.exitUserSelectionMode();
95+ if (inSelectionMode) {
96+ galleryView.exitInSelectionMode();
97 } else {
98 galleryView.exit()
99 }
100@@ -186,7 +195,7 @@
101 }
102 }
103
104- state: galleryView.gridMode || main.contentExportMode ? "GRID" : "SLIDESHOW"
105+ state: galleryView.gridMode ? "GRID" : "SLIDESHOW"
106 states: [
107 State {
108 name: "SLIDESHOW"
109
110=== modified file 'GalleryViewHeader.qml'
111--- GalleryViewHeader.qml 2014-12-03 12:37:51 +0000
112+++ GalleryViewHeader.qml 2014-12-12 15:31:30 +0000
113@@ -35,7 +35,8 @@
114 property alias actions: actionsDrawer.actions
115 property bool gridMode: false
116 property bool validationVisible
117- property bool userSelectionMode: false
118+ property bool inSelectionMode: false
119+ property bool singleSelectionOnly: false
120 signal exit
121 signal toggleViews
122 signal toggleSelectAll
123@@ -72,7 +73,7 @@
124 }
125
126 Label {
127- text: userSelectionMode ? i18n.tr("Select") : i18n.tr("Photo Roll")
128+ text: inSelectionMode ? i18n.tr("Select") : i18n.tr("Photo Roll")
129 fontSize: "x-large"
130 color: Theme.palette.normal.foregroundText
131 elide: Text.ElideRight
132@@ -87,7 +88,7 @@
133 }
134 iconName: header.gridMode ? "stock_image" : "view-grid-symbolic"
135 onClicked: header.toggleViews()
136- visible: !main.contentExportMode && !userSelectionMode
137+ visible: !inSelectionMode
138 }
139
140 IconButton {
141@@ -98,7 +99,7 @@
142 }
143 iconName: "select"
144 onClicked: header.toggleSelectAll()
145- visible: header.gridMode && userSelectionMode
146+ visible: header.gridMode && inSelectionMode && !singleSelectionOnly
147 }
148
149 IconButton {
150
151=== modified file 'PhotogridView.qml'
152--- PhotogridView.qml 2014-12-03 12:37:15 +0000
153+++ PhotogridView.qml 2014-12-12 15:31:30 +0000
154@@ -30,13 +30,13 @@
155 signal photoClicked(int index)
156 signal photoPressAndHold(int index)
157 signal photoSelectionAreaClicked(int index)
158- signal exitUserSelectionMode
159+ signal exitInSelectionMode
160 property real headerHeight
161 property bool inView
162- property bool inSelectionMode
163- property bool userSelectionMode: false
164- property var actions: userSelectionMode ? userSelectionActions : []
165- property list<Action> userSelectionActions: [
166+ property bool inSelectionMode: false
167+ property bool showInSelectionActions: false
168+ property var actions: showInSelectionActions ? inSelectionActions : []
169+ property list<Action> inSelectionActions: [
170 Action {
171 text: i18n.tr("Share")
172 iconName: "share"
173@@ -190,7 +190,7 @@
174 SharePopover {
175 id: sharePopover
176
177- onContentPeerSelected: photogridView.exitUserSelectionMode();
178+ onContentPeerSelected: photogridView.exitInSelectionMode();
179
180 transferContentType: MimeTypeMapper.mimeTypeToContentType(model.get(model.selectedFiles[0], "fileType"));
181 transferItems: model.selectedFiles.map(function(row) {
182@@ -216,7 +216,7 @@
183 fileOperations.remove(currentFilePath);
184 }
185
186- photogridView.exitUserSelectionMode();
187+ photogridView.exitInSelectionMode();
188 }
189 }
190 }
191
192=== modified file 'SlideshowView.qml'
193--- SlideshowView.qml 2014-12-05 18:50:53 +0000
194+++ SlideshowView.qml 2014-12-12 15:31:30 +0000
195@@ -30,8 +30,10 @@
196 property int currentIndex: listView.currentIndex
197 property bool touchAcquired: listView.currentItem ? listView.currentItem.pinchInProgress : false
198 property bool inView
199+ property bool showSlideshowActions: false
200+ property var actions: showSlideshowActions ? slideshowActions : []
201 signal toggleHeader
202- property list<Action> actions: [
203+ property list<Action> slideshowActions: [
204 Action {
205 text: i18n.tr("Share")
206 iconName: "share"

Subscribers

People subscribed via source and target branches