Date: Sat, 18 Sep 2004 12:45:49 +0900 (JST) Message-Id: <20040918.124549.30190350.garrigue at kurims.kyoto-u.ac.jp> To: andrieu at ijm.jussieu.fr Cc: lablgtk at kaba.or.jp Subject: Re: (Q) How to store "pixbuf" into GTree.model? From: Jacques Garrigue In-Reply-To: <20040917.121514.59468587.oandrieu at nerim.net> References: <20040914.160525.92586750.oandrieu at nerim.net> <20040917.090542.59460509.garrigue@kurims.kyoto-u.ac.jp> <20040917.121514.59468587.oandrieu@nerim.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Olivier Andrieu > > 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 ? This is getting nasty... I have already commited some changes to allow the use of boxed column types (like GdkColor), but I didn't think there was a need for objects. Let me think a bit about that. A temporary hack would be to define your gobject_by_name using [`BOXED of g_type] since it does the same thing. Jacques