[Glade-users] Native Python objects in ListStore
- From: tristan.van.berkom at gmail.com (Tristan Van Berkom)
- Subject: [Glade-users] Native Python objects in ListStore
- Date: Mon, 27 Apr 2009 12:27:14 -0400
On Mon, Apr 27, 2009 at 11:32 AM, Martin Vollrathson <mavos at mavos.net> wrote:
I've been using the new GtkBuilder features in Glade3 to edit
ListStores, create columns and column types. Now I need to create a
column which can contain Python objects. Before, when creating
ListStores with Python code, I could just use the native 'object' type
in the ListStore constructor but in the Glade3 combo box for column
type, of course there are no native python types. I've tried adding
gpointer, hoping PyGTK would somehow convert it to a python object but
that does not work.
How would I best create ListStore columns which can contain Python
objects with Glade3?
Im going to look into this, currently we only add column types
that we know how to edit (we have the same problem for
PangoFontDescription for instance), so I can easily add
an entry point to add your custom type name for the column
(ofcourse Glade wont always be able to ensure the type
exists...).
I'm pretty sure we can look at this as a bug and fix it
in 3.6 without changing the UI.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]