Storing images in GtkTreeView model

2009-12-16 Thread Andrew Wood
Im using a GtkTreeView with a GtkListStore to display a list of rows with both text and a picture. I can declare the model with just the text as follows: /lhs_store=gtk_list_store_new(1,G_TYPE_STRING,); //1 cols(string) / but how do I decalre it to have a picture as well e.g the following-

Re: Storing images in GtkTreeView model

2009-12-16 Thread Tadej Borovšak
Hello. > /lhs_store=gtk_list_store_new(2,G_TYPE_STRING,G_TYPE_PIXBUF); //2 cols, 1st > is string, 2nd is icon/ Store creation should be done like this: lhs_store = gtk_list_store_new( 2, G_TYPE_STRING, GDK_TYPE_PIXBUF ); Hint: For most of GTK+/GDK types, you can get tybe by this simple conventi

Re: Storing images in GtkTreeView model

2009-12-16 Thread Andrew Wood
Excellent thank you. Tadej Borovšak wrote: Hello. /lhs_store=gtk_list_store_new(2,G_TYPE_STRING,G_TYPE_PIXBUF); //2 cols, 1st is string, 2nd is icon/ Store creation should be done like this: lhs_store = gtk_list_store_new( 2, G_TYPE_STRING, GDK_TYPE_PIXBUF ); Hint: For most of GTK+

GtkTreeView auto selecting row

2009-12-16 Thread Andrew Wood
Is there a way to pre-select a row when the tree is first displayed. In other words if the user hasnt yet selected a row it defaults to one ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-

Re: GtkTreeView auto selecting row

2009-12-16 Thread Tadej Borovšak
Hello. Just call gtk_tree_selection_select_iter/path() and you should be good. Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome