regenerated
[psensor.git] / src / ui_sensorpref.c
index 1b7ee16..4337c53 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
@@ -60,7 +60,7 @@ sensor_pref_new(struct psensor *s, struct config *cfg)
 
        p->sensor = s;
        p->name = strdup(s->name);
-       p->enabled = s->enabled;
+       p->enabled = s->graph_enabled;
        p->alarm_enabled = s->alarm_enabled;
        p->color = color_dup(s->color);
 
@@ -352,9 +352,9 @@ static void apply_pref(struct sensor_pref *p, int pos, struct config *cfg)
                config_set_sensor_name(s->id, s->name);
        }
 
-       if (s->enabled != p->enabled) {
-               s->enabled = p->enabled;
-               config_set_sensor_enabled(s->id, s->enabled);
+       if (s->graph_enabled != p->enabled) {
+               s->graph_enabled = p->enabled;
+               config_set_sensor_enabled(s->id, s->graph_enabled);
        }
 
        if (is_temp_type(s->type) && cfg->temperature_unit == FAHRENHEIT) {