diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:00 +0200 |
commit | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch) | |
tree | 18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/wlib/gtklib/help.c | |
parent | 359b557176b9bb2ff1aed2082641eed39c358d0d (diff) |
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'app/wlib/gtklib/help.c')
-rw-r--r-- | app/wlib/gtklib/help.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/wlib/gtklib/help.c b/app/wlib/gtklib/help.c index dbb69f6..8f2766d 100644 --- a/app/wlib/gtklib/help.c +++ b/app/wlib/gtklib/help.c @@ -28,9 +28,12 @@ #include <gtk/gtk.h> #include <gdk/gdk.h> +#include "misc.h" + #include "gtkint.h" #include "i18n.h" + /** * Handle the commands issued from the Help drop-down. Currently, we only have a table * of contents, but search etc. might be added in the future. @@ -44,11 +47,19 @@ DoHelpMenu(void *data) { int func = (intptr_t)data; + const char * topic; + switch (func) { case 1: wHelp("index"); break; + case 3: + topic = GetCurCommandName(); + if (topic && topic[0]) + wHelp(topic); + break; + default: break; } @@ -56,6 +67,10 @@ DoHelpMenu(void *data) return; } +void wDoAccelHelp(wAccelKey_e key, void * context) { + DoHelpMenu(context); +} + /** * Add the entries for Help to the drop-down. * @@ -66,4 +81,5 @@ DoHelpMenu(void *data) void wMenuAddHelp(wMenu_p m) { wMenuPushCreate(m, NULL, _("&Contents"), 0, DoHelpMenu, (void*)1); + wMenuPushCreate(m, NULL, _("Co&mmand Context help"), 0, DoHelpMenu, (void*)3); } |