From c45a27061b21448af28be7f5d32e88853836d27f Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 29 Oct 2012 16:38:28 +0400 Subject: [PATCH] (exit_subshell): return gboolean instead of int. Signed-off-by: Andrew Borodin --- src/filemanager/midnight.c | 2 +- src/subshell.c | 10 +++++----- src/subshell.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c index a24b79d62..9c0184a52 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -1054,7 +1054,7 @@ quit_cmd_internal (int quiet) #ifdef ENABLE_SUBSHELL if (!mc_global.tty.use_subshell) stop_dialogs (); - else if ((q = exit_subshell ())) + else if ((q = exit_subshell () ? 1 : 0) != 0) #endif stop_dialogs (); } diff --git a/src/subshell.c b/src/subshell.c index b557ded5b..515db44c7 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -1050,16 +1050,16 @@ do_update_prompt (void) /* --------------------------------------------------------------------------------------------- */ -int +gboolean exit_subshell (void) { - int subshell_quit = TRUE; + gboolean subshell_quit = TRUE; if (subshell_state != INACTIVE && subshell_alive) subshell_quit = - !query_dialog (_("Warning"), - _("The shell is still active. Quit anyway?"), - D_NORMAL, 2, _("&Yes"), _("&No")); + query_dialog (_("Warning"), + _("The shell is still active. Quit anyway?"), + D_NORMAL, 2, _("&Yes"), _("&No")) == 0; if (subshell_quit) { diff --git a/src/subshell.h b/src/subshell.h index fd53a42dd..b76708bf1 100644 --- a/src/subshell.h +++ b/src/subshell.h @@ -42,7 +42,7 @@ void init_subshell (void); int invoke_subshell (const char *command, int how, vfs_path_t ** new_dir); int read_subshell_prompt (void); void do_update_prompt (void); -int exit_subshell (void); +gboolean exit_subshell (void); void do_subshell_chdir (const vfs_path_t * vpath, gboolean update_prompt, gboolean reset_prompt); void subshell_get_console_attributes (void); void sigchld_handler (int sig); -- 2.11.4.GIT