Re: gtk_menu_remove()

On Sun, 1 Apr 2001, Dennis Bjorklund wrote:

> Since there is a gtk_menu_insert() shouldn't there also be a function
> gtk_menu_remove()? I checked gtk+ 2.0 and it's not there either.
> What is the "correct" way to remove an item from a menu without destroying
> it? I use gtk_container_remove now, and even if that is correct I still
> think there should be a matching gtk_menu_remove() to the
> gtk_menu_insert() (and append, and prepend) that exists now.

gtk_container_remove() is the correct function to use in this case.  If
your item gets destroyed while doing this, it probably indicates that the
menu held the only reference to the menu item.  So gtk_widget_ref the menu
item before removing it, and it should work (remember to release your
reference once you have added the item somewhere else).


Email: james daa com au

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