WIP: simplifications removing COLUMN_1 (ok)

This commit is contained in:
Jean Sirmai 2023-12-15 21:49:58 +01:00
parent 8891d5adfe
commit cdc891823f
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 3 additions and 6 deletions

View File

@ -49,14 +49,14 @@ struct _TreeItem
enum enum
{ {
COLUMN_0, COLUMN_0,
COLUMN_1,
NUM_COLUMNS NUM_COLUMNS
}; };
/* tree data */ /* tree data */
static TreeItem D[] = {{ "I", NULL }, { "J", NULL }, { "K", NULL }, { NULL }};
static TreeItem C[] = {{ "H", NULL }, { NULL }}; static TreeItem C[] = {{ "H", NULL }, { NULL }};
static TreeItem A[] = {{ "C", C }, { "D", NULL }, { NULL }};
static TreeItem B[] = {{ "E", NULL }, { "F", NULL }, { "G", NULL }, { NULL }}; static TreeItem B[] = {{ "E", NULL }, { "F", NULL }, { "G", NULL }, { NULL }};
static TreeItem A[] = {{ "C", C }, { "D", D }, { NULL }};
static TreeItem R[] = {{ "A", A }, { "B", B }, { NULL }}; static TreeItem R[] = {{ "A", A }, { "B", B }, { NULL }};
@ -69,8 +69,7 @@ create_model (void)
/* create tree store */ /* create tree store */
model = gtk_tree_store_new (NUM_COLUMNS, model = gtk_tree_store_new (NUM_COLUMNS,
G_TYPE_STRING, G_TYPE_STRING);
G_TYPE_BOOLEAN);
/* add data to the tree store */ /* add data to the tree store */
while (item_0->label) while (item_0->label)
@ -80,7 +79,6 @@ create_model (void)
gtk_tree_store_append (model, &iter, NULL); gtk_tree_store_append (model, &iter, NULL);
gtk_tree_store_set (model, &iter, gtk_tree_store_set (model, &iter,
COLUMN_0, item_0->label, COLUMN_0, item_0->label,
COLUMN_1, item_1->label,
-1); -1);
/* add children */ /* add children */
@ -91,7 +89,6 @@ create_model (void)
gtk_tree_store_append (model, &child_iter, &iter); gtk_tree_store_append (model, &child_iter, &iter);
gtk_tree_store_set (model, &child_iter, gtk_tree_store_set (model, &child_iter,
COLUMN_0, item_1->label, COLUMN_0, item_1->label,
COLUMN_1, item_1->label,
-1); -1);
item_1++; item_1++;