p->alarm_enabled = s->alarm_enabled;
p->color = color_dup(s->color);
- if (cfg->temperature_unit == CELCIUS) {
+ if (cfg->temperature_unit == CELSIUS) {
p->alarm_high_threshold = s->alarm_high_threshold;
p->alarm_low_threshold = s->alarm_low_threshold;
} else {
p->alarm_high_threshold
- = celcius_to_fahrenheit(s->alarm_high_threshold);
+ = celsius_to_fahrenheit(s->alarm_high_threshold);
p->alarm_low_threshold
- = celcius_to_fahrenheit(s->alarm_low_threshold);
+ = celsius_to_fahrenheit(s->alarm_low_threshold);
}
p->appindicator_enabled = s->appindicator_enabled;
GtkSpinButton *w_high_threshold, *w_low_threshold;
GdkColor *color;
struct psensor *s;
- int use_celcius;
+ int use_celsius;
s = p->sensor;
(builder,
"sensor_alarm_low_threshold_unit"));
- use_celcius = cfg->temperature_unit == CELCIUS ? 1 : 0;
+ use_celsius = cfg->temperature_unit == CELSIUS ? 1 : 0;
gtk_label_set_text(w_high_threshold_unit,
psensor_type_to_unit_str(s->type,
- use_celcius));
+ use_celsius));
gtk_label_set_text(w_low_threshold_unit,
psensor_type_to_unit_str(s->type,
- use_celcius));
+ use_celsius));
w_appindicator_enabled = GTK_TOGGLE_BUTTON
(gtk_builder_get_object(builder, "indicator_checkbox"));
w_appindicator_label_enabled = GTK_TOGGLE_BUTTON
(gtk_builder_get_object(builder, "indicator_label_checkbox"));
-
if (is_temp_type(s->type) || is_fan_type(s->type)) {
gtk_toggle_button_set_active(w_alarm, p->alarm_enabled);
gtk_spin_button_set_value(w_high_threshold,
if (is_temp_type(s->type) && cfg->temperature_unit == FAHRENHEIT) {
s->alarm_high_threshold
- = fahrenheit_to_celcius(p->alarm_high_threshold);
+ = fahrenheit_to_celsius(p->alarm_high_threshold);
s->alarm_low_threshold
- = fahrenheit_to_celcius(p->alarm_low_threshold);
+ = fahrenheit_to_celsius(p->alarm_low_threshold);
} else {
s->alarm_high_threshold = p->alarm_high_threshold;
s->alarm_low_threshold = p->alarm_low_threshold;
valid = gtk_tree_model_iter_next(model, &iter);
i++;
}
+ config_sync();
}
void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui)