GNOME Bugzilla – Bug 385268
Gtk::StatusIcon needs to wrap activate and popup-menu signals
Last modified: 2007-05-01 17:00:52 UTC
These two signals are erroneously marked as "Keybinding signal" in the source and ignored when generating bindings. These signals are needed in order to properly handle activation and giving a status icon a popup menu. I've been pointed to some mailing list threads on the subject, asking for clarification on the use of these signals. The GTK+ API documentation notes that if/how these actions are triggered is platform dependent. Basically: "activated" is emitted when the user left-clicks on the icon. Applications can handle this signal in order to perform some action in response. "popup-menu" is emitted when the user right-clicks or uses a keyboard to request a context menu. If an application wishes to attach a pop-up menu to the icon, they attach to this signal to actually perform the pop-up.
Yes, we will just have to take the risk and use this API, even if it's not been declared officially public API. Is there even any example code that uses this API? However, this must wait for gtkmm 2.11/2.12, which will wrap GTK+ 2.11/2.12. In the meantime, people have to use gobj() and g_signal_connect().
The closest to "official example" I've seen is http://live.gnome.org/GtkStatusIconTutorial, which uses the popup-menu signal
Created attachment 82281 [details] [review] gtkmm_statusicon_signals.patch We can apply this patch when we branch for gtkmm 2.12. Until then, people need to use the C signal API.
See also bug #392948
Committed to svn trunk, after branching for gtkmm-2-10.