GtkMenuItem in Glade translated to GtkAction with gtk-builder-convert

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

 



Hi.
I am making a simple Menu in glade and a submenu which will be
populated by code, i cant get it to work.
Glade says that the item is an GtkMenuItem, but after executing the next lines:

        menu = gtk_menu_new();
        widget = GTK_WIDGET (gtk_builder_get_object (builder, "menumodos"));
        gtk_menu_item_set_submenu( GTK_MENU_ITEM(widget) , menu );

It print the next errors:

(Wattmeter:16481): GLib-GObject-WARNING **: invalid cast from
`GtkAction' to `GtkWidget'

(Wattmeter:16481): GLib-GObject-WARNING **: invalid cast from
`GtkAction' to `GtkMenuItem'

(Wattmeter:16481): Gtk-CRITICAL **: gtk_menu_item_set_submenu:
assertion `GTK_IS_MENU_ITEM (menu_item)' failed


I convert the file with this:

gtk-builder-convert interface.glade interface.xml




Could this be a bug?
If not, how can i build a menu with code and attach it to a menu in Glade?

Cheers.
Diego
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux