mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
(menubar_execute_cmd): move CK_Help handler to separate function menubar_help().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
20dd30ada3
commit
94daff9071
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user