[totem/wip/hadess/remove-app-menu: 1/2] main: Remove Quit app menu item
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/remove-app-menu: 1/2] main: Remove Quit app menu item
- Date: Mon, 4 Feb 2019 11:37:40 +0000 (UTC)
commit d6f00327f16bf08fe4beeaef10616c8affd84697
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 31 16:46:52 2019 +0100
main: Remove Quit app menu item
See https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
data/totem.ui | 5 -----
src/totem-object.c | 8 ++++++++
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index 24042f4f5..f63dcc533 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -22,11 +22,6 @@
<attribute name="action">app.help</attribute>
<attribute name="accel">F1</attribute>
</item>
- <item>
- <attribute name="label" translatable="yes">_Quit</attribute>
- <attribute name="action">app.quit</attribute>
- <attribute name="accel"><Ctrl>Q</attribute>
- </item>
</section>
</menu>
diff --git a/src/totem-object.c b/src/totem-object.c
index e9de92de1..b475dc026 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3491,6 +3491,14 @@ window_key_press_event_cb (GtkWidget *win, GdkEventKey *event, TotemObject *tote
if (totem->disable_kbd_shortcuts != FALSE)
return FALSE;
+ /* Handle Quit */
+ if (event->state & GDK_CONTROL_MASK &&
+ event->type == GDK_KEY_PRESS &&
+ (event->keyval == GDK_KEY_Q ||
+ event->keyval == GDK_KEY_q)) {
+ return totem_object_handle_key_press (totem, event);
+ }
+
/* Check whether we're in the player panel */
if (!g_str_equal (totem_object_get_main_page (totem), "player"))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]