WIP: TreeItem create_node_recursive (GtkTreeStore *model, TreeItem *current_item) {...}
This commit is contained in:
parent
9da50fa49b
commit
5e870ae870
|
@ -98,6 +98,24 @@ static void create_node(GtkTreeStore *model,
|
||||||
gtk_tree_store_set (model, iter_children, COLUMN_0, item_children->label, -1);
|
gtk_tree_store_set (model, iter_children, COLUMN_0, item_children->label, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static TreeItem create_node_recursive (GtkTreeStore *model, TreeItem *current_item)
|
||||||
|
{
|
||||||
|
TreeItem *item_children;
|
||||||
|
GtkTreeIter iter_children, iter_parent;
|
||||||
|
|
||||||
|
if (current_item->children) {
|
||||||
|
item_children = current_item->children;
|
||||||
|
|
||||||
|
while (item_children->label) {
|
||||||
|
gtk_tree_store_append (model, &iter_children, &iter_parent);
|
||||||
|
gtk_tree_store_set (model, &iter_children, COLUMN_0, item_children->label, -1);
|
||||||
|
item_children++;
|
||||||
|
create_node_recursive (model, item_children);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return *item_children;
|
||||||
|
}
|
||||||
|
|
||||||
static GtkTreeModel *
|
static GtkTreeModel *
|
||||||
create_model (void)
|
create_model (void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue