Gtk-3.0.gir: TreeModel.get_iter argument iter should be direction:inout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTK+ |
Expired
|
Medium
|
|||
gtk+3.0 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Same for Gtk-2.0.gir
The get_iter method is overriden by models to return a custom iter. The GtkTreeIter is initialised by the caller and passed to the callee who will fill in the user_data attribute.
Since the direction is set to "out", the param cannot be passed to the callee (e.g. using pygobject).
This makes it impossible to implement custom TreeModels with pygobject.
A fix will be to change the direction to "in" so that the argument gets passed to the callee ("inout" seems not to work :/).
<field name="get_iter">
<callback name="get_iter">
<doc xml:whitespace=
<type name="gboolean" c:type="gboolean"/>
<type name="TreeModel" c:type=
<doc xml:whitespace=
<type name="TreeIter" c:type=
<doc xml:whitespace=
<type name="TreePath" c:type=
</callback>
</field>
As a sidenote: What I do not understand though is how the handling of the return value happens. Apparently a tuple is expected with the first argument being the boolean return value and the second argument seems to be copied to the iter->stamp field (the first field of the struct). However, it does not seem possible to set the other struct's fields.
When returning anything else than a tuple, the following error is raised (which is ok though, because the calling convention requires to return a tuple there):
ERROR:/
description: | updated |
Changed in gtk: | |
importance: | Unknown → Medium |
status: | Unknown → New |
Changed in gtk: | |
status: | New → Expired |
Status changed to 'Confirmed' because the bug affects multiple users.