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 698683 - Double clicking an item or hitting enter after selecting an item returns it twice ("option|option") while clicking OK returns it once ("option")
Double clicking an item or hitting enter after selecting an item returns it t...
Status: RESOLVED FIXED
Product: zenity
Classification: Core
Component: general
3.8.x
Other Linux
: Normal critical
: ---
Assigned To: Zenity Maintainers
Zenity Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-23 17:44 UTC by tritonas00
Modified: 2013-05-23 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description tritonas00 2013-04-23 17:44:38 UTC
A little example:

#!/bin/bash

title="Server Options"
prompt="Pick an option:"
options=("option 1" "option 2" "option 3")

while opt=$(zenity --width 500 --height 300 --title="$title" --text="$prompt" --list --column="Options" "${options[@]}"); do

    case "$opt" in
      "${options[0]}" ) zenity --info --text "option 1";;
      "${options[1]}" ) zenity --info --text "option 2";;
      "${options[2]}" ) zenity --info --text "option 3";;  
    esac

done

Double click an option or click and hit enter does not execute: zenity --info --text "option X" , as it should.

Click an option and hit OK works as expected.
Comment 1 Colin Chan 2013-05-22 20:29:38 UTC
I'm seeing this bug as well. It's especially bad with the --multiple option, in which case only the first item of the selection is returned (twice) when you press enter.
Comment 2 Arx Cruz 2013-05-23 19:31:19 UTC
Fixed on master.