GNOME Bugzilla – Bug 531904
gtk_menu_item_set_submenu
Last modified: 2008-07-06 23:49:48 UTC
I was investigating stopping using gtk_menu_item_remove_submenu in favour of the GTK+ 2.12 way of doing (gtk_menu_item_set_submenu to NULL), but I saw in the code that GTK+ 2.10 doesn't really allow that, since http://svn.gnome.org/viewvc/gtk%2B/tags/GTK_2_10_9/gtk/gtkmenuitem.c?view=markup shows that submenu isn't tested, then is used for a call to gtk_menu_attach_to_widget. That means there's a bug in GTK+ 2.10 : that code will give warnings. I think it works though. Not sure if it's worth fixing, but at least it is reported.
The deprecation of gtk_menu_item_remove_submenu is from 2.12 onwards, where gtk_menu_item_set_submenu has been fixed up to work for NULL