[Java-gnome-developer] Pixbufs in TreeView patch
Brought to you by:
afcowie
From: Destrius <des...@th...> - 2003-02-04 07:54:56
|
I've managed to get pixbufs working in TreeView widgets... the problem seems to be with gtk+ being unable to convert a g_pointer to a GdkPixbuf* on the fly. As a result, the current code fails at two points: first, when placing the GdkPixbuf handle into a GValue (as a pointer value), and second when using G_TYPE_POINTER in place of GDK_TYPE_PIXBUF inside Type.PIXBUF(). Some quick hacking of these two fixes the problem, but its makes the code a bit messy. I added a new native function to ListStore that uses gtk_list_store_set() to set the value of the column when a pixbuf is supplied, and modified Type.PIXBUF() to return GDK_TYPE_PIXBUF. I haven't modified TreeStore yet, but the changes should be identical to ListStore. The cvs diff is attached, hope it will be of some use. :) -- Destrius http://harmos.threeone.net |