Merge lp:~doflah/gallery-app/reuse_delete_dialog into lp:gallery-app

Proposed by Dennis O'Flaherty
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~doflah/gallery-app/reuse_delete_dialog
Merge into: lp:gallery-app
Diff against target: 103 lines (+6/-45)
3 files modified
rc/qml/MediaViewer/MediaViewer.qml (+4/-21)
tests/autopilot/gallery_app/emulators/photo_viewer.py (+0/-22)
tests/autopilot/gallery_app/tests/test_photo_viewer.py (+2/-2)
To merge this branch: bzr merge lp:~doflah/gallery-app/reuse_delete_dialog
Reviewer Review Type Date Requested Status
Arthur Mello (community) Needs Fixing
Review via email: mp+218541@code.launchpad.net

Description of the change

One of the delete dialogs didn't have the correct color scheme. This patch fixes it: ok -> orange, cancel -> gray.

To post a comment you must log in.
Revision history for this message
Arthur Mello (artmello) wrote :

We now have two delete dialog options, the old one changed by this MR and a new one, for when the photo is inside an album. Would be good to update both of them to have this feature.

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue is resolved, rejecting the change it's not needed

Unmerged revisions

955. By Dennis O'Flaherty

Use the DeleteDialog in the PhotoViewer for consistency

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'rc/qml/MediaViewer/MediaViewer.qml'
--- rc/qml/MediaViewer/MediaViewer.qml 2014-04-23 14:24:04 +0000
+++ rc/qml/MediaViewer/MediaViewer.qml 2014-05-07 02:45:34 +0000
@@ -280,34 +280,17 @@
280280
281 Component {281 Component {
282 id: deleteDialog282 id: deleteDialog
283 Dialog {283 DeleteDialog {
284 id: dialogue
285 objectName: "deletePhotoDialog"
286 title: i18n.tr("Delete a photo")284 title: i18n.tr("Delete a photo")
287285
288 function finishRemove() {286 onDeleteClicked: {
287 viewerWrapper.model.destroyMedia(galleryPhotoViewer.media, true);
288 galleryPhotoViewer.currentIndexChanged();
289 if (!album === undefined)289 if (!album === undefined)
290 return;290 return;
291 if (model.count === 0)291 if (model.count === 0)
292 galleryPhotoViewer.closeRequested();292 galleryPhotoViewer.closeRequested();
293 }293 }
294
295 Button {
296 objectName: "deletePhotoDialogYes"
297 text: i18n.tr("Yes")
298 color: Gallery.HIGHLIGHT_BUTTON_COLOR
299 onClicked: {
300 PopupUtils.close(dialogue)
301 viewerWrapper.model.destroyMedia(galleryPhotoViewer.media, true);
302 galleryPhotoViewer.currentIndexChanged();
303 dialogue.finishRemove();
304 }
305 }
306 Button {
307 objectName: "deletePhotoDialogNo"
308 text: i18n.tr("No")
309 onClicked: PopupUtils.close(dialogue)
310 }
311 }294 }
312 }295 }
313296
314297
=== modified file 'tests/autopilot/gallery_app/emulators/photo_viewer.py'
--- tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-05-01 15:27:13 +0000
+++ tests/autopilot/gallery_app/emulators/photo_viewer.py 2014-05-07 02:45:34 +0000
@@ -14,16 +14,6 @@
14 super(PhotoViewer, self).__init__(self)14 super(PhotoViewer, self).__init__(self)
15 self.app = app15 self.app = app
1616
17 def get_delete_dialog(self):
18 """Returns the photo viewer delete dialog."""
19 return self.app.wait_select_single("Dialog",
20 objectName="deletePhotoDialog")
21
22 def delete_dialog_shown(self):
23 dialog = self.app.select_many("Dialog",
24 objectName="deletePhotoDialog")
25 return len(dialog) >= 1
26
27 def get_popup_album_picker(self):17 def get_popup_album_picker(self):
28 """Returns the photo viewer album pickers."""18 """Returns the photo viewer album pickers."""
29 return self.app.wait_select_single("PopupAlbumPicker",19 return self.app.wait_select_single("PopupAlbumPicker",
@@ -75,18 +65,6 @@
75 """Returns the 'auto enhance' menu item in the edit dialog."""65 """Returns the 'auto enhance' menu item in the edit dialog."""
76 return self.app.select_single("Standard", objectName='enhanceListItem')66 return self.app.select_single("Standard", objectName='enhanceListItem')
7767
78 def get_delete_popover_delete_item(self):
79 """Returns the delete button of the delete popover."""
80 return self.app.select_single("Button",
81 objectName="deletePhotoDialogYes",
82 visible=True)
83
84 def get_delete_popover_cancel_item(self):
85 """Returns the cancel button of the delete popover."""
86 return self.app.select_single("Button",
87 objectName="deletePhotoDialogNo",
88 visible=True)
89
90 def get_opened_photo(self):68 def get_opened_photo(self):
91 """Returns the first opened photo."""69 """Returns the first opened photo."""
92 return self.app.wait_select_single("ZoomablePhotoComponent",70 return self.app.wait_select_single("ZoomablePhotoComponent",
9371
=== modified file 'tests/autopilot/gallery_app/tests/test_photo_viewer.py'
--- tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-05-01 15:27:13 +0000
+++ tests/autopilot/gallery_app/tests/test_photo_viewer.py 2014-05-07 02:45:34 +0000
@@ -112,7 +112,7 @@
112 def delete_one_picture(self):112 def delete_one_picture(self):
113 self.main_view.open_toolbar().click_button("deleteButton")113 self.main_view.open_toolbar().click_button("deleteButton")
114 self.get_delete_dialog()114 self.get_delete_dialog()
115 delete_item = self.photo_viewer.get_delete_popover_delete_item()115 delete_item = self.gallery_utils.get_delete_dialog_delete_button()
116 self.click_item(delete_item)116 self.click_item(delete_item)
117 self.ensure_closed_delete_dialog()117 self.ensure_closed_delete_dialog()
118118
@@ -123,7 +123,7 @@
123123
124 photo_viewer = self.photo_viewer.get_main_photo_viewer()124 photo_viewer = self.photo_viewer.get_main_photo_viewer()
125125
126 cancel_item = self.photo_viewer.get_delete_popover_cancel_item()126 cancel_item = self.photo_viewer.get_delete_dialog_cancel_button()
127 self.click_item(cancel_item)127 self.click_item(cancel_item)
128 self.ensure_closed_delete_dialog()128 self.ensure_closed_delete_dialog()
129129

Subscribers

People subscribed via source and target branches