Closed sjohannes closed 9 years ago
Thanks. These were only changed to inout in GTK+ 3.16 (resulting in an API break..). The Python docs are currently build using 3.14 but will get updated once 3.16 enters debian.
I currently use this code in quodlibet to support both versions:
def menu_popup(menu, shell, item, func, *args):
"""Wrapper to fix API break:
https://git.gnome.org/browse/gtk+/commit/?id=8463d0ee62b4b22fa
"""
if func is not None:
def wrap_pos_func(menu, *args):
return func(menu, args[-1])
else:
wrap_pos_func = None
return menu.popup(shell, item, wrap_pos_func, *args)
Interesting, thanks; I'll have to use a similar workaround then.
Perhaps showing the version of the documented packages would help slightly? It wouldn't have helped me specifically (my knowledge of GTK+ 3 versions is nonexistent), but maybe someone else would notice that the Python docs are based on 3.14 and figure that something must have changed in 3.16.
Ideally the GTK+ documentation itself should mention the out→inout change, but I don't know if the GTK+ devs would be up for adding special notes just for bindings.
I've opened #93
Not sure what to do about API breaks...
3.16 is now up (since it entered Debian today)
GtkMenuPositionFunc has inout params x and y. The Python documentation lists them on the return type but on on the params.
This doesn't seem to affect other inout params that I've checked (e.g. in gtk_widget_destroyed).