+ if (s->min == UNKNOWN_DBL_VALUE)
+ smin = strdup(_("Unknown"));
+ else
+ smin = psensor_value_to_str(s->type, s->min, use_celsius);
+
+ gtk_label_set_text(w_sensor_min, smin);
+ free(smin);
+
+ if (s->max == UNKNOWN_DBL_VALUE)
+ smax = strdup(_("Unknown"));
+ else
+ smax = psensor_value_to_str(s->type, s->max, use_celsius);
+ gtk_label_set_text(w_sensor_max, smax);
+ free(smax);
+
+ gtk_toggle_button_set_active(w_sensor_draw,
+ config_is_sensor_graph_enabled(s->id));
+
+ gtk_toggle_button_set_active(w_sensor_display,
+ config_is_sensor_enabled(s->id));
+
+ color = config_get_sensor_color(s->id);
+ gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(w_sensor_color), color);
+ gdk_rgba_free(color);
+
+ gtk_label_set_text(w_sensor_high_threshold_unit,
+ psensor_type_to_unit_str(s->type, use_celsius));
+ gtk_label_set_text(w_sensor_low_threshold_unit,
+ psensor_type_to_unit_str(s->type, use_celsius));
+
+ if (is_appindicator_supported()) {
+ gtk_widget_set_has_tooltip
+ (GTK_WIDGET(w_appindicator_label_enabled), FALSE);
+ gtk_widget_set_has_tooltip
+ (GTK_WIDGET(w_appindicator_enabled), FALSE);
+ } else {
+ gtk_widget_set_sensitive
+ (GTK_WIDGET(w_appindicator_label_enabled), FALSE);
+ gtk_widget_set_has_tooltip
+ (GTK_WIDGET(w_appindicator_label_enabled), TRUE);
+ gtk_widget_set_sensitive
+ (GTK_WIDGET(w_appindicator_enabled), FALSE);
+ gtk_widget_set_has_tooltip
+ (GTK_WIDGET(w_appindicator_enabled), TRUE);
+ }
+
+ gtk_toggle_button_set_active(w_sensor_alarm,
+ config_get_sensor_alarm_enabled(s->id));
+
+ threshold = s->alarm_high_threshold;
+ if (!use_celsius)
+ threshold = celsius_to_fahrenheit(threshold);
+ gtk_spin_button_set_value(w_sensor_high_threshold, threshold);