if (p) {
gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(widget), &color);
- color_set_f(p->color, color.red, color.green, color.blue);
+ color_set(p->color, color.red, color.green, color.blue);
}
}
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,
- p->alarm_high_threshold);
- gtk_spin_button_set_value(w_low_threshold,
- p->alarm_low_threshold);
- gtk_widget_set_sensitive(GTK_WIDGET(w_alarm), TRUE);
- gtk_widget_set_sensitive(GTK_WIDGET(w_high_threshold), TRUE);
- gtk_widget_set_sensitive(GTK_WIDGET(w_low_threshold), TRUE);
- } else {
- gtk_toggle_button_set_active(w_alarm, 0);
- gtk_spin_button_set_value(w_high_threshold, 0);
- gtk_spin_button_set_value(w_low_threshold, 0);
- gtk_widget_set_sensitive(GTK_WIDGET(w_alarm), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(w_high_threshold), FALSE);
- gtk_widget_set_sensitive(GTK_WIDGET(w_low_threshold), FALSE);
- }
+ gtk_toggle_button_set_active(w_alarm, p->alarm_enabled);
+ gtk_spin_button_set_value(w_high_threshold, p->alarm_high_threshold);
+ gtk_spin_button_set_value(w_low_threshold, p->alarm_low_threshold);
+ gtk_widget_set_sensitive(GTK_WIDGET(w_alarm), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(w_high_threshold), TRUE);
+ gtk_widget_set_sensitive(GTK_WIDGET(w_low_threshold), TRUE);
gtk_toggle_button_set_active(w_appindicator_enabled,
p->appindicator_enabled);
config_set_sensor_alarm_enabled(s->id, s->alarm_enabled);
}
- color_set(s->color, p->color->red, p->color->green, p->color->blue);
+ color_set(s->color,
+ p->color->red,
+ p->color->green,
+ p->color->blue);
config_set_sensor_color(s->id, s->color);
if (s->appindicator_enabled != p->appindicator_enabled) {