WIP: simplifications removing the so called 'VISIBLE_COLUMN'
This commit is contained in:
parent
cfc2db00d0
commit
8cc77af4f5
|
@ -43,7 +43,7 @@ struct _TreeItem
|
||||||
{
|
{
|
||||||
const char *label;
|
const char *label;
|
||||||
gboolean AA;
|
gboolean AA;
|
||||||
gboolean CC;
|
// gboolean CC;
|
||||||
TreeItem *children;
|
TreeItem *children;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,41 +53,30 @@ enum
|
||||||
COLUMN_0,
|
COLUMN_0,
|
||||||
COLUMN_1,
|
COLUMN_1,
|
||||||
|
|
||||||
VISIBLE_COLUMN,
|
// VISIBLE_COLUMN,
|
||||||
// WORLD_COLUMN,
|
|
||||||
NUM_COLUMNS
|
NUM_COLUMNS
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tree data */
|
/* tree data */
|
||||||
static TreeItem item_name_0[] =
|
static TreeItem item_name_0[] =
|
||||||
{
|
{
|
||||||
{ "A", TRUE, TRUE, NULL },
|
{ "A", TRUE, NULL },
|
||||||
{ "B", FALSE, TRUE, NULL },
|
{ "B", FALSE, NULL },
|
||||||
{ "C", FALSE, TRUE, NULL },
|
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static TreeItem item_name_1[] =
|
static TreeItem item_name_1[] =
|
||||||
{
|
{
|
||||||
{ "A", FALSE, TRUE, NULL },
|
{ "A", FALSE, NULL },
|
||||||
{ "B", TRUE, FALSE, NULL },
|
{ "B", TRUE, NULL },
|
||||||
{ "C", FALSE, TRUE, NULL },
|
{ "C", FALSE, NULL },
|
||||||
{ "D", FALSE, TRUE, NULL },
|
|
||||||
{ NULL }
|
|
||||||
};
|
|
||||||
|
|
||||||
static TreeItem item_name_2[] =
|
|
||||||
{
|
|
||||||
{ "A", FALSE, FALSE, NULL },
|
|
||||||
{ "B", FALSE, TRUE, NULL },
|
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static TreeItem root[] =
|
static TreeItem root[] =
|
||||||
{
|
{
|
||||||
{ "IT-0", FALSE, FALSE, item_name_0 },
|
{ "IT-0", FALSE, item_name_0 },
|
||||||
{ "IT-1", FALSE, FALSE, item_name_1 },
|
{ "IT-1", FALSE, item_name_1 },
|
||||||
{ "IT-2", FALSE, FALSE, item_name_2 },
|
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,8 +105,7 @@ create_model (void)
|
||||||
gtk_tree_store_set (model, &iter,
|
gtk_tree_store_set (model, &iter,
|
||||||
COLUMN_0, item_0->label,
|
COLUMN_0, item_0->label,
|
||||||
COLUMN_1, FALSE,
|
COLUMN_1, FALSE,
|
||||||
VISIBLE_COLUMN, FALSE,
|
// VISIBLE_COLUMN, FALSE,
|
||||||
// WORLD_COLUMN, FALSE,
|
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
/* add children */
|
/* add children */
|
||||||
|
@ -129,8 +117,7 @@ create_model (void)
|
||||||
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->AA,
|
COLUMN_1, item_1->AA,
|
||||||
VISIBLE_COLUMN, TRUE,
|
// VISIBLE_COLUMN, TRUE,
|
||||||
// WORLD_COLUMN, item_1->CC,
|
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
item_1++;
|
item_1++;
|
||||||
|
@ -208,7 +195,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||||
/* expand all rows after the treeview widget has been realized */
|
/* expand all rows after the treeview widget has been realized */
|
||||||
g_signal_connect (treeview, "realize",
|
g_signal_connect (treeview, "realize",
|
||||||
G_CALLBACK (gtk_tree_view_expand_all), NULL);
|
G_CALLBACK (gtk_tree_view_expand_all), NULL);
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, 350);
|
gtk_window_set_default_size (GTK_WINDOW (window), 200, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|
Loading…
Reference in New Issue