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 657385 - [introspection] gtk_menu_popup() not introspected
[introspection] gtk_menu_popup() not introspected
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkMenu
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-08-25 21:53 UTC by Cosimo Cecchi
Modified: 2012-03-20 10:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkMenu: Improve annotations (772 bytes, patch)
2012-01-26 02:14 UTC, Matthias Clasen
committed Details | Review

Description Cosimo Cecchi 2011-08-25 21:53:24 UTC
Don't really know why, but gtk_menu_popup() is not introspected, making it difficult to popup menus from JS.
Comment 1 Matthias Clasen 2011-08-26 12:17:45 UTC
its not introspected because of the (skip) annotation.

I added gtk_menu_popup_for_device() specifically for the purpose of having a usable api for bindings
Comment 2 Cosimo Cecchi 2011-08-26 17:26:15 UTC
Actually gtk_menu_popup_for_device() works fine. I think it should somehow be mapped automatically by the bindings when calling menu.popup(), (not sure how to do this) or this different behavior when using a binding should be documented.
Comment 3 Matthias Clasen 2011-08-27 20:05:57 UTC
I think there is a Rename: annotation that could be used to make
gtk_menu_popup_for_device appear as gtk_menu_popup to bindings.
Comment 4 Matthias Clasen 2012-01-26 02:14:43 UTC
The following fix has been pushed:
dbd66a8 GtkMenu: Improve annotations
Comment 5 Matthias Clasen 2012-01-26 02:14:46 UTC
Created attachment 206147 [details] [review]
GtkMenu: Improve annotations

Add a 'Rename to' annotation so gtk_menu_popup_for_device
appears in bindings as gtk_menu_popup (which we skip anyway).
Comment 6 Martin Pitt 2012-02-02 10:07:18 UTC
Can we please revert this? We can't just pretend that gtk_menu_popup() and gtk_menu_popup_for_device() are the same, as they have a different API (the latter has, unsurprisingly, an extra "device" argument).

This also breaks all programs which currently call popup_for_device() through GI, so it's an API break.

I think a better fix for this is to provide unintrospectable API through overrides, such as pygobject has done for a while:

  http://git.gnome.org/browse/pygobject/tree/gi/overrides/Gtk.py#n1395
Comment 7 Javier Hernández 2012-02-20 12:01:01 UTC
Hi!

I'm taking the freedom on reopening this issue since accerciser is affected by it, and, probably, more applications are affected too. So what's the final decission on this? 

Tell me if I can do something to help here.

Thanks in advance!
Comment 8 Martin Pitt 2012-03-15 17:22:58 UTC
Ping again. Can we please revert this before it gets into the stable 3.4 release?
Comment 9 Martin Pitt 2012-03-15 17:25:53 UTC
Ping again. Can we please revert this before it gets into the stable 3.4 release?
Comment 10 Matthias Clasen 2012-03-19 21:30:07 UTC
I've reverted this earlier today
Comment 11 Martin Pitt 2012-03-20 01:17:12 UTC
Thank you!