fixed 'appindicator enabled' option not working correctly
authorJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 29 Aug 2012 01:15:10 +0000 (01:15 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 29 Aug 2012 01:15:10 +0000 (01:15 +0000)
for cpu usage. The option was inversed each it is displayed in the
preference dialog.

NEWS
src/ui_sensorpref.c

diff --git a/NEWS b/NEWS
index 3d7bed0..ed673d0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@
 ** added Spanish translation from LP (Javier
    buik8roadmaster@hotmail.com).
 ** psensor-server: added sensors log file (--sensor-log-file).
+** psensor: fixed 'appindicator enabled' option not working correctly
+   for cpu usage. The option was inversed each it is displayed in the
+   preference dialog.
 
 * v0.7.0.3
 
index 0d7649f..a015c5e 100644 (file)
@@ -354,8 +354,6 @@ update_pref(struct psensor *s,
                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);
        } else {
                gtk_toggle_button_set_active(w_alarm, 0);
                gtk_spin_button_set_value(w_high_threshold, 0);
@@ -363,9 +361,11 @@ update_pref(struct psensor *s,
                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_appindicator_enabled,
-                                            !p->appindicator_enabled);
        }
+
+       gtk_toggle_button_set_active(w_appindicator_enabled,
+                                    p->appindicator_enabled);
+
 }
 
 static void on_changed(GtkTreeSelection *selection, gpointer data)