Merge lp:~fboucault/camera-app/dynamic_header_actions into lp:camera-app

Proposed by Florian Boucault
Status: Merged
Approved by: Ugo Riboni
Approved revision: 564
Merged at revision: 567
Proposed branch: lp:~fboucault/camera-app/dynamic_header_actions
Merge into: lp:camera-app
Diff against target: 58 lines (+7/-30)
2 files modified
GalleryViewHeader.qml (+7/-22)
tests/autopilot/camera_app/tests/test_photo_editor.py (+0/-8)
To merge this branch: bzr merge lp:~fboucault/camera-app/dynamic_header_actions
Reviewer Review Type Date Requested Status
Ugo Riboni (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+261533@code.launchpad.net

Commit message

Remove hardcoded actions in GalleryViewHeader to make it extensible.

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

Fixed warnings.

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

Looks good to me

review: Approve
565. By Florian Boucault

Adapted autopilot test camera_app.tests.test_photo_editor.TestCameraPhotoEditorWithPhoto.test_editor_appears

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'GalleryViewHeader.qml'
--- GalleryViewHeader.qml 2015-02-12 18:42:49 +0000
+++ GalleryViewHeader.qml 2015-07-03 12:36:05 +0000
@@ -138,28 +138,13 @@
138 visible: header.validationVisible138 visible: header.validationVisible
139 }139 }
140140
141 IconButton {141 Repeater {
142 id: undoButton142 model: header.editMode ? header.editModeActions : null
143 objectName: "undoButton"143 IconButton {
144 anchors {144 Layout.fillHeight: true
145 top: parent.top145 visible: header.editMode
146 bottom: parent.bottom146 action: modelData
147 }147 }
148 visible: header.editMode
149 action: editModeActions.length > 0 ? editModeActions[0] : null
150 onTriggered: if (action) action.triggered()
151 }
152
153 IconButton {
154 id: redoButton
155 objectName: "redoButton"
156 anchors {
157 top: parent.top
158 bottom: parent.bottom
159 }
160 visible: header.editMode
161 action: editModeActions.length > 1 ? editModeActions[1] : null
162 onTriggered: if (action) action.triggered()
163 }148 }
164 }149 }
165150
166151
=== modified file 'tests/autopilot/camera_app/tests/test_photo_editor.py'
--- tests/autopilot/camera_app/tests/test_photo_editor.py 2015-03-11 09:25:36 +0000
+++ tests/autopilot/camera_app/tests/test_photo_editor.py 2015-07-03 12:36:05 +0000
@@ -62,14 +62,6 @@
62 editor = gallery.wait_select_single(objectName="photoEditor")62 editor = gallery.wait_select_single(objectName="photoEditor")
63 self.assertThat(editor.visible, Eventually(Equals(True)))63 self.assertThat(editor.visible, Eventually(Equals(True)))
6464
65 undo = gallery.wait_select_single(objectName="undoButton")
66 self.assertThat(undo.visible, Eventually(Equals(True)))
67 self.assertThat(undo.enabled, Eventually(Equals(False)))
68
69 redo = gallery.wait_select_single(objectName="redoButton")
70 self.assertThat(redo.visible, Eventually(Equals(True)))
71 self.assertThat(redo.enabled, Eventually(Equals(False)))
72
73 back = gallery.wait_select_single(objectName="backButton")65 back = gallery.wait_select_single(objectName="backButton")
74 self.pointing_device.move_to_object(back)66 self.pointing_device.move_to_object(back)
75 self.pointing_device.click()67 self.pointing_device.click()

Subscribers

People subscribed via source and target branches