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 130570 - glade uses GtkMenuItems instead of GtkSeparatorMenuItems.
glade uses GtkMenuItems instead of GtkSeparatorMenuItems.
Status: RESOLVED FIXED
Product: glade-legacy
Classification: Deprecated
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Damon Chaplin
Damon Chaplin
Depends on:
Blocks: 129848
 
 
Reported: 2004-01-05 13:49 UTC by Murray Cumming
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Patch to use GtkSeparatorMenuItems in glade (534 bytes, patch)
2004-02-20 11:30 UTC, Harsh Jaitly
none Details | Review

Description Murray Cumming 2004-01-05 13:49:53 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.
Comment 1 Murray Cumming 2004-01-22 17:10:48 UTC
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.
"
Comment 2 Damon Chaplin 2004-01-23 12:25:05 UTC
Yes, I'll try to switch over to using GtkSeparatorMenuItems,
when I get around to looking at the new menu stuff.
Comment 3 Harsh Jaitly 2004-02-20 11:30:05 UTC
Created attachment 24605 [details] [review]
Patch to use GtkSeparatorMenuItems in glade
Comment 4 Harsh Jaitly 2004-02-20 11:31:02 UTC
The patch looks too simple to be true.
Damon , did you have something else in mind for this one ?
(Right justified...eh..?? )
Comment 5 Damon Chaplin 2004-02-20 12:25:06 UTC
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.
Comment 6 Damon Chaplin 2004-03-08 12:57:14 UTC
Patch applied. Thanks.