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 369150 - File chooser is using deprecated optionmenu widget
File chooser is using deprecated optionmenu widget
Status: RESOLVED DUPLICATE of bug 562052
Product: gedit
Classification: Applications
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-01 23:46 UTC by Thomas Wood
Modified: 2009-01-06 14:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Thomas Wood 2006-11-01 23:46:10 UTC
Gedit appears to be adding a GtkOptionMenu widget to its file chooser dialogs. GtkOptionMenu is deprecated and GtkComboBox should be used instead. Using GtkOptionMenu also looks bad in themes which render the OptionMenu and ComboBox differently, as both of them appear on the window.
Comment 1 Paolo Borelli 2006-11-02 00:27:44 UTC
Agreed[1], but last time I looked it was not obvious how to obtain the same thing with a combobox: note that the widget includes radio items, separators and an additional item which pops up a dialog.



[1] themes that renders them differently are buggy IMHO
Comment 2 Thomas Wood 2006-11-02 10:15:16 UTC
Re [1]: Not necessarily. GtkComboBox has a style option called appears-as-list, which causes gtk+ to render it differently. If that style option is set then you get the two "comboboxes" displaying differently since OptionMenu doesn't have this style property.
Comment 3 Paolo Borelli 2006-11-02 11:06:34 UTC
IIRC that style property is there for win32 since there isn't a widget like GtkOptionMenu in MFC
Comment 4 Thomas Wood 2006-11-02 16:49:30 UTC
Yes, and I am currently updating the Redmond theme :-)

It is possible to add separators to GtkComboBox with the gtk_combo_box_set_row_separator_func () function.

Radio buttons seem pretty redundant here, I'm not quite sure what there purpose they serve.

With the last item it should be fairly easy to capture when it is selected, and perform an action.
Comment 5 Thomas Wood 2006-11-02 16:53:43 UTC
As a side note, a theme that renders them differently cannot exactly be called buggy. GTK+ itself actually renders them differently, so a theme that renders them the same has to jump through hoops to get them both looking nice.
Comment 6 Paolo Maggi 2006-11-04 10:28:05 UTC
Patches are welcome.

In reply to comment #4, radios are not useful if we are going to use a combobox. They are only useful if using a menu, like we are doing now.
Comment 7 Paolo Borelli 2009-01-06 14:29:54 UTC
marking this one as duplicate as the new one has a patch

*** This bug has been marked as a duplicate of 562052 ***