http://qa.mandrakesoft.com/show_bug.cgi?id=4925

           Product: zenity
         Component: zenity
           Summary: Zenity emulation of gdialog is broken (at least for --
                    menu)
           Product: zenity
           Version: 1.5-1mdk
          Platform: PC
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: zenity
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Zenity's emulation of gdialog is bery broken, as I noticed with the
choose_cursor script (in cursor_themes in contrib), which works fine
with real gdialog (ie on 9.1), but doesn't work right with zenity's gdialog.

1)Zenity breaks up the first argument to --menu, so if you had a multi-word
title, all but the first word overflow, becomimg additional list entries.

2)Zenity removes the odd-numbered list entries when emulating --menu. This seems
to display correctly, but gdialog would return the odd-nunmbered entries, and
now zenity returns the even-numbered entries.

3)Zenity throws away the size information, and builds dialogs that are too small.

Here is an example you can test with:
$ gdialog --title "Fruit shop" --menu "Choose a fruit" 9 20 3 1 apple 2 pear 3
banana

You will notice the title on the first column is just "Choose", "a" and "fruit"
are the first two entries in the column. Also, only 2 rows are shown, when there
should be three (going on the 9 which cdialog uses). Click on pear (which should
return a 2 to the console), and it returns pear to the console.

If you apply the attached patch, all these issues are fixed, and choose_cursors
works like it did on 9.1 again, with working multi-word titles, well-sized menu
dialog, and returns the correct value, so scripts written for gdialog using 
--menu work right.

BTW, for reference, it is useful running cdialog (the original implementation,
which original gdialog emulates), which still works correctly in the console,
and will quickly show especially the sizing issues.

I guess this should be sent upstream, but I just want choose_cursor in
cursor_themes to work correctly in as many scenarios as possible ...

-- 
Configure bugmail: http://qa.mandrakesoft.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Reply via email to