GNOME Bugzilla – Bug 369150
File chooser is using deprecated optionmenu widget
Last modified: 2009-01-06 14:29:54 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.
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
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.
IIRC that style property is there for win32 since there isn't a widget like GtkOptionMenu in MFC
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.
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.
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.
marking this one as duplicate as the new one has a patch *** This bug has been marked as a duplicate of 562052 ***