need advice with menus
- From: Perdie Perduta <rsperduta gmail com>
- To: gtk-app-devel-list gnome org
- Subject: need advice with menus
- Date: Mon, 10 Dec 2012 00:23:14 +1300
I'm creating menu of available active audio devices when a tool bar
menu button is clicked. I already discovered I have to actually have a
dummy menu attached to the button or I won't get any events.
Now I noticed in glade I have to define the menu as a top level item
and then it lets me pair that with my tool bar button, but if I delete
either one of them I can't get rid of the other. I tried using the
same dummy menu on multiple buttons but that gives me run time
warnings although it does work.
Now I'm unsure of the recommended way to create my dynamic menus. At
the moment using the one that is there after deleting all it's items
with:
// remove the current items from my menu
gtk_container_foreach(
reinterpret_cast<GtkContainer *> (pDeviceMenu)
, reinterpret_cast<GtkCallback> (>k_widget_destroy)
, NULL
);
... then appending a fresh set of entries. OTOH should I just create a
brand new menu and attach that to the tool button... Thus leaving the
system to unreference and delete whatever was there before?
--
~~~ PEr aRDUa ad asTrA ~~~
(Through adversity to the stars)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]