diff options
author | Logan Rathbone <poprocks@gmail.com> | 2023-02-04 07:51:04 -0500 |
---|---|---|
committer | Logan Rathbone <poprocks@gmail.com> | 2023-02-04 08:46:56 -0500 |
commit | bab82948507dacfff804e11e376b00d7a5e12f04 (patch) | |
tree | 267123dd38789d2f7552baad89370abc7ff4aecd /src/zenity.h | |
parent | Update Ukrainian translation (diff) | |
download | zenity-bab82948507dacfff804e11e376b00d7a5e12f04.tar.gz zenity-bab82948507dacfff804e11e376b00d7a5e12f04.tar.bz2 zenity-bab82948507dacfff804e11e376b00d7a5e12f04.zip |
Prevent ZENITY_TIMEOUT from clashing with custom response IDs
Redefine ZENITY_TIMEOUT response ID as INT_MAX
Also, add and use ZENITY_TIMEOUT_DEFAULT exit status (hardcoded to 5 to
keep consistent with what it has happened to be for the entire 3.x
release cycle; POLA and all).
See #48
Diffstat (limited to 'src/zenity.h')
-rw-r--r-- | src/zenity.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zenity.h b/src/zenity.h index 404eec77..c50a76bd 100644 --- a/src/zenity.h +++ b/src/zenity.h @@ -33,7 +33,14 @@ typedef enum { ZENITY_ESC, ZENITY_ERROR, ZENITY_EXTRA, - ZENITY_TIMEOUT + /* Previously, this was not specified to any value, which could cause it to + * clash with the custom response ID that happened to match it. We could set + * this to a negative value tha doesn't clash with one of GtkDialog's + * predefined response ID's as it's doubtful GTK will ever extend the GtkDialog + * API at this stage -- but technically negative values are reserved for the + * library and positive values for applications, according to gtkdialog.c + */ + ZENITY_TIMEOUT = INT_MAX } ZenityExitCode; typedef struct { |