mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Ticket #2520: SIGINT generated by Ctrl-g pressing closes file panels.
When SIGINT signal is raised, the CK_Cancel message is handled by dlg_execute_cmd() and midnight_dlg is closed. The solution: CK_Cancel is sent to current dialog via callback, and if current dialog doesn't handle CK_Cancel message, then handle it with common way using dlg_execute_cmd(). Since Ctrl-g is used to generate SIGINT in MC, remove this shortcut from all sections of keymaps except the [dialog] section. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
e1c933e1cb
commit
f83bdadfa8
@ -1067,7 +1067,6 @@ init_dlg (Dlg_head * h)
|
||||
if ((top_dlg != NULL) && ((Dlg_head *) top_dlg->data)->modal)
|
||||
h->modal = TRUE;
|
||||
|
||||
|
||||
/* add dialog to the stack */
|
||||
top_dlg = g_list_prepend (top_dlg, h);
|
||||
|
||||
@ -1104,6 +1103,7 @@ dlg_process_event (Dlg_head * h, int key, Gpm_Event * event)
|
||||
if (key == EV_NONE)
|
||||
{
|
||||
if (tty_got_interrupt ())
|
||||
if (h->callback (h, NULL, DLG_ACTION, CK_Cancel, NULL) != MSG_HANDLED)
|
||||
dlg_execute_cmd (h, CK_Cancel);
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user