See the man pages:
"... and return (either in the return code, or on standard output) the users 
input."

The answer to "--question" is returned in the return code, not in
standard output.


user@ubuntu:~$ zenity --question --title="Answer the question." --text="Yes or 
No?" # answering yes
user@ubuntu:~$ echo $?
0
user@ubuntu:~$ zenity --question --title="Answer the question." --text="Yes or 
No?" # answering no
user@ubuntu:~$ echo $?
1


** Changed in: zenity (Ubuntu)
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to zenity in Ubuntu.
https://bugs.launchpad.net/bugs/2035114

Title:
  zenity 3.24.1 --question argument does not return a value in ubuntu
  22.04

Status in zenity package in Ubuntu:
  Invalid

Bug description:
  '--question' attribute in zenity is not returning a value after the user 
interacts with the message box.  It should be returning a 0, 1, or 5 depending 
on what the user selects.  Other forms that zenity produces do return the 
appropriate values.
  tom@BossUbuntui9:~$ zenity --version
  3.42.1
  tom@BossUbuntui9:~$ zenity --calendar
  09/12/2024
  tom@BossUbuntui9:~$ zenity --question --title="Answer the question." 
--text="Yes or No?"
  tom@BossUbuntui9:~$
  This is a paste from my terminal.  As you can see the --version and 
--calendar arguments return the appropriate values.  When I use the --question 
argument, it does not matter whether I press yes or no, I get nothing.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zenity/+bug/2035114/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to