PDA

View Full Version : Disable an item of the popup menu of a GNOME panel applet



mrShadow
February 5th, 2009, 09:44 AM
Hi. I'm writing a GNOME panel applet and want to disable a menu item in run-time. How can I do that?

I already googled it and asked it in irc.gnome.org#gtk+, but got no replies. I also asked it in Gtk+ mailing list a week ago, but the message is still in pre-moderation, and I don't want to wait any more.

That would be great if I could get a GtkMenu corresponding to the popup menu. I tried gtk_menu_get_for_attach_widget() passing my PanelApplet object, but it returned an empty list.

There is also a method of PanelApplet called panel_applet_get_popup_component (http://library.gnome.org/devel/panel-applet/stable/PanelApplet.html#panel-applet-get-popup-component), but I have no idea how to use the object returned.

I actually use PyGTK, but a GTK+ solution will be greatly appreciated too.

Sorry for my English.

mrShadow
February 6th, 2009, 11:46 PM
Anybody?

Vadi
February 8th, 2009, 02:56 PM
I'm interested in finding this out too. He meant the menu that you get when you right-click on an applet