X-Git-Url: http://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fui_sensorpref.c;h=5afd2877f50e49482b617d23c4c2b94123fe8fee;hb=9f0c3025507e5ab7cf1b5346b5cb0e0a56f01249;hp=77dba01274f01d4caf8b0eed223e135fa8f03e39;hpb=043f76c460147ef40f1b47570304eb2d1340d079;p=psensor.git diff --git a/src/ui_sensorpref.c b/src/ui_sensorpref.c index 77dba01..5afd287 100644 --- a/src/ui_sensorpref.c +++ b/src/ui_sensorpref.c @@ -51,8 +51,8 @@ struct cb_data { 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; @@ -316,7 +316,7 @@ static void on_changed(GtkTreeSelection *selection, gpointer data) 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); @@ -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); } - 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 @@ -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); - apply_pref(spref, i, cfg); + apply_pref(spref, i, cfg); valid = gtk_tree_model_iter_next(model, &iter); i++; }