diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-09-23 09:36:56 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-09-23 09:36:56 +0200 |
commit | 8004f1a7ad3cc6a3659517f3374bdf1b63416b24 (patch) | |
tree | b7b82cc6e01cd47d22f660e25508a7d8d555dc89 /src/PhotoPage.vala | |
parent | 28c68a75acac7ac3ce7fb169bc6aa65e16551c53 (diff) | |
parent | 566dc060676b41e1e58a446b7dcc4159e242fee6 (diff) |
Merge tag 'upstream/0.20.0'
Upstream version 0.20.0
Diffstat (limited to 'src/PhotoPage.vala')
-rw-r--r-- | src/PhotoPage.vala | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/PhotoPage.vala b/src/PhotoPage.vala index d74d004..8db84a1 100644 --- a/src/PhotoPage.vala +++ b/src/PhotoPage.vala @@ -1358,7 +1358,7 @@ public abstract class EditingHostPage : SinglePhotoPage { protected override bool on_shift_pressed(Gdk.EventKey? event) { // show quick compare of original only if no tool is in use, the original pixbuf is handy - if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed()) + if (current_tool == null && !get_ctrl_pressed() && !get_alt_pressed() && has_photo()) swap_in_original(); return base.on_shift_pressed(event); @@ -1386,13 +1386,13 @@ public abstract class EditingHostPage : SinglePhotoPage { } private void swap_in_original() { - Gdk.Pixbuf? original; - - original = - get_photo().get_original_orientation().rotate_pixbuf(get_photo().get_prefetched_copy()); - - if (original == null) + Gdk.Pixbuf original; + try { + original = get_photo().get_original_orientation().rotate_pixbuf( + get_photo().get_prefetched_copy()); + } catch (Error err) { return; + } // store what's currently displayed only for the duration of the shift pressing swapped = get_unscaled_pixbuf(); @@ -1999,8 +1999,15 @@ public abstract class EditingHostPage : SinglePhotoPage { } public void on_set_background() { - if (has_photo()) - DesktopIntegration.set_background(get_photo()); + if (has_photo()) { + SetBackgroundPhotoDialog dialog = new SetBackgroundPhotoDialog(); + bool desktop, screensaver; + if (dialog.execute(out desktop, out screensaver)) { + AppWindow.get_instance().set_busy_cursor(); + DesktopIntegration.set_background(get_photo(), desktop, screensaver); + AppWindow.get_instance().set_normal_cursor(); + } + } } protected override bool on_ctrl_pressed(Gdk.EventKey? event) { @@ -3137,6 +3144,9 @@ public class LibraryPhotoPage : EditingHostPage { // move on to the next one in the collection on_next_photo(); + + ViewCollection view = get_view(); + view.remove_marked(view.mark(view.get_view_for_source(photo))); if (photo.equals(get_photo())) { // this indicates there is only one photo in the controller, or now zero, so switch // to the Photos page, which is guaranteed to be there |