Havoc Pennington wrote:

> Ignacio Nodal <[EMAIL PROTECTED]> writes:
> 
>>Hi, i'm writing my own functions to create menus, submenus, etc.
>>
>>In my function CreateMenu(GtkWidget* parent, gchar* label), I would
>>like to know if my "GtkWidget* parent" parameter is either a
>>GtkMenuBar or a GtkMenuItem..
>>
>>how can I ask this?
>>
> 
> GTK_IS_MENU_BAR() and GTK_IS_MENU_ITEM()

The problem is parent is either a GtkMenuBar or a GtkMenuItem, so.. if I 
ask at the beginning of my function:

if (GTK_IS_MENU_ITEM(parent)) ...

and it's a GtkMenuBar I get a GTK-Critical:


Gtk-WARNING **: invalid class type `(unknown)' in cast to `GtkMenuItem'

Gtk-CRITICAL **: file gtkmenuitem.c: line 241 
(gtk_menu_item_set_submenu): assertion `GTK_IS_MENU_ITEM (menu_item)' 
failed.


How should I ask?

Thanks again

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to