From: Jean-Philippe Orsini Date: Wed, 25 May 2011 17:36:58 +0000 (+0000) Subject: fixed UI freeze on Ubuntu Lucid when 'sensor preferences' is selected with applicatio... X-Git-Tag: v0.8.0.5~758 X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=eb66ac041311800f050c4da845f4e98a97f654cb fixed UI freeze on Ubuntu Lucid when 'sensor preferences' is selected with application indicator. --- diff --git a/NEWS b/NEWS index 36c7b09..fa2c5a7 100644 --- 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. diff --git a/configure.ac b/configure.ac index 01e5ca5..e1a85f5 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) ], diff --git a/src/ui_appindicator.c b/src/ui_appindicator.c index 153046e..c02b666 100644 --- a/src/ui_appindicator.c +++ b/src/ui_appindicator.c @@ -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 =