From 1ac1da63f8de626ce10d350be7b29744a743ec95 Mon Sep 17 00:00:00 2001 From: Arx Cruz Date: Tue, 5 Mar 2013 16:56:24 -0300 Subject: But #674881 - Timeout option overriding normal exit code --- src/util.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 1fb8e327..df7317a9 100644 --- a/src/util.c +++ b/src/util.c @@ -312,7 +312,7 @@ zenity_util_return_exit_code ( ZenityExitCode value ) if (! env_var) retval = ZENITY_TIMEOUT; break; - + default: retval = 1; } @@ -325,10 +325,6 @@ zenity_util_return_exit_code ( ZenityExitCode value ) void zenity_util_exit_code_with_data(ZenityExitCode value, ZenityData *zen_data) { - /* We assume it's being called with --timeout option and should return 5) */ - if(zen_data->timeout_delay > 0) - zen_data->exit_code = zenity_util_return_exit_code (ZENITY_TIMEOUT); - else zen_data->exit_code = zenity_util_return_exit_code (value); } @@ -432,7 +428,7 @@ zenity_util_timeout_handle (gpointer data) { GtkDialog *dialog = GTK_DIALOG(data); if(dialog != NULL) - gtk_dialog_response(dialog, GTK_RESPONSE_OK); + gtk_dialog_response(dialog, ZENITY_TIMEOUT); else { gtk_main_quit(); exit(ZENITY_TIMEOUT); -- cgit