avoid to mix code/decl
[psensor.git] / src / ui_appindicator.c
index c8887c2..bccdf9b 100644 (file)
@@ -47,31 +47,15 @@ void cb_menu_show(GtkMenuItem *mi, gpointer data)
 
 void ui_appindicator_cb_preferences(GtkMenuItem *mi, gpointer data)
 {
-#ifdef HAVE_APPINDICATOR_029
-       gdk_threads_enter();
-#endif
-
        ui_pref_dialog_run((struct ui_psensor *)data);
-
-#ifdef HAVE_APPINDICATOR_029
-       gdk_threads_leave();
-#endif
 }
 
 void ui_appindicator_cb_sensor_preferences(GtkMenuItem *mi, gpointer data)
 {
        struct ui_psensor *ui = data;
 
-#ifdef HAVE_APPINDICATOR_029
-       gdk_threads_enter();
-#endif
-
        if (ui->sensors && *ui->sensors)
                ui_sensorpref_dialog_run(*ui->sensors, ui);
-
-#ifdef HAVE_APPINDICATOR_029
-       gdk_threads_leave();
-#endif
 }
 
 static void
@@ -96,7 +80,7 @@ static void update_menu_items(int use_celsius)
        GtkMenuItem **m;
 
        if (!sensors)
-               return ;
+               return;
 
        for (s = sensors, m = menu_items; *s; s++, m++)
                update_menu_item(*m, *s, use_celsius);
@@ -199,9 +183,9 @@ static void update_label(struct ui_psensor *ui)
 
                        if (is_temp_type((*p)->type))
                                str = "999UUU";
-                       else if (is_fan_type((*p)->type))
+                       else if ((*p)->type & SENSOR_TYPE_RPM)
                                str = "999UUU";
-                       else /* cpu load */
+                       else /* percent */
                                str = "999%";
 
                        if (guide == NULL) {