projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
style
[psensor.git]
/
src
/
ui_sensorpref.c
diff --git
a/src/ui_sensorpref.c
b/src/ui_sensorpref.c
index
77dba01
..
5afd287
100644
(file)
--- a/
src/ui_sensorpref.c
+++ b/
src/ui_sensorpref.c
@@
-51,8
+51,8
@@
struct cb_data {
GtkBuilder *builder;
};
GtkBuilder *builder;
};
-static struct sensor_pref *
sensor_pref_new(struct psensor *s,
-
struct config *cfg)
+static struct sensor_pref *
+
sensor_pref_new(struct psensor *s,
struct config *cfg)
{
struct sensor_pref *p;
{
struct sensor_pref *p;
@@
-316,7
+316,7
@@
static void on_changed(GtkTreeSelection *selection, gpointer data)
struct ui_psensor *ui = cbdata->ui;
struct sensor_pref *p;
GtkTreeView *tree;
struct ui_psensor *ui = cbdata->ui;
struct sensor_pref *p;
GtkTreeView *tree;
-
+
tree = GTK_TREE_VIEW(gtk_builder_get_object(cbdata->builder,
"sensors_list"));
p = get_selected_sensor_pref(tree);
tree = GTK_TREE_VIEW(gtk_builder_get_object(cbdata->builder,
"sensors_list"));
p = get_selected_sensor_pref(tree);
@@
-365,8
+365,7
@@
static void apply_pref(struct sensor_pref *p, int pos, struct config *cfg)
config_set_sensor_enabled(s->id, s->enabled);
}
config_set_sensor_enabled(s->id, s->enabled);
}
- if (is_temp_type(s->type)
- && cfg->temperature_unit == FAHRENHEIT) {
+ if (is_temp_type(s->type) && cfg->temperature_unit == FAHRENHEIT) {
s->alarm_high_threshold
= fahrenheit_to_celcius(p->alarm_high_threshold);
s->alarm_low_threshold
s->alarm_high_threshold
= fahrenheit_to_celcius(p->alarm_high_threshold);
s->alarm_low_threshold
@@
-407,7
+406,7
@@
apply_prefs(GtkTreeModel *model, struct config *cfg)
i = 0;
while (valid) {
gtk_tree_model_get(model, &iter, COL_SENSOR, &spref, -1);
i = 0;
while (valid) {
gtk_tree_model_get(model, &iter, COL_SENSOR, &spref, -1);
- apply_pref(spref, i, cfg);
+ apply_pref(spref, i, cfg);
valid = gtk_tree_model_iter_next(model, &iter);
i++;
}
valid = gtk_tree_model_iter_next(model, &iter);
i++;
}