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

Proposed by Arthur Mello
Status: Merged
Approved by: Bill Filler
Approved revision: 445
Merged at revision: 503
Proposed branch: lp:~artmello/camera-app/camera-app-fix_1416043
Merge into: lp:camera-app
Prerequisite: lp:~phablet-team/camera-app/photo-editor
Diff against target: 151 lines (+43/-17)
3 files modified
GalleryView.qml (+14/-12)
GalleryViewHeader.qml (+13/-2)
SlideshowView.qml (+16/-3)
To merge this branch: bzr merge lp:~artmello/camera-app/camera-app-fix_1416043
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+249554@code.launchpad.net

Commit message

Enable viewing full screen picture while in selection mode
Remove actions from the slide show header if we are in selection mode
Make it possible to toggle selection when on slide show view
Scroll the last seem picture from slideshow into view when returning to the grid photo roll

Description of the change

Enable viewing full screen picture while in selection mode
Remove actions from the slide show header if we are in selection mode
Make it possible to toggle selection when on slide show view
Scroll the last seem picture from slideshow into view when returning to the grid photo roll

To post a comment you must log in.
445. By Arthur Mello

Fix to display the photo fullscreen when in content hub mode
Fix to do not display slideshow toolbar options when in selection mode

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

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 2015-01-27 17:36:46 +0000
3+++ GalleryView.qml 2015-02-12 19:25:49 +0000
4@@ -37,7 +37,7 @@
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@@ -52,13 +52,9 @@
14 }
15
16 function exitUserSelectionMode() {
17- if (gridMode) {
18- model.clearSelection();
19- model.singleSelectionOnly = true;
20- userSelectionMode = false;
21- } else {
22- gridMode = true;
23- }
24+ model.clearSelection();
25+ model.singleSelectionOnly = true;
26+ userSelectionMode = false;
27 }
28
29 onExit: {
30@@ -75,6 +71,8 @@
31 model: galleryView.model
32 visible: opacity != 0.0
33 inView: galleryView.inView && galleryView.currentView == slideshowView
34+ inSelectionMode: main.contentExportMode || galleryView.userSelectionMode
35+ onToggleSelection: model.toggleSelected(currentIndex)
36 onToggleHeader: header.toggle();
37 }
38
39@@ -110,11 +108,15 @@
40 GalleryViewHeader {
41 id: header
42 actions: currentView.actions
43- gridMode: galleryView.gridMode || main.contentExportMode
44- validationVisible: main.contentExportMode && model.selectedFiles.length > 0
45+ gridMode: galleryView.gridMode
46+ validationVisible: main.contentExportMode && model.selectedFiles.length > 0 && galleryView.gridMode
47 userSelectionMode: galleryView.userSelectionMode
48 onExit: {
49- if (userSelectionMode) {
50+ if ((main.contentExportMode || userSelectionMode) && !galleryView.gridMode) {
51+ galleryView.gridMode = true;
52+ // position grid view so that the current photo in slideshow view is visible
53+ photogridView.showPhotoAtIndex(slideshowView.currentIndex);
54+ } else if (userSelectionMode) {
55 galleryView.exitUserSelectionMode();
56 } else {
57 galleryView.exit()
58@@ -224,7 +226,7 @@
59 }
60 }
61
62- state: galleryView.gridMode || main.contentExportMode ? "GRID" : "SLIDESHOW"
63+ state: galleryView.gridMode ? "GRID" : "SLIDESHOW"
64 states: [
65 State {
66 name: "SLIDESHOW"
67
68=== modified file 'GalleryViewHeader.qml'
69--- GalleryViewHeader.qml 2014-12-09 10:52:01 +0000
70+++ GalleryViewHeader.qml 2015-02-12 19:25:49 +0000
71@@ -75,7 +75,7 @@
72 }
73
74 Label {
75- text: userSelectionMode ? i18n.tr("Select") :
76+ text: main.contentExportMode || userSelectionMode ? i18n.tr("Select") :
77 (editMode ? i18n.tr("Edit Photo") : i18n.tr("Photo Roll"))
78 fontSize: "x-large"
79 color: Theme.palette.normal.foregroundText
80@@ -106,13 +106,24 @@
81 }
82
83 IconButton {
84+ objectName: "singleActionButton"
85+ anchors {
86+ top: parent.top
87+ bottom: parent.bottom
88+ }
89+ action: actionsDrawer.actions[0]
90+ visible: actionsDrawer.actions.length == 1 && !editMode
91+ onTriggered: if (action) action.triggered()
92+ }
93+
94+ IconButton {
95 objectName: "additionalActionsButton"
96 anchors {
97 top: parent.top
98 bottom: parent.bottom
99 }
100 iconName: "contextual-menu"
101- visible: actionsDrawer.actions.length > 0 && !editMode
102+ visible: actionsDrawer.actions.length > 1 && !editMode
103 onClicked: actionsDrawer.opened = !actionsDrawer.opened
104 }
105
106
107=== modified file 'SlideshowView.qml'
108--- SlideshowView.qml 2015-02-12 19:25:49 +0000
109+++ SlideshowView.qml 2015-02-12 19:25:49 +0000
110@@ -32,8 +32,20 @@
111 editor.active : false
112 property bool inView
113 property bool editingAvailable: false
114+ property bool inSelectionMode: false
115 signal toggleHeader
116- property list<Action> actions: [
117+ signal toggleSelection
118+ property var actions: inSelectionMode ? slideShowSelectionActions : slideShowActions
119+
120+ property list<Action> slideShowSelectionActions: [
121+ Action {
122+ text: i18n.tr("Select")
123+ iconName: listView.currentItem.isSelected ? "close" : "ok"
124+ onTriggered: slideshowView.toggleSelection()
125+ }
126+ ]
127+
128+ property list<Action> slideShowActions: [
129 Action {
130 text: i18n.tr("Share")
131 iconName: "share"
132@@ -61,9 +73,9 @@
133
134 editingAvailable = true;
135 var newActions = [];
136- for (var i = 0; i < actions.length; i++) newActions.push(actions[i]);
137+ for (var i = 0; i < slideShowActions.length; i++) newActions.push(slideShowActions[i]);
138 newActions.push(editAction);
139- actions = newActions;
140+ slideShowActions = newActions;
141 }
142
143 function showPhotoAtIndex(index) {
144@@ -123,6 +135,7 @@
145 id: delegate
146 property bool pinchInProgress: zoomPinchArea.active
147 property string url: fileURL
148+ property bool isSelected: selected
149
150 function zoomIn(centerX, centerY, factor) {
151 flickable.scaleCenterX = centerX / (flickable.sizeScale * flickable.width);

Subscribers

People subscribed via source and target branches