(dlg_execute_cmd): move CK_Help handler to separate function dlg_help().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-12-09 17:25:48 +03:00
parent 57342e54f4
commit 20dd30ada3

View File

@ -122,6 +122,16 @@ refresh_cmd (void)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
static void
dlg_help (const WDialog * h)
{
ev_help_t event_data = { NULL, h->help_ctx };
mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data);
}
/* --------------------------------------------------------------------------------------------- */
static cb_ret_t static cb_ret_t
dlg_execute_cmd (WDialog * h, long command) dlg_execute_cmd (WDialog * h, long command)
{ {
@ -152,10 +162,7 @@ dlg_execute_cmd (WDialog * h, long command)
break; break;
case CK_Help: case CK_Help:
{ dlg_help (h);
ev_help_t event_data = { NULL, h->help_ctx };
mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data);
}
break; break;
case CK_Suspend: case CK_Suspend: