- GtkCellRenderer *renderer;
-
- log_debug("ui_sensorlist_create()");
-
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_insert_column_with_attributes(ui->sensors_tree,
- -1,
- _("Sensor"),
- renderer,
- "text", COL_NAME, NULL);
-
- gtk_tree_view_insert_column_with_attributes(ui->sensors_tree,
- -1,
- _("Value"),
- renderer,
- "text", COL_TEMP, NULL);
-
- gtk_tree_view_insert_column_with_attributes(ui->sensors_tree,
- -1,
- _("Min"),
- renderer,
- "text", COL_TEMP_MIN, NULL);
-
- gtk_tree_view_insert_column_with_attributes(ui->sensors_tree,
- -1,
- _("Max"),
- renderer,
- "text", COL_TEMP_MAX, NULL);
-
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_insert_column_with_attributes(ui->sensors_tree,
- -1,
- _("Color"),
- renderer,
- "text", COL_COLOR,
- "background", COL_COLOR_STR,
- NULL);
+ GtkTreeModel *fmodel, *model;
+
+ log_fct_enter();
+
+ model = gtk_tree_view_get_model(ui->sensors_tree);
+ fmodel = gtk_tree_model_filter_new(model, NULL);
+ gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(fmodel),
+ COL_DISPLAY_ENABLED);
+
+ gtk_tree_view_set_model(ui->sensors_tree, fmodel);