GNOME Bugzilla – Bug 130570
glade uses GtkMenuItems instead of GtkSeparatorMenuItems.
Last modified: 2004-12-22 21:47:04 UTC
When adding separators, the Glade menu editor creates GtkMenuItems without a label instead of GtkSeparatorMenuItems - the class="GtkMenuItem" instead of "GtkSeparatorMenuItem" in the .glade file. This seems to work due to an uncommented hack in _gtk_menu_item_is_selectable(): http://cvs.gnome.org/lxr/source/gtk+/gtk/gtkmenuitem.c#1381 but this does not work for language bindings (such as gtkmm) which use a derived GType, because _gtk_menu_item_is_selectable() checks for the _exact_ menu item. Changing the .glade file to use class="GtkSeparatorMenuItem" seems to work fine.
Owen Taylor, on gtk-devel-list, said: " > > menus without labels was the GTK+-0.0 => GTK+-1.2 API for > > separators. There was no good reason to break that usage, and > > it's not really possible to deprecate it in any controlled > > way. So we might as well keep it working. > > Murray wrote: > Thanks. But you see no reason why glade/libglade should not try to > instantiate GtkSeparatorMenuItems instead? No, I'd think Glade should write out GtkSeparatorMenuItems. libglade presumably just does whatever glade asks. "
Yes, I'll try to switch over to using GtkSeparatorMenuItems, when I get around to looking at the new menu stuff.
Created attachment 24605 [details] [review] Patch to use GtkSeparatorMenuItems in glade
The patch looks too simple to be true. Damon , did you have something else in mind for this one ? (Right justified...eh..?? )
I was also going to consider migrating old Glade files when loading them. (Glade will also be migrating old toolbar widgets to the new toolbar items when loading.) I'm also going to take a look at the new GtkUIManager stuff. Though I don't think I'm going to support that in Glade 2. I should get to these today or tomorrow.
Patch applied. Thanks.