#include <cfg.h>
#include <temperature.h>
#include <ui_appindicator.h>
+#include <ui_color.h>
#include <ui_pref.h>
#include <ui_sensorlist.h>
#include <ui_sensorpref.h>
-#include <ui_color.h>
enum {
COL_NAME = 0,
static GtkSpinButton *w_sensor_low_threshold;
static GtkListStore *store;
-
/* 'true' when the notifications of field changes are due to the change
* of the selected sensor. */
static bool ignore_changes;
return;
v = gtk_spin_button_get_value(btn);
- if (config_get_sensor_unit() == FAHRENHEIT)
+ if (config_get_temperature_unit() == FAHRENHEIT)
v = fahrenheit_to_celsius(v);
config_set_sensor_alarm_high_threshold(s->id, v);
return;
v = gtk_spin_button_get_value(btn);
- if (config_get_sensor_unit() == FAHRENHEIT)
+ if (config_get_temperature_unit() == FAHRENHEIT)
v = fahrenheit_to_celsius(v);
config_set_sensor_alarm_low_threshold(s->id, v);
chip = _("Unknown");
gtk_label_set_text(w_sensor_chipname, chip);
- use_celsius = config_get_sensor_unit() == CELSIUS ? 1 : 0;
+ use_celsius = config_get_temperature_unit() == CELSIUS ? 1 : 0;
if (s->min == UNKNOWN_DBL_VALUE)
smin = strdup(_("Unknown"));
gtk_toggle_button_set_active(w_sensor_alarm,
config_get_sensor_alarm_enabled(s->id));
- threshold = config_get_sensor_alarm_high_threshold(s->id);
+ threshold = s->alarm_high_threshold;
if (!use_celsius)
threshold = celsius_to_fahrenheit(threshold);
gtk_spin_button_set_value(w_sensor_high_threshold, threshold);
- threshold = config_get_sensor_alarm_low_threshold(s->id);
+ threshold = s->alarm_low_threshold;
if (!use_celsius)
threshold = celsius_to_fahrenheit(threshold);
gtk_spin_button_set_value(w_sensor_low_threshold, threshold);