{"action":"created","issue":{"url":"https://api.github.com/repos/lazka/pgi-docgen/issues/92","labels_url":"https://api.github.com/repos/lazka/pgi-docgen/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/lazka/pgi-docgen/issues/92/comments","events_url":"https://api.github.com/repos/lazka/pgi-docgen/issues/92/events","html_url":"https://github.com/lazka/pgi-docgen/issues/92","id":84292584,"number":92,"title":"GtkMenuPositionFunc documentation missing inout params on the \"in\" side","user":{"login":"sjohannes","id":8440927,"avatar_url":"https://avatars.githubusercontent.com/u/8440927?v=3","gravatar_id":"","url":"https://api.github.com/users/sjohannes","html_url":"https://github.com/sjohannes","followers_url":"https://api.github.com/users/sjohannes/followers","following_url":"https://api.github.com/users/sjohannes/following{/other_user}","gists_url":"https://api.github.com/users/sjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/sjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjohannes/subscriptions","organizations_url":"https://api.github.com/users/sjohannes/orgs","repos_url":"https://api.github.com/users/sjohannes/repos","events_url":"https://api.github.com/users/sjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/sjohannes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-03T01:13:00Z","updated_at":"2015-06-03T07:18:24Z","closed_at":null,"body":"GtkMenuPositionFunc has inout params *x* and *y*. The Python documentation lists them on the return type but on on the params.\r\n\r\n* [C docs](https://developer.gnome.org/gtk3/stable/GtkMenu.html#GtkMenuPositionFunc)\r\n* [Python docs](https://lazka.github.io/pgi-docs/Gtk-3.0/callbacks.html#Gtk.MenuPositionFunc)\r\n\r\nThis doesn't seem to affect other inout params that I've checked (e.g. in gtk_widget_destroyed)."},"comment":{"url":"https://api.github.com/repos/lazka/pgi-docgen/issues/comments/108225527","html_url":"https://github.com/lazka/pgi-docgen/issues/92#issuecomment-108225527","issue_url":"https://api.github.com/repos/lazka/pgi-docgen/issues/92","id":108225527,"user":{"login":"lazka","id":991986,"avatar_url":"https://avatars.githubusercontent.com/u/991986?v=3","gravatar_id":"","url":"https://api.github.com/users/lazka","html_url":"https://github.com/lazka","followers_url":"https://api.github.com/users/lazka/followers","following_url":"https://api.github.com/users/lazka/following{/other_user}","gists_url":"https://api.github.com/users/lazka/gists{/gist_id}","starred_url":"https://api.github.com/users/lazka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazka/subscriptions","organizations_url":"https://api.github.com/users/lazka/orgs","repos_url":"https://api.github.com/users/lazka/repos","events_url":"https://api.github.com/users/lazka/events{/privacy}","received_events_url":"https://api.github.com/users/lazka/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T07:18:24Z","updated_at":"2015-06-03T07:18:24Z","body":"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.\r\n\r\nI currently use this code in quodlibet to support both versions:\r\n\r\n```python\r\ndef menu_popup(menu, shell, item, func, *args):\r\n    \"\"\"Wrapper to fix API break:\r\n    https://git.gnome.org/browse/gtk+/commit/?id=8463d0ee62b4b22fa\r\n    \"\"\"\r\n\r\n    if func is not None:\r\n        def wrap_pos_func(menu, *args):\r\n            return func(menu, args[-1])\r\n    else:\r\n        wrap_pos_func = None\r\n\r\n    return menu.popup(shell, item, wrap_pos_func, *args)\r\n```"}}