[gnome-photos] main-window: Switch to overview with BackSpace
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] main-window: Switch to overview with BackSpace
- Date: Sat, 14 Jul 2012 21:19:12 +0000 (UTC)
commit 9401df18c66437cb2ac3db7a0ae207fb50a2a454
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Jul 14 17:56:38 2012 +0200
main-window: Switch to overview with BackSpace
Also make Escape switch back to overview only if we're fullscreen.
Original patch from Cosimo Cecchi for gnome-documents.
src/photos-main-window.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-main-window.c b/src/photos-main-window.c
index fbe504a..d94ead5 100644
--- a/src/photos-main-window.c
+++ b/src/photos-main-window.c
@@ -152,6 +152,9 @@ static gboolean
photos_main_window_handle_key_preview (PhotosMainWindow *self, GdkEventKey *event)
{
PhotosMainWindowPrivate *priv = self->priv;
+ gboolean fullscreen;
+
+ fullscreen = photos_mode_controller_get_fullscreen (priv->controller);
if (event->keyval == GDK_KEY_f)
{
@@ -159,7 +162,9 @@ photos_main_window_handle_key_preview (PhotosMainWindow *self, GdkEventKey *even
return TRUE;
}
- if (event->keyval == GDK_KEY_Escape || event->keyval == GDK_KEY_Back)
+ if ((fullscreen && event->keyval == GDK_KEY_Escape)
+ || event->keyval == GDK_KEY_BackSpace
+ || event->keyval == GDK_KEY_Back)
{
photos_mode_controller_set_window_mode (priv->controller, PHOTOS_WINDOW_MODE_OVERVIEW);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]