[totem] main: Add more shortcuts for the shortcuts help window



commit 3ffced798efcc5724f42189eca8468f05639938d
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 21 15:04:14 2016 +0100

    main: Add more shortcuts for the shortcuts help window

 data/totem.ui    |    1 -
 src/totem-menu.c |    7 +++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index 08160ff..1c2afe4 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -16,7 +16,6 @@
                <item>
                        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
                        <attribute name="action">app.shortcuts</attribute>
-                       <attribute name="accel">&lt;Ctrl&gt;H</attribute>
                </item>
                <item>
                        <attribute name="label" translatable="yes">_Help</attribute>
diff --git a/src/totem-menu.c b/src/totem-menu.c
index dbb8e60..7a1c43f 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -343,6 +343,12 @@ totem_app_menu_setup (Totem *totem)
 {
        GMenuModel *appmenu;
        char *accels[] = { NULL, NULL };
+       const char const *shortcuts_accels[] = {
+               "<Ctrl>H",
+               "<Ctrl>question",
+               "<Ctrl>F1",
+               NULL
+       };
 
        appmenu = (GMenuModel *)gtk_builder_get_object (totem->xml, "appmenu");
        gtk_application_set_app_menu (GTK_APPLICATION (totem), appmenu);
@@ -354,6 +360,7 @@ totem_app_menu_setup (Totem *totem)
        gtk_application_set_accels_for_action (GTK_APPLICATION (totem), "app.root-menu", (const char * const 
*) accels);
        accels[0] = "<Primary>E";
        gtk_application_set_accels_for_action (GTK_APPLICATION (totem), "app.eject", (const char * const *) 
accels);
+       gtk_application_set_accels_for_action (GTK_APPLICATION (totem), "app.shortcuts", shortcuts_accels);
        gtk_window_set_application (GTK_WINDOW (totem->win), GTK_APPLICATION (totem));
 }
 


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