[Glade-users] Inputting data and linking GtkTreeViewColumn with a ListStore.

I'm inputting data to the ListStore like this --

     GType string_type = G_TYPE_STRING;
     GtkTreeIter current;
     gtk_list_store_set_column_types ( detect_object ( "result", 
build_object ) , 1 , &string_type );
     gtk_list_store_append ( detect_object ( "result", build_object), 
&current );
     gtk_list_store_set ( detect_object ( "result", build_object), 
&current, 0, "test", -1 );

However, it results in --

(a.out:8916): Gtk-CRITICAL **: gtk_list_store_set_column_types: 
assertion `priv->columns_dirty == 0' failed

(a.out:8916): Gtk-WARNING **: gtkliststore.c:1043: Invalid column number 
0 added to iter (remember to end your list of columns with a -1)

Which makes me suspicious of what's going on.

All this does, is add a new blank entry (which can be selected).

Then I'm trying to link this particular ListStore's column with 
GtkTreeViewColumn with --

gtk_tree_view_column_cell_set_cell_data ( test_col , detect_object ( 
"result", build_object) , &current, FALSE, FALSE );

But nothing happens. I've already appended test_col with 
gtk_tree_view_append_column to the tree view.

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