- w_temp_limit
- = GTK_SPIN_BUTTON(gtk_builder_get_object(builder,
- "sensor_temp_limit"));
-
- if (is_temp_type(s->type)) {
+ w_high_threshold = GTK_SPIN_BUTTON(gtk_builder_get_object
+ (builder,
+ "sensor_alarm_high_threshold"));
+ w_low_threshold = GTK_SPIN_BUTTON(gtk_builder_get_object
+ (builder,
+ "sensor_alarm_low_threshold"));
+
+ w_high_threshold_unit = GTK_LABEL(gtk_builder_get_object
+ (builder,
+ "sensor_alarm_high_threshold_unit"));
+ w_low_threshold_unit = GTK_LABEL(gtk_builder_get_object
+ (builder,
+ "sensor_alarm_low_threshold_unit"));
+
+ use_celcius = cfg->temperature_unit == CELCIUS ? 1 : 0;
+ gtk_label_set_text(w_high_threshold_unit,
+ psensor_type_to_unit_str(s->type,
+ use_celcius));
+ gtk_label_set_text(w_low_threshold_unit,
+ psensor_type_to_unit_str(s->type,
+ use_celcius));
+
+ w_appindicator_enabled = GTK_TOGGLE_BUTTON
+ (gtk_builder_get_object(builder, "indicator_checkbox"));
+
+ if (is_temp_type(s->type) || is_fan_type(s->type)) {