GNOME Bugzilla – Bug 749832
--text-info Same return code for different results
Last modified: 2015-07-08 12:18:55 UTC
I this an error? Do: zenity --text-info --timeout=10 Press OK echo $? 0 zenity --text-info --timeout=10 Press Cancel echo $? 5 zenity --text-info --timeout=10 Wait for the timeout echo $? 5 From the manpage For example, zenity --question will return either 0, 1 or 5, depending on whether the user pressed OK, Cancel or timeout I expected a 1 in the second occurrence when Cancel is pressed and indeed a 5 when the timeout times out. If it is an error can it be fixed and if it is not an error can it be changed. That would be nice and more logical and usefull in my opinion. By the way --question results in 5 1 5 ( OK, Cancel or timeout ). Also a bug it seems to me. Thanks
Hello, Which version of zenity are you using? I tested on master and on 3.16.0 and works fine for me. If I press ok, it returns 0, cancel returns 1, timeout return 5
zenity --version 3.4.0 This is the default in Debian Wheezy Was there a bug in this version or is something else going on. I looked for a changelog but could not find it. Nor could I find a place to download version 3.16.0. Also not on https://wiki.gnome.org/Projects/Zenity
You can download the sources at ftp://ftp.gnome.org/pub/GNOME/sources/zenity/ Also, you must check with the debian maintainer to upgrade the version.
Indeed, you are right. Will do that. Thanks for the help.
Closing as obsolete.