diff options
author | Bastien Nocera <hadess@hadess.net> | 2015-12-04 11:44:57 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2015-12-04 11:44:57 +0100 |
commit | fee6b4ce9e03a7060541c727553e1097219ac5c5 (patch) | |
tree | 3d2a46810da50d4ae0a809ca92de9a6efc178e39 | |
parent | b1422dbce534723caf660d08c44781893b2961f1 (diff) | |
download | totem-fee6b4ce9e03a7060541c727553e1097219ac5c5.tar.gz |
main: Add Ctrl+W shortcut to exit
https://bugzilla.gnome.org/show_bug.cgi?id=750339
-rw-r--r-- | data/shortcuts.ui | 2 | ||||
-rw-r--r-- | src/totem-object.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/data/shortcuts.ui b/data/shortcuts.ui index 094dc2a77..a138b6f5f 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 <ctrl>q</property> + <property name="accelerator">Q <ctrl>q <ctrl>w</property> <property name="title" translatable="yes">Quit</property> </object> </child> diff --git a/src/totem-object.c b/src/totem-object.c index eb8cc7c85..f41962058 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: |