WIP: simplifications in add_columns(): gtk_cell_renderer_toggle_new() replaced by 'text'

This commit is contained in:
Jean Sirmai 2023-12-15 10:18:09 +01:00
parent f0b8b70bfb
commit dd37063fff
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 3 additions and 10 deletions

View File

@ -147,20 +147,13 @@ add_columns (GtkTreeView *treeview)
{
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,
"Col 0", renderer, "text", COLUMN_0, NULL);
/* AA column */
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);
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,
"Col 1", renderer, "active", COLUMN_1, "visible", VISIBLE_COLUMN, "activatable", WORLD_COLUMN, NULL);
"Col 1", renderer, "active", COLUMN_1, NULL);
}
GtkWidget *