real gtk question: treeview



I'm trying to use gtktreeview with gtkliststore as the model, but I keep
running into problems.  Here's some relevant code:

GtkTreeView *key_list = GTK_TREE_VIEW (lookup_widget (key_manager,
"key_list"));
        
        GtkTreeViewColumn *keyid = gtk_tree_view_column_new ();
        gtk_tree_view_column_set_title (keyid, "Key ID");
        gtk_tree_view_append_column (key_list, keyid);
...
GtkListStore *list = gtk_list_store_new (5, G_TYPE_STRING, G_TYPE_INT,
                G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING);
        
        gtk_tree_view_set_model (key_list, GTK_TREE_MODEL (list));
        
        GtkTreeIter iter;
        
        gtk_list_store_append (list, &iter);
        gtk_list_store_set (list, &iter, 0, "hi", 1, 0, 2, 0, 3, "hi", 4, "hi",
-1);

When I run this, I get the following output many, many times:

(seahorse2:6795): Gtk-CRITICAL **: file gtktreeviewcolumn.c: line 2246
(gtk_tree_view_column_cell_set_cell_data): assertion
`tree_column->cell_list != NULL' failed

I get all the named columns just fine, and when I have the
list_store_append line, I can select the top row, but there is no data
in it.

-- 
pub  1024D/57DDD9E3 2002-05-24 Jacob (Direct to Home)
<jap1 rig dyndns ws>
Key fingerprint = 1E02 A5FD 8162 4322 C674  6E67 05EB 30F1 57DD D9E3



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