After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 385268 - Gtk::StatusIcon needs to wrap activate and popup-menu signals
Gtk::StatusIcon needs to wrap activate and popup-menu signals
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2006-12-13 00:24 UTC by David Trowbridge
Modified: 2007-05-01 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkmm_statusicon_signals.patch (2.22 KB, patch)
2007-02-10 14:38 UTC, Murray Cumming
none Details | Review

Description David Trowbridge 2006-12-13 00:24:36 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.
Comment 1 Murray Cumming 2006-12-22 18:20:36 UTC
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().
Comment 2 David Trowbridge 2006-12-22 18:49:30 UTC
The closest to "official example" I've seen is http://live.gnome.org/GtkStatusIconTutorial, which uses the popup-menu signal
Comment 3 Murray Cumming 2007-02-10 14:38:44 UTC
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.
Comment 4 Murray Cumming 2007-02-10 15:14:59 UTC
See also bug #392948
Comment 5 Murray Cumming 2007-05-01 17:00:52 UTC
Committed to svn trunk, after branching for gtkmm-2-10.