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
=== modified file 'GalleryView.qml'
--- GalleryView.qml 2014-12-05 18:50:53 +0000
+++ GalleryView.qml 2014-12-12 15:31:30 +0000
@@ -37,21 +37,28 @@
37 singleSelectionOnly: main.transfer.selectionType === ContentTransfer.Single37 singleSelectionOnly: main.transfer.selectionType === ContentTransfer.Single
38 }38 }
3939
40 property bool gridMode: false40 property bool gridMode: main.contentExportMode
41 property bool showLastPhotoTakenPending: false41 property bool showLastPhotoTakenPending: false
4242
43 function showLastPhotoTaken() {43 function showLastPhotoTaken() {
44 galleryView.gridMode = false;44 if (!main.contentExportMode) {
45 // do not immediately try to show the photo in the slideshow as it45 galleryView.gridMode = false;
46 // might not be in the photo roll model yet46 // do not immediately try to show the photo in the slideshow as it
47 showLastPhotoTakenPending = true;47 // might not be in the photo roll model yet
48 showLastPhotoTakenPending = true;
49 }
48 }50 }
4951
50 function exitUserSelectionMode() {52 function exitInSelectionMode() {
51 if (gridMode) {53 if (gridMode) {
52 model.clearSelection();54 model.clearSelection();
53 model.singleSelectionOnly = true;55
54 userSelectionMode = false;56 if (main.contentExportMode) {
57 galleryView.exit();
58 } else {
59 model.singleSelectionOnly = true;
60 userSelectionMode = false;
61 }
55 } else {62 } else {
56 gridMode = true;63 gridMode = true;
57 }64 }
@@ -71,6 +78,7 @@
71 model: galleryView.model78 model: galleryView.model
72 visible: opacity != 0.079 visible: opacity != 0.0
73 inView: galleryView.inView80 inView: galleryView.inView
81 showSlideshowActions: !main.contentExportMode
74 onToggleHeader: header.toggle();82 onToggleHeader: header.toggle();
75 }83 }
7684
@@ -78,17 +86,17 @@
78 id: photogridView86 id: photogridView
79 anchors.fill: parent87 anchors.fill: parent
80 headerHeight: header.height88 headerHeight: header.height
81 userSelectionMode: galleryView.userSelectionMode
82 model: galleryView.model89 model: galleryView.model
83 visible: opacity != 0.090 visible: opacity != 0.0
84 inView: galleryView.inView91 inView: galleryView.inView
85 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode92 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
93 showInSelectionActions: galleryView.userSelectionMode
86 onPhotoClicked: {94 onPhotoClicked: {
87 slideshowView.showPhotoAtIndex(index);95 slideshowView.showPhotoAtIndex(index);
88 galleryView.gridMode = false;96 galleryView.gridMode = false;
89 }97 }
90 onPhotoPressAndHold: {98 onPhotoPressAndHold: {
91 if (!galleryView.userSelectionMode) {99 if (!main.contentExportMode && !galleryView.userSelectionMode) {
92 galleryView.userSelectionMode = true;100 galleryView.userSelectionMode = true;
93 model.singleSelectionOnly = false;101 model.singleSelectionOnly = false;
94 model.toggleSelected(index);102 model.toggleSelected(index);
@@ -96,22 +104,23 @@
96 }104 }
97105
98 onPhotoSelectionAreaClicked: {106 onPhotoSelectionAreaClicked: {
99 if (main.contentExportMode || galleryView.userSelectionMode)107 if (inSelectionMode)
100 model.toggleSelected(index);108 model.toggleSelected(index);
101 }109 }
102 onExitUserSelectionMode: galleryView.exitUserSelectionMode()110 onExitInSelectionMode: galleryView.exitInSelectionMode()
103 }111 }
104112
105 // FIXME: it would be better to use the standard header from the toolkit113 // FIXME: it would be better to use the standard header from the toolkit
106 GalleryViewHeader {114 GalleryViewHeader {
107 id: header115 id: header
108 actions: currentView.actions116 actions: currentView.actions
109 gridMode: galleryView.gridMode || main.contentExportMode117 gridMode: galleryView.gridMode
110 validationVisible: main.contentExportMode && model.selectedFiles.length > 0118 validationVisible: galleryView.gridMode && main.contentExportMode && model.selectedFiles.length > 0
111 userSelectionMode: galleryView.userSelectionMode119 inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
120 singleSelectionOnly: model.singleSelectionOnly
112 onExit: {121 onExit: {
113 if (userSelectionMode) {122 if (inSelectionMode) {
114 galleryView.exitUserSelectionMode();123 galleryView.exitInSelectionMode();
115 } else {124 } else {
116 galleryView.exit()125 galleryView.exit()
117 }126 }
@@ -186,7 +195,7 @@
186 }195 }
187 }196 }
188197
189 state: galleryView.gridMode || main.contentExportMode ? "GRID" : "SLIDESHOW"198 state: galleryView.gridMode ? "GRID" : "SLIDESHOW"
190 states: [199 states: [
191 State {200 State {
192 name: "SLIDESHOW"201 name: "SLIDESHOW"
193202
=== modified file 'GalleryViewHeader.qml'
--- GalleryViewHeader.qml 2014-12-03 12:37:51 +0000
+++ GalleryViewHeader.qml 2014-12-12 15:31:30 +0000
@@ -35,7 +35,8 @@
35 property alias actions: actionsDrawer.actions35 property alias actions: actionsDrawer.actions
36 property bool gridMode: false36 property bool gridMode: false
37 property bool validationVisible37 property bool validationVisible
38 property bool userSelectionMode: false38 property bool inSelectionMode: false
39 property bool singleSelectionOnly: false
39 signal exit40 signal exit
40 signal toggleViews41 signal toggleViews
41 signal toggleSelectAll42 signal toggleSelectAll
@@ -72,7 +73,7 @@
72 }73 }
7374
74 Label {75 Label {
75 text: userSelectionMode ? i18n.tr("Select") : i18n.tr("Photo Roll")76 text: inSelectionMode ? i18n.tr("Select") : i18n.tr("Photo Roll")
76 fontSize: "x-large"77 fontSize: "x-large"
77 color: Theme.palette.normal.foregroundText78 color: Theme.palette.normal.foregroundText
78 elide: Text.ElideRight79 elide: Text.ElideRight
@@ -87,7 +88,7 @@
87 }88 }
88 iconName: header.gridMode ? "stock_image" : "view-grid-symbolic"89 iconName: header.gridMode ? "stock_image" : "view-grid-symbolic"
89 onClicked: header.toggleViews()90 onClicked: header.toggleViews()
90 visible: !main.contentExportMode && !userSelectionMode91 visible: !inSelectionMode
91 }92 }
9293
93 IconButton {94 IconButton {
@@ -98,7 +99,7 @@
98 }99 }
99 iconName: "select"100 iconName: "select"
100 onClicked: header.toggleSelectAll()101 onClicked: header.toggleSelectAll()
101 visible: header.gridMode && userSelectionMode102 visible: header.gridMode && inSelectionMode && !singleSelectionOnly
102 }103 }
103104
104 IconButton {105 IconButton {
105106
=== modified file 'PhotogridView.qml'
--- PhotogridView.qml 2014-12-03 12:37:15 +0000
+++ PhotogridView.qml 2014-12-12 15:31:30 +0000
@@ -30,13 +30,13 @@
30 signal photoClicked(int index)30 signal photoClicked(int index)
31 signal photoPressAndHold(int index)31 signal photoPressAndHold(int index)
32 signal photoSelectionAreaClicked(int index)32 signal photoSelectionAreaClicked(int index)
33 signal exitUserSelectionMode33 signal exitInSelectionMode
34 property real headerHeight34 property real headerHeight
35 property bool inView35 property bool inView
36 property bool inSelectionMode36 property bool inSelectionMode: false
37 property bool userSelectionMode: false37 property bool showInSelectionActions: false
38 property var actions: userSelectionMode ? userSelectionActions : []38 property var actions: showInSelectionActions ? inSelectionActions : []
39 property list<Action> userSelectionActions: [39 property list<Action> inSelectionActions: [
40 Action {40 Action {
41 text: i18n.tr("Share")41 text: i18n.tr("Share")
42 iconName: "share"42 iconName: "share"
@@ -190,7 +190,7 @@
190 SharePopover {190 SharePopover {
191 id: sharePopover191 id: sharePopover
192192
193 onContentPeerSelected: photogridView.exitUserSelectionMode();193 onContentPeerSelected: photogridView.exitInSelectionMode();
194194
195 transferContentType: MimeTypeMapper.mimeTypeToContentType(model.get(model.selectedFiles[0], "fileType"));195 transferContentType: MimeTypeMapper.mimeTypeToContentType(model.get(model.selectedFiles[0], "fileType"));
196 transferItems: model.selectedFiles.map(function(row) {196 transferItems: model.selectedFiles.map(function(row) {
@@ -216,7 +216,7 @@
216 fileOperations.remove(currentFilePath);216 fileOperations.remove(currentFilePath);
217 }217 }
218218
219 photogridView.exitUserSelectionMode();219 photogridView.exitInSelectionMode();
220 }220 }
221 }221 }
222 }222 }
223223
=== modified file 'SlideshowView.qml'
--- SlideshowView.qml 2014-12-05 18:50:53 +0000
+++ SlideshowView.qml 2014-12-12 15:31:30 +0000
@@ -30,8 +30,10 @@
30 property int currentIndex: listView.currentIndex30 property int currentIndex: listView.currentIndex
31 property bool touchAcquired: listView.currentItem ? listView.currentItem.pinchInProgress : false31 property bool touchAcquired: listView.currentItem ? listView.currentItem.pinchInProgress : false
32 property bool inView32 property bool inView
33 property bool showSlideshowActions: false
34 property var actions: showSlideshowActions ? slideshowActions : []
33 signal toggleHeader35 signal toggleHeader
34 property list<Action> actions: [36 property list<Action> slideshowActions: [
35 Action {37 Action {
36 text: i18n.tr("Share")38 text: i18n.tr("Share")
37 iconName: "share"39 iconName: "share"

Subscribers

People subscribed via source and target branches