zenity --question --timeout returns 5 when click yes

Bug #1034594 reported by David Biesack
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
zenity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The man page says:

"For example, zenity --question will return either 0, 1 or 5, depending on whether the user pressed OK, Cancel or timeout has been reached. zenity --entry will output on standard output what the user typed into the text entry field."

however, for the following

$ zenity --question --title="Title" --text="Click yes" --timeout=6
$ echo $?
5

one can see that zenity returns 5 instead of 0 if you click the Yes (OK) button.

Without --timeout, zenity returns 0 when you click Yes.

The man page also is incorrect because the buttons are labeled No and Yes (in that order, left to right),
not OK or Cancel.

Also, pressing ESC is typically equivalent to canceling a dialog, but in the latter case, zenity returns 0
(as if I had selected Yes) instead of 0 (No/Cancel)

See also http://<email address hidden>/msg1048592.html

Revision history for this message
Stefan Du Rietz (sdr) wrote :

I also get 5 when choosing OK, but (correctly) get 1 when pressing ESC or canceling with Xubuntu 12.04. In earlier Xubuntu versions it was correct.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zenity (Ubuntu):
status: New → Confirmed
Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

I also see this bug (5 when clicking "Yes"), and my buttons are also labelled "Yes" and "No". However, in my case, they are in that order.

Also, pressing "ESC" returns 1 as does clicking "No". (I think there's a typo in the original report, as 1 should be No/Cancel.)

(The link in the report contains a patch, so hopefully it'll be quite simple to fix.)

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

Oh, and for me, it's zenity 3.4.0-2

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

This bug makes Zenity fairly unusable for me. As an alternative, in the meantime, one could also try yad.
http://ubuntuforums.org/showthread.php?t=2081964

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.