updated copyright end date to 2013
[psensor.git] / src / ui_sensorlist.c
index f02730e..1a0aa83 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2013 jeanfi@gmail.com
+ * Copyright (C) 2010-2014 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -80,7 +80,7 @@ static void populate(struct ui_psensor *ui)
                gtk_list_store_set(store, &iter,
                                   COL_NAME, s->name,
                                   COL_COLOR_STR, scolor,
-                                  COL_ENABLED, s->enabled,
+                                  COL_ENABLED, s->graph_enabled,
                                   COL_SENSOR, s,
                                   -1);
                free(scolor);
@@ -243,7 +243,8 @@ static int clicked_cbk(GtkWidget *widget, GdkEventButton *event, gpointer data)
 
                if (coli == COL_COLOR) {
                        if (ui_change_color(_("Select foreground color"),
-                                           s->color)) {
+                                           s->color,
+                                           GTK_WINDOW(ui->main_window))) {
                                ui_sensorlist_update(ui, 1);
                                config_set_sensor_color(s->id, s->color);
                        }
@@ -275,11 +276,11 @@ toggled_cbk(GtkCellRendererToggle *cell, gchar *path_str, gpointer data)
 
        gtk_tree_model_get(model, &iter, COL_SENSOR, &s, -1);
 
-       s->enabled ^= 1;
-       config_set_sensor_enabled(s->id, s->enabled);
+       s->graph_enabled ^= 1;
+       config_set_sensor_enabled(s->id, s->graph_enabled);
 
        gtk_list_store_set(GTK_LIST_STORE(model), &iter,
-                          COL_ENABLED, s->enabled, -1);
+                          COL_ENABLED, s->graph_enabled, -1);
 
        gtk_tree_path_free(path);
 }