fixed UI freeze on Ubuntu Lucid when 'sensor preferences' is selected with applicatio...
authorJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 25 May 2011 17:36:58 +0000 (17:36 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Wed, 25 May 2011 17:36:58 +0000 (17:36 +0000)
NEWS
configure.ac
src/ui_appindicator.c

diff --git a/NEWS b/NEWS
index 36c7b09..fa2c5a7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+* v0.6.2.9
+
+** psensor: fixed UI freeze on Ubuntu Lucid when 'sensor preferences'
+   is selected with application indicator.
+
 * v0.6.2.8
 
 ** psensor: escaped - in manpage.
index 01e5ca5..e1a85f5 100644 (file)
@@ -77,7 +77,7 @@ AC_SUBST(LIBNOTIFY_LIBS)
 # Checks AppIndicator 
 APPINDICATOR_LIBS=
 PKG_CHECK_MODULES(APPINDICATOR, 
-     appindicator-0.1 = 0.2.9 , 
+     appindicator-0.1 <= 0.2.9 , 
      [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator 0.2.9])
       AC_DEFINE([HAVE_APPINDICATOR_029],[1],[Use AppIndicator 0.2.9])
      ],
index 153046e..c02b666 100644 (file)
@@ -63,8 +63,16 @@ 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 const char *menu_desc =