WIP: fonction iterate_node() premier micro-commit
This commit is contained in:
parent
9d5a1ed25a
commit
8c3884e619
|
@ -66,6 +66,13 @@ static TreeItem B[] = {{ "E", E }, { "F", F }, { "G", G }, { NULL }};
|
|||
static TreeItem A[] = {{ "C", C }, { "D", D }, { NULL }};
|
||||
static TreeItem R[] = {{ "A", A }, { "B", B }, { NULL }};
|
||||
|
||||
static GtkTreeModel *
|
||||
iterate_node(GtkTreeStore *model, TreeItem *parent)
|
||||
{
|
||||
printf("parent->label : %s\n", parent->label);
|
||||
return GTK_TREE_MODEL (model);
|
||||
}
|
||||
|
||||
static GtkTreeModel *
|
||||
create_model (void)
|
||||
{
|
||||
|
@ -78,7 +85,6 @@ create_model (void)
|
|||
while (item_0->label)
|
||||
{
|
||||
TreeItem *item_1 = item_0->children;
|
||||
|
||||
gtk_tree_store_append (model, &iter, NULL);
|
||||
gtk_tree_store_set (model, &iter, COLUMN_0, item_0->label, -1);
|
||||
|
||||
|
@ -92,6 +98,7 @@ create_model (void)
|
|||
TreeItem *item_2 = item_1->children;
|
||||
while (item_2->label) {
|
||||
GtkTreeIter child_child_iter;
|
||||
iterate_node(model, item_2);
|
||||
gtk_tree_store_append (model, &child_child_iter, &child_iter);
|
||||
gtk_tree_store_set (model, &child_child_iter, COLUMN_0, item_2->label, -1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue