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
1=== modified file 'GalleryViewHeader.qml'
2--- GalleryViewHeader.qml 2015-02-12 18:42:49 +0000
3+++ GalleryViewHeader.qml 2015-07-03 12:36:05 +0000
4@@ -138,28 +138,13 @@
5 visible: header.validationVisible
6 }
7
8- IconButton {
9- id: undoButton
10- objectName: "undoButton"
11- anchors {
12- top: parent.top
13- bottom: parent.bottom
14- }
15- visible: header.editMode
16- action: editModeActions.length > 0 ? editModeActions[0] : null
17- onTriggered: if (action) action.triggered()
18- }
19-
20- IconButton {
21- id: redoButton
22- objectName: "redoButton"
23- anchors {
24- top: parent.top
25- bottom: parent.bottom
26- }
27- visible: header.editMode
28- action: editModeActions.length > 1 ? editModeActions[1] : null
29- onTriggered: if (action) action.triggered()
30+ Repeater {
31+ model: header.editMode ? header.editModeActions : null
32+ IconButton {
33+ Layout.fillHeight: true
34+ visible: header.editMode
35+ action: modelData
36+ }
37 }
38 }
39
40
41=== modified file 'tests/autopilot/camera_app/tests/test_photo_editor.py'
42--- tests/autopilot/camera_app/tests/test_photo_editor.py 2015-03-11 09:25:36 +0000
43+++ tests/autopilot/camera_app/tests/test_photo_editor.py 2015-07-03 12:36:05 +0000
44@@ -62,14 +62,6 @@
45 editor = gallery.wait_select_single(objectName="photoEditor")
46 self.assertThat(editor.visible, Eventually(Equals(True)))
47
48- undo = gallery.wait_select_single(objectName="undoButton")
49- self.assertThat(undo.visible, Eventually(Equals(True)))
50- self.assertThat(undo.enabled, Eventually(Equals(False)))
51-
52- redo = gallery.wait_select_single(objectName="redoButton")
53- self.assertThat(redo.visible, Eventually(Equals(True)))
54- self.assertThat(redo.enabled, Eventually(Equals(False)))
55-
56 back = gallery.wait_select_single(objectName="backButton")
57 self.pointing_device.move_to_object(back)
58 self.pointing_device.click()

Subscribers

People subscribed via source and target branches