[totem] main: Add Ctrl+W shortcut to exit



commit fee6b4ce9e03a7060541c727553e1097219ac5c5
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Dec 4 11:44:57 2015 +0100

    main: Add Ctrl+W shortcut to exit
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750339

 data/shortcuts.ui  |    2 +-
 src/totem-object.c |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/data/shortcuts.ui b/data/shortcuts.ui
index 094dc2a..a138b6f 100644
--- a/data/shortcuts.ui
+++ b/data/shortcuts.ui
@@ -24,7 +24,7 @@
             <child>
               <object class="GtkShortcutsShortcut" id="quit">
                 <property name="visible">1</property>
-                <property name="accelerator">Q &lt;ctrl&gt;q</property>
+                <property name="accelerator">Q &lt;ctrl&gt;q &lt;ctrl&gt;w</property>
                 <property name="title" translatable="yes">Quit</property>
               </object>
             </child>
diff --git a/src/totem-object.c b/src/totem-object.c
index eb8cc7c..f419620 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3322,6 +3322,13 @@ totem_object_handle_key_press (TotemObject *totem, GdkEventKey *event)
        case GDK_KEY_AudioStop:
                totem_object_pause (totem);
                break;
+       case GDK_KEY_w:
+       case GDK_KEY_W:
+               if (mask == GDK_CONTROL_MASK)
+                       totem_object_exit (totem);
+               else
+                       retval = FALSE;
+               break;
        case GDK_KEY_q:
        case GDK_KEY_Q:
                totem_object_exit (totem);
@@ -3541,6 +3548,8 @@ window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, TotemObject *tote
                case GDK_KEY_l:
                case GDK_KEY_q:
                case GDK_KEY_Q:
+               case GDK_KEY_w:
+               case GDK_KEY_W:
                case GDK_KEY_Right:
                case GDK_KEY_Left:
                case GDK_KEY_plus:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]