projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated copyright end date to 2016
[psensor.git]
/
src
/
ui_sensorpref.c
diff --git
a/src/ui_sensorpref.c
b/src/ui_sensorpref.c
index
66315a3
..
92438ae
100644
(file)
--- a/
src/ui_sensorpref.c
+++ b/
src/ui_sensorpref.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2010-201
4
jeanfi@gmail.com
+ * Copyright (C) 2010-201
6
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
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@
-23,10
+23,10
@@
#include <cfg.h>
#include <temperature.h>
#include <ui_appindicator.h>
#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_pref.h>
#include <ui_sensorlist.h>
#include <ui_sensorpref.h>
-#include <ui_color.h>
enum {
COL_NAME = 0,
enum {
COL_NAME = 0,
@@
-54,7
+54,8
@@
static GtkSpinButton *w_sensor_low_threshold;
static GtkListStore *store;
/* 'true' when the notifications of field changes are due to the change
static GtkListStore *store;
/* 'true' when the notifications of field changes are due to the change
- * of the selected sensor. */
+ * of the selected sensor.
+ */
static bool ignore_changes;
static struct psensor *get_selected_sensor(void)
static bool ignore_changes;
static struct psensor *get_selected_sensor(void)
@@
-235,7
+236,7
@@
ui_sensorpref_alarm_high_threshold_changed_cb(GtkSpinButton *btn, gpointer data)
return;
v = gtk_spin_button_get_value(btn);
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);
v = fahrenheit_to_celsius(v);
config_set_sensor_alarm_high_threshold(s->id, v);
@@
-258,7
+259,7
@@
ui_sensorpref_alarm_low_threshold_changed_cb(GtkSpinButton *btn, gpointer data)
return;
v = gtk_spin_button_get_value(btn);
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);
v = fahrenheit_to_celsius(v);
config_set_sensor_alarm_low_threshold(s->id, v);
@@
-289,7
+290,7
@@
static void update_pref(struct psensor *s)
chip = _("Unknown");
gtk_label_set_text(w_sensor_chipname, chip);
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"));
if (s->min == UNKNOWN_DBL_VALUE)
smin = strdup(_("Unknown"));