Merge lp:~schwann/gallery-app/gallery-delete-album into lp:gallery-app

Proposed by Günter Schwann
Status: Merged
Approved by: Günter Schwann
Approved revision: 840
Merged at revision: 841
Proposed branch: lp:~schwann/gallery-app/gallery-delete-album
Merge into: lp:gallery-app
Diff against target: 75 lines (+18/-6)
2 files modified
rc/qml/AlbumViewer/AlbumViewer.qml (+11/-6)
rc/qml/AlbumViewer/AlbumViewerAnimated.qml (+7/-0)
To merge this branch: bzr merge lp:~schwann/gallery-app/gallery-delete-album
Reviewer Review Type Date Requested Status
Thomas Moenicke (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+186309@code.launchpad.net

Commit message

Enable delete in album view (close view without animation) fixes LP: #1163437

Description of the change

Enable delete in album view (close view without animation) fixes LP: #1163437

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomas Moenicke (thomas-moenicke) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/AlbumViewer/AlbumViewer.qml'
2--- rc/qml/AlbumViewer/AlbumViewer.qml 2013-08-16 12:55:55 +0000
3+++ rc/qml/AlbumViewer/AlbumViewer.qml 2013-09-18 12:48:12 +0000
4@@ -54,6 +54,8 @@
5
6 // When the user clicks the back button or pages back to the cover.
7 signal closeRequested(bool stayOpen, int viewingPage)
8+ // When the user clicks the back button or pages back to the cover.
9+ signal quickCloseRequested()
10
11 Image {
12 anchors.fill: parent
13@@ -74,6 +76,11 @@
14 closeRequested(album.containedCount > 0, albumSpreadViewer.viewingPage)
15 }
16
17+ /// Closes the view without animation or storing anything
18+ function __quickClose() {
19+ quickCloseRequested()
20+ }
21+
22 FadeOutAnimation {
23 id: fadeOutAnimation
24
25@@ -374,12 +381,10 @@
26 id: albumTrashDialog
27 visible: false
28 onDeleteClicked: {
29- // FIXME do not show the close animation
30- __close()
31+ __quickClose();
32 }
33 onDeleteWithContentsClicked: {
34- // FIXME do not show the close animation
35- __close()
36+ __quickClose();
37 }
38 }
39
40@@ -397,15 +402,15 @@
41 text: i18n.tr("Add") // text in toolbar
42 }
43 ToolbarButton {
44+ id: deleteButton
45 objectName: "deleteButton"
46 text: i18n.tr("Delete")
47 iconSource: Qt.resolvedUrl("../../img/delete.png")
48 onTriggered: {
49 albumTrashDialog.album = album
50- albumTrashDialog.caller = caller
51+ albumTrashDialog.caller = deleteButton
52 albumTrashDialog.show()
53 }
54- enabled: false // FIXME enable once the close animation is not shown anymore
55 }
56 back: ToolbarButton {
57 text: i18n.tr("Back")
58
59=== modified file 'rc/qml/AlbumViewer/AlbumViewerAnimated.qml'
60--- rc/qml/AlbumViewer/AlbumViewerAnimated.qml 2013-06-20 11:54:49 +0000
61+++ rc/qml/AlbumViewer/AlbumViewerAnimated.qml 2013-09-18 12:48:12 +0000
62@@ -87,6 +87,13 @@
63 inner_albumViewer.visible = false
64 isOpen = false
65 }
66+ onQuickCloseRequested: {
67+ inner_albumViewer.visible = false
68+ isOpen = false
69+ if (previewItem)
70+ previewItem.visible = true;
71+ loader_albumViewer.unload();
72+ }
73 }
74
75 AlbumViewerTransition {

Subscribers

People subscribed via source and target branches