Re: How to remove MenuItem from Menu?
- From: Lars Wirzenius <liw liw fi>
- To: gtk-app-devel-list gnome org
- Subject: Re: How to remove MenuItem from Menu?
- Date: Thu, 22 Oct 2009 09:03:17 +0300
ke, 2009-10-21 kello 23:11 +0200, Peter Daum kirjoitti:
There are several functions to dynamically change/reorder menus,
but I couldn't find or figure out a way how to remove a certain
item from a Menu. Is this possible? How?
(I tried some strange things like calling item->destroy
and was not surprised that it didn't work ...)
This should work (I do something similar for menu items added/removed by
plugins when they are enabled/disabled):
* when you create and add the menu item, keep a reference to it
* when you remove it, call the function to remove a child from the
container; with the Python binding's it's just the .remove(menuitem)
method, but in C I guess it's gtk_container_remove.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]