Custom GtkTreeModel with pygobject3


I'm working on moving the Sugar Journal to GTK3. This uses a custom
GTK tree model (previously using GenericTreeModel with PyGTK).

I'm having trouble getting this working - I don't really understand
how a GtkTreeIter is supposed to be represented at the Python level,
and it crashes immediately in my do_get_iter implementation.

Not sure if this is a bug, or perhaps I'm doing something wrong.

Test app:


do get iter 0 <class 'gi.overrides.Gtk.TreePath'>
ERROR:pygi-closure.c:315:_pygi_closure_set_out_arguments: code should
not be reached

Program received signal SIGABRT, Aborted.
0x00110424 in __kernel_vsyscall ()
(gdb) bt
#0  0x00110424 in __kernel_vsyscall ()
#1  0x4a0b398f in raise () from /lib/
#2  0x4a0b52d5 in abort () from /lib/
#3  0x4a35100f in g_assertion_message () from /lib/
#4  0x0011ed22 in _pygi_closure_set_out_arguments (resp=0xbfffe810, out_args=
    0x8083a20, py_retval=0xb7cb19ec, callable_info=0x8155c90)
    at pygi-closure.c:315
#5  _pygi_closure_handle (cif=0x8155ccc, result=0xbfffe810, args=0xbfffe7a0,
    data=0x8155cc0) at pygi-closure.c:364

Any ideas?
Are there any pre-existing examples of custom TreeModels implemented
with pygobject?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]