removed support of appindicator <3.0
authorJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 23 Sep 2014 19:43:00 +0000 (21:43 +0200)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Tue, 23 Sep 2014 19:43:00 +0000 (21:43 +0200)
14 files changed:
NEWS
NEWS.html
README
README.html
config.h.in
configure
configure.ac
po/Makefile.in
src/main.c
src/ui.h
src/ui_appindicator.c
src/ui_appindicator.h
src/ui_pref.c
src/ui_sensorpref.c

diff --git a/NEWS b/NEWS
index b918701..2218be0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,11 @@
 Psensor NEWS
 ============
 
+v1.1.3
+
+* Added tooltip explaining why a setting is not available.
+* Removed support of old AppIndicator library < 3.0.
+
 v1.1.2
 ------
 
index 48e7c55..843a5a4 100644 (file)
--- a/NEWS.html
+++ b/NEWS.html
@@ -380,6 +380,23 @@ asciidoc.install();
 <h1>Psensor NEWS</h1>\r
 </div>\r
 <div id="content">\r
+<div id="preamble">\r
+<div class="sectionbody">\r
+<div class="paragraph"><p>v1.1.3</p></div>\r
+<div class="ulist"><ul>\r
+<li>\r
+<p>\r
+Added tooltip explaining why a setting is not available.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+Removed support of old AppIndicator library &lt; 3.0.\r
+</p>\r
+</li>\r
+</ul></div>\r
+</div>\r
+</div>\r
 <div class="sect1">\r
 <h2 id="_v1_1_2">v1.1.2</h2>\r
 <div class="sectionbody">\r
@@ -2851,7 +2868,7 @@ Fixed BR1: crash when no temperature sensor is available
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2014-09-20 08:53:43 CEST\r
+Last updated 2014-09-23 10:59:34 CEST\r
 </div>\r
 </div>\r
 </body>\r
diff --git a/README b/README
index c1d3c70..3b50a77 100644 (file)
--- a/README
+++ b/README
@@ -121,7 +121,7 @@ The compilation of +psensor+ requires:
    faq)
  * cppcheck (optional, static source checker)
  * library libnotify (optional)
- * library libappindicator (optional)
+ * library libappindicator >= 3.0 (optional)
  * library libXNVCtrl (optional)
  * library json-c >= 0.11.99 and curl (optional, required for remote monitoring)
  * library unity (>=v3.4.2, optional)
index a1942e9..0c81380 100644 (file)
@@ -403,12 +403,18 @@ the temperature of the NVidia GPUs (using XNVCtrl).
 </li>\r
 <li>\r
 <p>\r
-the temperature of the Hard Disk Drives (using hddtemp or libatasmart).\r
+the temperature of ATI GPUs (using ATI ADL SDK).\r
 </p>\r
 </li>\r
 <li>\r
 <p>\r
-the rotation speed of the fans (using lm-sensors).\r
+the temperature of the Hard Disk Drives (using hddtemp, libatasmart\r
+   or udisks2).\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+the rotation speed of the fans.\r
 </p>\r
 </li>\r
 <li>\r
@@ -418,7 +424,7 @@ the temperature of a remote computer.
 </li>\r
 <li>\r
 <p>\r
-the cpu load.\r
+the CPU load.\r
 </p>\r
 </li>\r
 </ul></div>\r
@@ -569,7 +575,7 @@ library libnotify (optional)
 </li>\r
 <li>\r
 <p>\r
-library libappindicator (optional)\r
+library libappindicator &gt;= 3.0 (optional)\r
 </p>\r
 </li>\r
 <li>\r
@@ -597,6 +603,11 @@ library gtop2 (optional, required for CPU usage)
 library atasmart (optional, for disk monitoring)\r
 </p>\r
 </li>\r
+<li>\r
+<p>\r
+library udisk2 (optional, for disk monitoring)\r
+</p>\r
+</li>\r
 </ul></div>\r
 <div class="paragraph"><p>The specific requirements for <code>psensor-server</code>:</p></div>\r
 <div class="ulist"><ul>\r
@@ -644,11 +655,6 @@ been found.
 </li>\r
 <li>\r
 <p>\r
-To monitor HDDs, the <code>hddtemp</code> daemon must be installed and running.\r
-</p>\r
-</li>\r
-<li>\r
-<p>\r
 Run: <code>psensor</code>\r
 </p>\r
 </li>\r
@@ -681,7 +687,7 @@ have extracted the ATI ADL SDK. Other steps are indentical.</p></div>
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2014-08-23 13:50:12 CEST\r
+Last updated 2014-09-23 11:04:49 CEST\r
 </div>\r
 </div>\r
 </body>\r
index 8d62e31..4021bfd 100644 (file)
@@ -7,12 +7,9 @@
 /* Define to 1 if you have the <adl_defines.h> header file. */
 #undef HAVE_ADL_DEFINES_H
 
-/* Use AppIndicator > 0.2.9 */
+/* Use AppIndicator3-0.1 */
 #undef HAVE_APPINDICATOR
 
-/* Use AppIndicator 0.2.9 */
-#undef HAVE_APPINDICATOR_029
-
 /* Use libatasmart */
 #undef HAVE_ATASMART
 
index 98bd186..5a98181 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for psensor 1.1.2.
+# Generated by GNU Autoconf 2.69 for psensor 1.1.0.x.
 #
 # Report bugs to <jeanfi@gmail.com>.
 #
@@ -580,8 +580,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='psensor'
 PACKAGE_TARNAME='psensor'
-PACKAGE_VERSION='1.1.2'
-PACKAGE_STRING='psensor 1.1.2'
+PACKAGE_VERSION='1.1.0.x'
+PACKAGE_STRING='psensor 1.1.0.x'
 PACKAGE_BUGREPORT='jeanfi@gmail.com'
 PACKAGE_URL='http://wpitchoune.net/psensor'
 
@@ -1404,7 +1404,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures psensor 1.1.2 to adapt to many kinds of systems.
+\`configure' configures psensor 1.1.0.x to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1478,7 +1478,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of psensor 1.1.2:";;
+     short | recursive ) echo "Configuration of psensor 1.1.0.x:";;
    esac
   cat <<\_ACEOF
 
@@ -1628,7 +1628,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-psensor configure 1.1.2
+psensor configure 1.1.0.x
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1930,7 +1930,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by psensor $as_me 1.1.2, which was
+It was created by psensor $as_me 1.1.0.x, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2795,7 +2795,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='psensor'
- VERSION='1.1.2'
+ VERSION='1.1.0.x'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -7678,7 +7678,6 @@ fi
 # Checks AppIndicator
 APPINDICATOR_LIBS=
 
-
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPINDICATOR" >&5
 $as_echo_n "checking for APPINDICATOR... " >&6; }
@@ -7753,166 +7752,6 @@ $as_echo "yes" >&6; }
 $as_echo "#define HAVE_APPINDICATOR 1" >>confdefs.h
 
 fi
-
-if test "$APPINDICATOR_LIBS" == ""; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPINDICATOR" >&5
-$as_echo_n "checking for APPINDICATOR... " >&6; }
-
-if test -n "$APPINDICATOR_CFLAGS"; then
-    pkg_cv_APPINDICATOR_CFLAGS="$APPINDICATOR_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator-0.1 <= 0.2.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "appindicator-0.1 <= 0.2.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_APPINDICATOR_CFLAGS=`$PKG_CONFIG --cflags "appindicator-0.1 <= 0.2.9 " 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$APPINDICATOR_LIBS"; then
-    pkg_cv_APPINDICATOR_LIBS="$APPINDICATOR_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator-0.1 <= 0.2.9 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "appindicator-0.1 <= 0.2.9 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_APPINDICATOR_LIBS=`$PKG_CONFIG --libs "appindicator-0.1 <= 0.2.9 " 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPINDICATOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "appindicator-0.1 <= 0.2.9 " 2>&1`
-        else
-               APPINDICATOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "appindicator-0.1 <= 0.2.9 " 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPINDICATOR_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: AppIndicator 0.2.9 not present\"" >&5
-$as_echo "$as_me: WARNING: AppIndicator 0.2.9 not present\"" >&2;}
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: AppIndicator 0.2.9 not present\"" >&5
-$as_echo "$as_me: WARNING: AppIndicator 0.2.9 not present\"" >&2;}
-else
-       APPINDICATOR_CFLAGS=$pkg_cv_APPINDICATOR_CFLAGS
-       APPINDICATOR_LIBS=$pkg_cv_APPINDICATOR_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_APPINDICATOR 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_APPINDICATOR_029 1" >>confdefs.h
-
-
-fi
-fi
-
-if test "$APPINDICATOR_LIBS" == ""; then
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPINDICATOR" >&5
-$as_echo_n "checking for APPINDICATOR... " >&6; }
-
-if test -n "$APPINDICATOR_CFLAGS"; then
-    pkg_cv_APPINDICATOR_CFLAGS="$APPINDICATOR_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator-0.1 > 0.2.9\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "appindicator-0.1 > 0.2.9") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_APPINDICATOR_CFLAGS=`$PKG_CONFIG --cflags "appindicator-0.1 > 0.2.9" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$APPINDICATOR_LIBS"; then
-    pkg_cv_APPINDICATOR_LIBS="$APPINDICATOR_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"appindicator-0.1 > 0.2.9\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "appindicator-0.1 > 0.2.9") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_APPINDICATOR_LIBS=`$PKG_CONFIG --libs "appindicator-0.1 > 0.2.9" 2>/dev/null`
-                     test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-               APPINDICATOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "appindicator-0.1 > 0.2.9" 2>&1`
-        else
-               APPINDICATOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "appindicator-0.1 > 0.2.9" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$APPINDICATOR_PKG_ERRORS" >&5
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"AppIndicator > 0.2.9 not present\"" >&5
-$as_echo "$as_me: WARNING: \"AppIndicator > 0.2.9 not present\"" >&2;}
-elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"AppIndicator > 0.2.9 not present\"" >&5
-$as_echo "$as_me: WARNING: \"AppIndicator > 0.2.9 not present\"" >&2;}
-else
-       APPINDICATOR_CFLAGS=$pkg_cv_APPINDICATOR_CFLAGS
-       APPINDICATOR_LIBS=$pkg_cv_APPINDICATOR_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_APPINDICATOR 1" >>confdefs.h
-
-fi
-fi
  if test -n "$APPINDICATOR_LIBS"; then
   APPINDICATOR_TRUE=
   APPINDICATOR_FALSE='#'
@@ -9364,7 +9203,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by psensor $as_me 1.1.2, which was
+This file was extended by psensor $as_me 1.1.0.x, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9431,7 +9270,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-psensor config.status 1.1.2
+psensor config.status 1.1.0.x
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index dfcd5e7..6ce3fbd 100644 (file)
@@ -104,26 +104,9 @@ AC_SUBST(LIBNOTIFY_LIBS)
 
 # Checks AppIndicator 
 APPINDICATOR_LIBS=
-
 PKG_CHECK_MODULES(APPINDICATOR, appindicator3-0.1,
      [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator3-0.1])],
      [AC_MSG_WARN(AppIndicator 3-0.1 not present")])
-
-if test "$APPINDICATOR_LIBS" == ""; then
-   PKG_CHECK_MODULES(APPINDICATOR, 
-     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])
-     ],
-     [AC_MSG_WARN(AppIndicator 0.2.9 not present")])
-fi
-
-if test "$APPINDICATOR_LIBS" == ""; then
-   PKG_CHECK_MODULES(APPINDICATOR, 
-     appindicator-0.1 > 0.2.9, 
-     [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator > 0.2.9])], 
-     [AC_MSG_WARN("AppIndicator > 0.2.9 not present")])
-fi
 AM_CONDITIONAL(APPINDICATOR, test -n "$APPINDICATOR_LIBS")
 AC_SUBST(APPINDICATOR_CFLAGS)
 AC_SUBST(APPINDICATOR_LIBS)
index 61e7857..9bee9bc 100644 (file)
@@ -11,7 +11,7 @@
 # Origin: gettext-0.16
 
 PACKAGE = psensor
-VERSION = 1.1.2
+VERSION = 1.1.0.x
 PACKAGE_BUGREPORT = jeanfi@gmail.com
 
 SHELL = /bin/sh
index 461949f..e9ac03f 100644 (file)
@@ -202,7 +202,7 @@ static void indicators_update(struct ui_psensor *ui)
                sensor_cur++;
        }
 
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
        if (is_appindicator_supported())
                ui_appindicator_update(ui, attention);
 #endif
@@ -443,7 +443,7 @@ static void cleanup(struct ui_psensor *ui)
        psensor_list_free(ui->sensors);
        ui->sensors = NULL;
 
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
        ui_appindicator_cleanup();
 #endif
 
@@ -519,7 +519,7 @@ int main(int argc, char **argv)
        pthread_t thread;
        int optc, cmdok, opti, new_instance, ret;
        char *url = NULL;
-       GtkApplication *app;
+       GApplication *app;
 
        program_name = argv[0];
 
@@ -567,12 +567,12 @@ int main(int argc, char **argv)
 
        log_init();
 
-       app = gtk_application_new("wpitchoune.psensor", G_APPLICATION_IS_SERVICE);
+       app = g_application_new("wpitchoune.psensor", 0);
 
-       printf("%d\n",g_application_register(G_APPLICATION(app), NULL, NULL));
+       g_application_register(app, NULL, NULL);
 
-       if (!new_instance && g_application_get_is_remote(G_APPLICATION(app))) {
-               g_application_activate(G_APPLICATION(app));
+       if (!new_instance && g_application_get_is_remote(app)) {
+               g_application_activate(app);
                log_warn(_("A Psensor instance already exists."));
                exit(EXIT_SUCCESS);
        }
@@ -589,17 +589,6 @@ int main(int argc, char **argv)
        g_thread_init(NULL);
 #endif
 
-#ifdef HAVE_APPINDICATOR_029
-       /* gdk_thread_enter/leave only used to workaround mutex bug
-        * of appindicator < 0.2.9, so do not call gdk_threads_init
-        * if useless. Calling this function leads to
-        * crash "Attempt to unlock mutex that was not locked" with
-        * GLib 2.41.2 (new checking) probably due to bugs in GTK
-        * itself.
-        */
-       gdk_threads_init();
-#endif
-
        gtk_init(NULL, NULL);
 
        pmutex_init(&ui.sensors_mutex);
@@ -615,7 +604,7 @@ int main(int argc, char **argv)
                              &ui.sensors_mutex,
                              config_get_slog_interval());
 
-#if !defined(HAVE_APPINDICATOR) && !defined(HAVE_APPINDICATOR_029)
+#if !defined(HAVE_APPINDICATOR)
        ui_status_init(&ui);
        ui_status_set_visible(1);
 #endif
@@ -634,7 +623,7 @@ int main(int argc, char **argv)
 
        g_timeout_add(1000 * ui.graph_update_interval, ui_refresh_thread, &ui);
 
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
        ui_appindicator_init(&ui);
 #endif
 
index af17b78..4d9076b 100644 (file)
--- a/src/ui.h
+++ b/src/ui.h
@@ -26,7 +26,7 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
 #include <libappindicator/app-indicator.h>
 #endif
 
index c25e270..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
index 1dc682e..97f5a66 100644 (file)
@@ -22,7 +22,7 @@
 #include "config.h"
 #include "ui.h"
 
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
 void ui_appindicator_init(struct ui_psensor *ui);
 void ui_appindicator_update(struct ui_psensor *ui, unsigned int attention);
 void ui_appindicator_update_menu(struct ui_psensor *ui);
index cae40f2..1eda597 100644 (file)
@@ -144,7 +144,7 @@ void ui_pref_dialog_run(struct ui_psensor *ui)
        gtk_toggle_button_set_active(w_enable_launcher_counter,
                                     !cfg->unity_launcher_count_disabled);
 
-#if !HAVE_APPINDICATOR && !HAVE_APPINDICATOR_029
+#if !HAVE_UNITY
        gtk_widget_set_sensitive(GTK_WIDGET(w_enable_launcher_counter), FALSE);
        gtk_widget_set_has_tooltip(GTK_WIDGET(w_enable_launcher_counter), TRUE);
 #else
index 76a90ea..a5b5123 100644 (file)
@@ -27,9 +27,8 @@
 #include <ui_sensorpref.h>
 #include <ui_color.h>
 
-
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
-#include "ui_appindicator.h"
+#if defined(HAVE_APPINDICATOR)
+#include <ui_appindicator.h>
 #endif
 
 enum {
@@ -291,7 +290,7 @@ update_pref(struct sensor_pref *p, struct config *cfg, GtkBuilder *builder)
                (gtk_builder_get_object(builder, "indicator_label_checkbox"));
 
 
-#if !HAVE_APPINDICATOR && !HAVE_APPINDICATOR_029
+#if !HAVE_APPINDICATOR
        gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_label_enabled),
                                 FALSE);
        gtk_widget_set_sensitive(GTK_WIDGET(w_appindicator_enabled), FALSE);
@@ -496,7 +495,7 @@ void ui_sensorpref_dialog_run(struct psensor *sensor, struct ui_psensor *ui)
        if (result == GTK_RESPONSE_ACCEPT) {
                apply_prefs(model, ui->config);
                ui_sensorlist_update(ui, 1);
-#if defined(HAVE_APPINDICATOR) || defined(HAVE_APPINDICATOR_029)
+#if defined(HAVE_APPINDICATOR)
                ui_appindicator_update_menu(ui);
 #endif
        }