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 669264 - pygiconvert.sh does not correctly convert gtk.gdk.x11_*
pygiconvert.sh does not correctly convert gtk.gdk.x11_*
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-02 18:14 UTC by Simon Schampijer
Modified: 2012-02-15 06:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make pygiconvert.sh correctly convert gtk.gdk.x11_* (953 bytes, patch)
2012-02-02 18:14 UTC, Simon Schampijer
none Details | Review

Description Simon Schampijer 2012-02-02 18:14:00 UTC
Created attachment 206655 [details] [review]
Make pygiconvert.sh correctly convert gtk.gdk.x11_*

Looking at the gir file gtk.gdk.x11_* should get converted to GdkX11.x11_*. I think the *x11_* part is redundant but if we fix it upstream we might break existing applications (I checked and at least the Makefile to generate the gir has not changed recently).  I also already discussed the issue with Tomeu.
Comment 1 Martin Pitt 2012-02-10 07:29:04 UTC
Do you have some example code? There are a lot of methods in GdkX11 which don't have an x11_* prefix. http://developer.gnome.org/pygtk/stable/gdk-class-reference.html doesn't seem to document the gdk.x11_* parts.
Comment 2 Simon Schampijer 2012-02-14 14:52:41 UTC
The case why I came across this was the conversion for 'gtk.gdk.x11_get_server_time' which in pygobject has to be 'GdkX11.x11_get_server_time' according to the gir file and the current script made it 'GdkX11.get_server_time'. In Sugar there was no other usage of  'gtk.gdk.x11*'. Like you said, I don't even see any listed in that one listed in http://developer.gnome.org/pygtk/stable/gdk-functions.html Looking at the gir file the functions seem to mix in their naming :/ e.g. <function name="get_xvisual" c:identifier="gdk_x11_visual_get_xvisual"> but <function name="x11_grab_server" c:identifier="gdk_x11_grab_server"> 

The gtk.gdk* functions like 'gtk.gdk.screen_get_default' gets transferred correctly to 'Gdk.Screen.get_default'.
Comment 3 Martin Pitt 2012-02-15 06:48:21 UTC
Ah, thanks. I pushed your patch to trunk.