1
1

* main.c (stop_dialogs): New function to stop all dialogs.

(quit_cmd_internal): Use stop_dialogs() instead of stopping
midnight_dlg only.  This fixes exit from the shell invoked from
the internal viewer or editor.
Этот коммит содержится в:
Pavel Roskin 2002-07-03 06:19:40 +00:00
родитель 90ae932bf6
Коммит bbbb6eb183
2 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -1,5 +1,10 @@
2002-07-03 Pavel Roskin <proski@gnu.org> 2002-07-03 Pavel Roskin <proski@gnu.org>
* main.c (stop_dialogs): New function to stop all dialogs.
(quit_cmd_internal): Use stop_dialogs() instead of stopping
midnight_dlg only. This fixes exit from the shell invoked from
the internal viewer or editor.
* cmd.c (view_other_cmd): Shut down extra select channels before * cmd.c (view_other_cmd): Shut down extra select channels before
switching to the shell. Restore them afterwards, but not if switching to the shell. Restore them afterwards, but not if
quit was requested. Skip more code on quit. quit was requested. Skip more code on quit.

Просмотреть файл

@ -761,6 +761,16 @@ change_panel (void)
dlg_one_down (midnight_dlg); dlg_one_down (midnight_dlg);
} }
/* Stop MC main dialog and the current dialog if it exists.
* Needed to provide fast exit from MC viewer or editor on shell exit */
static void stop_dialogs (void)
{
midnight_dlg->running = 0;
if (current_dlg) {
current_dlg->running = 0;
}
}
static int static int
quit_cmd_internal (int quiet) quit_cmd_internal (int quiet)
{ {
@ -777,11 +787,11 @@ quit_cmd_internal (int quiet)
if (q){ if (q){
#ifdef HAVE_SUBSHELL_SUPPORT #ifdef HAVE_SUBSHELL_SUPPORT
if (!use_subshell) if (!use_subshell)
midnight_dlg->running = 0; stop_dialogs ();
else else
if ((q = exit_subshell ())) if ((q = exit_subshell ()))
#endif #endif
midnight_dlg->running = 0; stop_dialogs ();
} }
if (q) if (q)
quit |= 1; quit |= 1;