Closed daym closed 3 years ago
Gtk-3.0.gir
has this:
<interface name="TreeModel" [...]>
<method name="filter_new" c:identifier="gtk_tree_model_filter_new" [...]>
<return-value transfer-ownership="full">
<doc xml:space="preserve"
filename="gtktreemodelfilter.c"
line="3765">A new #GtkTreeModel.</doc>
<type name="TreeModel" c:type="GtkTreeModel*"/>
</return-value>
</interface>
<class name="TreeModelFilter" [...]>
<method name="refilter"
[...]
That cannot work since:
TreeModelFilter
is not an interface (neither in the first place nor one implemented by the object returned by gtk_tree_model_filter_new
TreeModel
(which is an interface)TreeModelFilter
is-a TreeModel
--in fact, it seems to go out of its way to make them seem as non-related as possible.TreeModelFilter
is not useful without calling set_visible_func
or set_visible_column
on it--and there are no alternative ways of doing that after calling tree-model:filter-new
.Upstream bug report https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/364 Upstream gtk merge request: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2763
Workaround: (make <GtkTreeModelFilter> #:child-model xxx #:virtual-root xxx)
fails because the result of
tree-model:filter-new
neither is aGtkTreeModelFilter
nor can be safely converted to it.