Problems disabling a menu item



I'm having some troubles disabling a menu item. I
have the following:

GtkItemFactory *menu;
GtkWidget *tmp;

tmp = gtk_item_factory_get_widget(menu, main_menu[2].path);
gtk_widget_set_sensitive(tmp);

main_menu is a GtkItemFactoryEntry. The program compiles
just fine, but when I start the program, I get the following
error:

Gtk-CRITICAL **: file gtkwidget.c: line 3313 (gtk_widget_set_sensitive):
assertion `widget != NULL' failed.

So why would tmp be being set to NULL? My menu seems to
work just fine, but I can't find a way to grab a specific
menu item (I thought this would be the way) so I could
disable it. Any help you could provide would be appreciated.
Thanks.

-- 
+-----------------------------------------------------+
| Jeff "Shippy" Shipman     E-Mail: shippy@cs.nmt.edu |
| Computer Science Major    ICQ: 1786493              |
| New Mexico Institute of Mining and Technology       |
| Homepage: http://www.nmt.edu/~shippy                |
+-----------------------------------------------------+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]