diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:11:51 +0000 |
commit | a6f3675fc4e21b3f899286b9a02005368d913f74 (patch) | |
tree | c9bfa92b223783ff03b8e941c3bb0d36c68d3b5e /lib/widget/menu.c | |
parent | Releasing progress-linux version 3:4.8.30-1~progress7.99u1. (diff) | |
download | mc-a6f3675fc4e21b3f899286b9a02005368d913f74.tar.xz mc-a6f3675fc4e21b3f899286b9a02005368d913f74.zip |
Merging upstream version 3:4.8.31.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/widget/menu.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/lib/widget/menu.c b/lib/widget/menu.c index 4a30c02..b27c4c3 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -1,7 +1,7 @@ /* Pulldown menu code - Copyright (C) 1994-2023 + Copyright (C) 1994-2024 Free Software Foundation, Inc. Written by: @@ -530,6 +530,24 @@ menubar_try_exec_menu (WMenuBar * menubar, int hotkey) /* --------------------------------------------------------------------------------------------- */ +static void +menubar_help (const WMenuBar * menubar) +{ + ev_help_t event_data; + + event_data.filename = NULL; + + if (menubar->is_dropped) + event_data.node = MENU (g_list_nth_data (menubar->menu, menubar->current))->help_node; + else + event_data.node = "[Menu Bar]"; + + mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); + menubar_draw (menubar); +} + +/* --------------------------------------------------------------------------------------------- */ + static cb_ret_t menubar_execute_cmd (WMenuBar * menubar, long command) { @@ -538,18 +556,7 @@ menubar_execute_cmd (WMenuBar * menubar, long command) switch (command) { case CK_Help: - { - ev_help_t event_data = { NULL, NULL }; - - if (menubar->is_dropped) - event_data.node = - MENU (g_list_nth_data (menubar->menu, menubar->current))->help_node; - else - event_data.node = "[Menu Bar]"; - - mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data); - menubar_draw (menubar); - } + menubar_help (menubar); break; case CK_Left: |