summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorJeremy Bícha <jeremy.bicha@canonical.com>2023-08-10 14:14:35 -0400
committerJeremy Bícha <jeremy.bicha@canonical.com>2023-08-10 14:14:35 -0400
commitf8597587629cea96a21fcd058323799f44f3b3e5 (patch)
treef4d7cf09db438c8296b846e62c2cb623ddbf098d /src/util.c
parentRelease to unstable (diff)
parentNew upstream version 3.44.2 (diff)
downloadzenity-f8597587629cea96a21fcd058323799f44f3b3e5.tar.gz
zenity-f8597587629cea96a21fcd058323799f44f3b3e5.tar.bz2
zenity-f8597587629cea96a21fcd058323799f44f3b3e5.zip
Update upstream source from tag 'upstream/3.44.2'
Update to upstream version '3.44.2' with Debian dir 441cbc815fbb0ab86203cb218004e9d8ba6708f5
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 2887fd96..a242526a 100644
--- a/src/util.c
+++ b/src/util.c
@@ -49,6 +49,14 @@
#define ZENITY_ERROR_DEFAULT -1
#define ZENITY_EXTRA_DEFAULT 127
+/* This exit code number is arbitrary, but since for the entire 3.x release
+ * cycle, zenity would essentially exit(ZENITY_TIMEOUT), which happened to be
+ * defined as 5 based on where it was placed in the enum sequence. So
+ * hardcoding it as 5 now in case any pre-existing scripts relied upon that
+ * being the exit status for timeouts.
+ */
+#define ZENITY_TIMEOUT_DEFAULT 5
+
GtkBuilder *
zenity_util_load_ui_file (const gchar *root_widget, ...) {
va_list args;
@@ -298,7 +306,7 @@ zenity_util_return_exit_code (ZenityExitCode value) {
if (!env_var)
env_var = g_getenv ("DIALOG_TIMEOUT");
if (!env_var)
- retval = ZENITY_TIMEOUT;
+ retval = ZENITY_TIMEOUT_DEFAULT;
break;
default:
@@ -412,7 +420,7 @@ zenity_util_timeout_handle (gpointer data) {
gtk_dialog_response (dialog, ZENITY_TIMEOUT);
else {
gtk_main_quit ();
- exit (ZENITY_TIMEOUT);
+ exit (ZENITY_TIMEOUT_DEFAULT);
}
return FALSE;
}
bgstack15