Re: gtk_check_menu_item_set_active problem.



Archit Baweja wrote:
> 
> Hey all.
> I have a problem with the function call gtk_check_menu_item_set_active.
> 
> This is the GnomeUIInfo structure for my 'Settings' menu of my application.
> 
> static GnomeUIInfo settings_menu_uiinfo[] =
> {
>         GNOMEUIINFO_TOGGLEITEM (N_("View Main Toolbar"), NULL, toggl_cb, NULL),
>         GNOMEUIINFO_END
> };
> 
> Now here is some part of the code in the create_app ().
> 
> create_app (...)
> {
>         /* Some stuff */
>         ...............
> 
>         /* Make the menu */
>         gnome_app_create_menus (....)
> 
>         /* Make the main toolbar */
>         gnome_app_create_toolbar (....)
> 
>         /* Toggle the checkbutton in the menu coz Main toolbar is visible */
>         gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (settings_menu_uiinfo[0].widget), TRUE);
> 
>         /* Some more code */
>         ...................
> }
> 
> My problem is that when the program comes to the line where I toggle the check
> menu item, there is a error given and the program crashes. The error is
> 
> "Gtk-WARNING **: Invalid cast from (NULL) pointer to 'GtkObject'"
this could be happening in the callback for the check menu item that
gets called because of set_active().

regards,
	jaKa

-- 

email: jaka.mocnik@kiss.uni-lj.si
w3:    http://pluton.ijs.si/~jaka




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