Date: Fri, 17 Sep 2004 12:15:14 +0200 (CEST) Message-Id: <20040917.121514.59468587.oandrieu at nerim.net> To: garrigue at kurims.kyoto-u.ac.jp Cc: lablgtk at kaba.or.jp Subject: Re: (Q) How to store "pixbuf" into GTree.model? From: Olivier Andrieu In-Reply-To: <20040917.090542.59460509.garrigue at kurims.kyoto-u.ac.jp> References: <20040914151922.733e64d0 at tintin.inria.fr> <20040914.160525.92586750.oandrieu@nerim.net> <20040917.090542.59460509.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Jacques Garrigue [Fri, 17 Sep 2004]: > From: Olivier Andrieu > > Anyway, the GTree code needs some fixing : right now it converts the > > GTypes of the column list to fundamental types before creating the > > GtkListStore of GtkTreeStore. It's wrong, I don't know why it does > > this. > > This is due to the fact columns are made from data_conv's, and > data_conv's only know fundamental types. Ah yes, right. > GTK only checks the fundamental type of columns (accessing them > with g_value_get_{object,boxed,...}), so this information is > sufficient, at least for gobject's. Not anymore, unfortunately. In GTK 2.6 there's a new widget, GtkIconView, using a GtkTreeModel with a string and a GdkPixbuf column and this widget wants a derived gtype for the pixbuf column (ie using a GOBJECT column causes an error). To work around this, I added a [`OTHER of g_type] variant in Gobject.data_kind and a gobject_by_name data_conv val gobject_by_name : string -> 'a obj data_conv (none of this is in the CVS yet) Do you think that will do ? -- Olivier