WIP: GDK_DEPRECATED_IN_4_10_FOR(GtkListView) in gtk/deprecated/gtktreeview.h line 194 < mais ça marche
This commit is contained in:
parent
3635308cf5
commit
8107c7d2e3
|
@ -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 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,
|
TreeItem *current_item,
|
||||||
GtkTreeIter *iter_parent,
|
GtkTreeIter *iter_parent,
|
||||||
int depth)
|
int depth)
|
||||||
|
@ -173,13 +173,12 @@ static GListModel *create_node_recursive (GtkTreeStore *model,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depth == 0)
|
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
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
do_tree_store (GtkWidget *do_widget)
|
do_tree_store (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
|
@ -190,7 +189,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||||
GtkWidget *my_tree_box;
|
GtkWidget *my_tree_box;
|
||||||
GtkWidget *my_scrolled_window;
|
GtkWidget *my_scrolled_window;
|
||||||
GtkWidget *my_tree_view;
|
GtkWidget *my_tree_view;
|
||||||
GListModel *my_list_model = NULL;
|
GListStore *my_list_model = NULL;
|
||||||
|
|
||||||
/* create window, etc */
|
/* create window, etc */
|
||||||
my_window = gtk_window_new ();
|
my_window = gtk_window_new ();
|
||||||
|
|
Loading…
Reference in New Issue