Re: [gtk-list] Re: Lack of gtk_menu_delete function




I think you're missing the point... even if there is a way to do that
(which still isn't useful in my case since I don't want to keep up with
the GtkMenuItem pointers), why shouldn't there be a gtk_menu_remove
function, similar to gtk_clist_remove?  And what about gtk_menu_get_item?
It seems to me like breaking encapsulation to go in and remove/destroy the
menu item yourself when it's supposed to be owned by the GtkMenu.

Jeremy Weatherford
xidus@xidus.net
http://xidus.net/

On 27 Jan 2000, Owen Taylor wrote:

> 
> Jeremy Weatherford <xidus@xidus.net> writes:
> 
> > Heyo,
> > 
> > Maybe this isn't frequently needed in normal menus, but I think people
> > would need it sometimes when using a GtkMenu in a GtkOptionMenu.  I know I
> > could use it right now.  :)  Current solution is to make a new menu
> > without the item I want removed -- less than optimal.
> 
> 
>   gtk_widget_destroy (menuitem_you_dont_want);
> 
> It's that simple.
> 
> (You can also do:
> 
>   gtk_container_remove (GTK_CONTAINER (menu), menuitem);
> 
> But that's more complicated if you just want to get rid of
> the menuitem.)
> 
> Regards,
>                                         Owen
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 



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