Re: Storing GObject in GtkListStore



As far as I can tell you can, as per this example:


http://developer.gnome.org/doc/API/2.0/gtk/GtkListStore.html#gtk-list-store-new

Notice how they set a column as a GDK_TYPE_PIXBUF, which is derived from G_OBJECT.  This implies that you can 
store anything derived from G_OBJECT in a column designated as such.  Of course, you may not be able to 
display that column unless you have a CellRenderer capable of grabbing some useful information from your 
object.

----- Original Message ----
From: Tomasz Jankowski <tomcioj gmail com>
To: gtk-app-devel-list gnome org
Sent: Wednesday, August 2, 2006 9:51:08 AM
Subject: Storing GObject in GtkListStore

Hi!

Generally it isn't a problem, I'm only nosy :P I'd like to know if there is
some other (more recommended) way to store, for example GObject in
GtkListStore/GtkTreeStore. So far I do it, by creating column with type
G_TYPE_INT and storing there pointer to object.

-- 
Pozdrawiam!
Tom
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]