Custom GtkTreeModel with pygobject3
- From: Daniel Drake <dsd laptop org>
- To: python-hackers-list gnome org
- Subject: Custom GtkTreeModel with pygobject3
- Date: Sun, 11 Dec 2011 15:31:37 -0600
Hi,
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:
http://dev.laptop.org/~dsd/20111211/treemodel.py
Output:
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/libc.so.6
#2 0x4a0b52d5 in abort () from /lib/libc.so.6
#3 0x4a35100f in g_assertion_message () from /lib/libglib-2.0.so.0
#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?
Thanks,
Daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]