WIP: simplifications in add_columns(): gtk_cell_renderer_toggle_new() replaced by 'text'
This commit is contained in:
parent
f0b8b70bfb
commit
dd37063fff
|
@ -147,20 +147,13 @@ add_columns (GtkTreeView *treeview)
|
||||||
{
|
{
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
|
|
||||||
/* column for item_1 names */
|
renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
renderer = gtk_cell_renderer_text_new ();
|
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
|
||||||
|
|
||||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), -1,
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), -1,
|
||||||
"Col 0", renderer, "text", COLUMN_0, NULL);
|
"Col 0", renderer, "text", COLUMN_0, NULL);
|
||||||
|
|
||||||
/* AA column */
|
renderer = gtk_cell_renderer_text_new (); g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)COLUMN_1);
|
|
||||||
|
|
||||||
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), -1,
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview), -1,
|
||||||
"Col 1", renderer, "active", COLUMN_1, "visible", VISIBLE_COLUMN, "activatable", WORLD_COLUMN, NULL);
|
"Col 1", renderer, "active", COLUMN_1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
|
|
Loading…
Reference in New Issue