[devhelp] shortcuts: add two shortcuts to the shortcuts window



commit 795dc1cf30e6bd09568bc989b3d1bf52641caa97
Author: Sébastien Wilmet <sw swilmet be>
Date:   Sun Jan 10 21:26:19 2021 +0100

    shortcuts: add two shortcuts to the shortcuts window

 src/dh-app.c    | 6 ++++--
 src/dh-window.c | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/dh-app.c b/src/dh-app.c
index 2a019d7f..6082e8c3 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -36,8 +36,10 @@ add_menu_action_infos (DhApp *app)
                 { "app.new-window", NULL, N_("New _Window"), "<Control>n",
                   N_("Open a new window") },
                 { "app.preferences", NULL, N_("_Preferences") },
-                { "win.shortcuts-window", NULL, N_("_Keyboard Shortcuts") },
-                { "app.help", NULL, N_("_Help"), "F1" },
+                { "win.shortcuts-window", NULL, N_("_Keyboard Shortcuts"), NULL,
+                  N_("Show keyboard shortcuts") },
+                { "app.help", NULL, N_("_Help"), "F1",
+                  N_("Show help") },
                 { "app.about", NULL, N_("_About Devhelp") },
                 { "app.quit", NULL, N_("_Quit"), "<Control>q",
                   N_("Close all windows (quit the application)") },
diff --git a/src/dh-window.c b/src/dh-window.c
index 8e800bb2..7e81e922 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -403,6 +403,11 @@ shortcuts_window_cb (GSimpleAction *action,
         gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.show-sidebar"));
         gtk_container_add (section, GTK_WIDGET (group));
 
+        group = amtk_shortcuts_group_new (_("General"));
+        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.help"));
+        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.shortcuts-window"));
+        gtk_container_add (section, GTK_WIDGET (group));
+
         g_object_unref (factory);
 
         gtk_container_add (GTK_CONTAINER (shortcuts_window), GTK_WIDGET (section));


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