Re: [gtk-list] Re: gtk_widget_set_state() with GNOME generated menus.
- From: Chris Phelps <chicane reninet com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: gtk_widget_set_state() with GNOME generated menus.
- Date: Sat, 04 Dec 1999 13:25:50 -0800
Havoc Pennington wrote:
> On Fri, 3 Dec 1999, Chris Phelps wrote:
> > assume this is because most gnome programs use the gnome menu builder,
> > which doesnt exactly co-operate well with finding GtkMenuItem's. In my
> Yes it does, you just extract them from your GnomeUIInfo after you create
> the menus. It's not the most convenient thing on earth but it works fine,
> and it isn't awful. In any case it's better than the below:
> > (GtkMenuBar *)menu_bar = GTK_MENU_BAR(GNOME_APP(window)->menubar);
> > // "File" is the first menu
> > (GtkMenuItem *)filemenu =
> > GTK_MENU_ITEM(GTK_MENU_BAR(menu_bar)->menu_shell.children->data);
> > // and "Edit" is the second
> > (GtkMenuItem *)editmenu =
> > GTK_MENU_ITEM(GTK_MENU_BAR(menu_bar)->menu_shell.children->next->data);
> > // dont get the very first menu item, because it is the little ---------
> > thing, which we dont want, so skip 1 item
> > (GtkPixmapMenuItem *)edit_menu_change =
> > GTK_PIXMAP_MENU_ITEM(GTK_MENU_SHELL(GTK_MENU_ITEM(editmenu)->submenu)->children->next->data);
> This is very likely to break due to GTK changes or changes in your own
> How did you build the menu? If manually, then you already have the
> pointers without doing this. If you used the GtkItemFactory, there are
> functions to extract the widgets.
> To unsubscribe: mail -s unsubscribe email@example.com < /dev/null
I used gnome_app_create_menus() with all that GNOMEUIInfo crap.
I think I understand what you mean now tho...
The name of the GNOMEUIInfo has pointers to the menu items?
GNOMEUIInfo menu1  =
what exactly is menu1 pointing to after the menu us built?
] [Thread Prev