diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-08 11:53:12 +0200 |
commit | e50482f994b6ebcce864a412111d376e99205cdb (patch) | |
tree | ff3192c6aaf213c4922521bed988e4ed4147f537 /app/wlib/gtklib/help.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | b623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff) |
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1'
with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
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); } |