Added tooltip explaining why a setting is not available
[psensor.git] / src / ui_sensorpref.c
index 6ca0815..76a90ea 100644 (file)
@@ -290,6 +290,20 @@ update_pref(struct sensor_pref *p, struct config *cfg, GtkBuilder *builder)
        w_appindicator_label_enabled = GTK_TOGGLE_BUTTON
                (gtk_builder_get_object(builder, "indicator_label_checkbox"));
 
+
+#if !HAVE_APPINDICATOR && !HAVE_APPINDICATOR_029
+       gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_label_enabled),
+                                FALSE);
+       gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_enabled), FALSE);
+       gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_label_enabled),
+                                  TRUE);
+       gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_enabled), TRUE);
+#else
+       gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_label_enabled),
+                                  FALSE);
+       gtk_widget_set_has_tooltip(GTK_WIDGET(w_appindicator_enabled), FALSE);
+#endif
+
        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);