GNOME Bugzilla – Bug 669264
pygiconvert.sh does not correctly convert gtk.gdk.x11_*
Last modified: 2012-02-15 06:48:21 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.
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.
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'.
Ah, thanks. I pushed your patch to trunk.