After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749832 - --text-info Same return code for different results
--text-info Same return code for different results
Status: RESOLVED OBSOLETE
Product: zenity
Classification: Core
Component: general
3.4.x
Other Linux
: Normal major
: ---
Assigned To: Zenity Maintainers
Zenity Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-25 13:47 UTC by Zounp
Modified: 2015-07-08 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Zounp 2015-05-25 13:47:26 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
Comment 1 Arx Cruz 2015-05-29 09:03:46 UTC
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
Comment 2 Zounp 2015-06-29 18:30:06 UTC
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
Comment 3 Arx Cruz 2015-06-29 19:00:14 UTC
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.
Comment 4 Zounp 2015-07-06 10:56:22 UTC
Indeed, you are right. Will do that.
Thanks for the help.
Comment 5 Arx Cruz 2015-07-08 12:18:55 UTC
Closing as obsolete.