From 3430bd25fec0835e8b8a358fcf8c9f879b08d879 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Mon, 18 Dec 2023 10:17:55 +0100 Subject: [PATCH] WIP: tree_model = create_node_recursive ((GtkTreeModel) tree_store, O); << pb de casting ? --- demos/gtk-demo/tree_store.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c index e41d540..d64eeeb 100644 --- a/demos/gtk-demo/tree_store.c +++ b/demos/gtk-demo/tree_store.c @@ -182,7 +182,8 @@ do_tree_store (GtkWidget *do_widget) GtkWidget *vbox; GtkWidget *sw; GtkWidget *treeview; - GtkTreeModel *model; + GtkTreeModel *tree_model; + GtkTreeStore *tree_store; /* create window, etc */ window = gtk_window_new (); @@ -207,14 +208,16 @@ do_tree_store (GtkWidget *do_widget) GTK_POLICY_AUTOMATIC); gtk_box_append (GTK_BOX (vbox), sw); - /* create model */ - model = create_model (); + /* create tree_model */ + tree_model = create_model (); + // tree_store = gtk_tree_store_new (NUM_COLUMNS, G_TYPE_STRING); + // tree_model = create_node_recursive ((GtkTreeModel) tree_store, O); /* create tree view */ - treeview = gtk_tree_view_new_with_model (model); + treeview = gtk_tree_view_new_with_model (tree_model); gtk_widget_set_vexpand (treeview, TRUE); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), TRUE); - g_object_unref (model); + g_object_unref (tree_model); gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)), GTK_SELECTION_MULTIPLE);