From 8107c7d2e333eb5f8cfe41cf0fb422103e6b2544 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 3 Jan 2024 00:31:18 +0100 Subject: [PATCH] =?UTF-8?q?WIP:=20GDK=5FDEPRECATED=5FIN=5F4=5F10=5FFOR(Gtk?= =?UTF-8?q?ListView)=20in=20gtk/deprecated/gtktreeview.h=20line=20194=20?= =?UTF-8?q?=20<=20=20mais=20=C3=A7a=20marche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demos/gtk-demo/tree_store.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c index 3b383e4..fde0285 100644 --- a/demos/gtk-demo/tree_store.c +++ b/demos/gtk-demo/tree_store.c @@ -149,7 +149,7 @@ static TreeItem R[] = {{"A", A}, {"B", B}, {"C", C}, {NULL}}; static TreeItem O[] = {{"ROOT", R}, {NULL}}; // Artefact added for symmetry -static GListModel *create_node_recursive (GtkTreeStore *model, +static GListStore *create_node_recursive (GtkTreeStore *model, // GListStore* g_list_store_new (GType item_type) TreeItem *current_item, GtkTreeIter *iter_parent, int depth) @@ -173,13 +173,12 @@ static GListModel *create_node_recursive (GtkTreeStore *model, } if (depth == 0) - return G_LIST_MODEL(model); // cast from GtkTreeModel to GListModel or GtkTreeStore + return G_LIST_STORE(model); // can cast to GListModel or to GtkTreeStore ? else return NULL; } - GtkWidget * do_tree_store (GtkWidget *do_widget) { @@ -190,7 +189,7 @@ do_tree_store (GtkWidget *do_widget) GtkWidget *my_tree_box; GtkWidget *my_scrolled_window; GtkWidget *my_tree_view; - GListModel *my_list_model = NULL; + GListStore *my_list_model = NULL; /* create window, etc */ my_window = gtk_window_new ();