[Xfce4-commits] <xfce4-sensors-plugin:master> better fix for libnotify version than NOTIFY_CHECK by simply priorizing the newer API
Fabian
noreply at xfce.org
Mon May 9 22:28:01 CEST 2011
Updating branch refs/heads/master
to e76eca7666d9e5bb15b75d30afd25583979dec58 (commit)
from 9935d8391c4ce31bc8334f9155518728e64aa3a1 (commit)
commit e76eca7666d9e5bb15b75d30afd25583979dec58
Author: Fabian <timystery at arcor.de>
Date: Mon May 9 22:27:36 2011 +0200
better fix for libnotify version than NOTIFY_CHECK by simply priorizing the newer API
configure.in.in | 10 +++++-----
lib/hddtemp.c | 11 ++++-------
lib/sensors-interface.c | 7 +++----
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 9e3b37c..71d4ed5 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -7,11 +7,11 @@ dnl 2003,2004, 2007 Benedikt Meurer <benny at xfce.org>
dnl 2007-2011 Fabian Nowak <timystery at arcor.de>
dnl
-m4_define([libxfce4sensors_verinfo], [1:2:0])
+m4_define([libxfce4sensors_verinfo], [1:2:1])
m4_define([xfce4_sensors_version_major], [1])
m4_define([xfce4_sensors_version_minor], [2])
-m4_define([xfce4_sensors_version_micro], [0])
+m4_define([xfce4_sensors_version_micro], [1])
m4_define([xfce4_sensors_version_nano], [])
m4_define([xfce4_sensors_version_build], [@REVISION@])
m4_define([xfce4_sensors_version_tag], []) dnl may be set to 'git'
@@ -336,12 +336,12 @@ dnl **************************************
dnl XDT_CHECK_PACKAGE([LIBNOTIFY], [libnotify], [0.4.0])
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY4],
[libnotify],
- [0.4], [notification4],
+ [0.4], [notification],
[notification message library < 0.7])
XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY7],
[libnotify],
- [0.7], [notification7],
+ [0.7], [notification],
[notification message library >= 0.7])
dnl **************************************
@@ -415,7 +415,7 @@ echo "* NVIDIA X CTRL"
fi
echo
if test x"$LIBNOTIFY4_FOUND" = x"yes"; then
-echo "Support for libnotify < 0.7 will be built in."
+echo "Support for libnotify will be built in."
echo
fi
if test x"$LIBNOTIFY7_FOUND" = x"yes"; then
diff --git a/lib/hddtemp.c b/lib/hddtemp.c
index 1a9e8c6..ba70ab4 100644
--- a/lib/hddtemp.c
+++ b/lib/hddtemp.c
@@ -79,10 +79,7 @@
/* forward declaration for GCC 4.3 -Wall */
-#ifdef HAVE_LIBNOTIFY4
-void notification_suppress_messages (NotifyNotification *n, gchar *action, gpointer *data);
-#endif
-#ifdef HAVE_LIBNOTIFY7
+#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
void notification_suppress_messages (NotifyNotification *n, gchar *action, gpointer *data);
#endif
@@ -117,11 +114,11 @@ void quick_message_notify (gchar *message)
if (!notify_is_initted())
notify_init(PACKAGE); /* NOTIFY_APPNAME */
-#ifdef HAVE_LIBNOTIFY4
- nn = notify_notification_new (summary, body, icon, NULL);
-#endif
+
#ifdef HAVE_LIBNOTIFY7
nn = notify_notification_new (summary, body, icon);
+#elseif HAVE_LIBNOTIFY4
+ nn = notify_notification_new (summary, body, icon, NULL);
#endif
/* FIXME: Use channels or propagate private object or use static global variable */
//notify_notification_add_action (nn,
diff --git a/lib/sensors-interface.c b/lib/sensors-interface.c
index ba3a662..b0e40c1 100644
--- a/lib/sensors-interface.c
+++ b/lib/sensors-interface.c
@@ -104,12 +104,11 @@ fill_gtkTreeStore (GtkTreeStore *model, t_chip *chip, t_tempscale scale, t_senso
#if defined(HAVE_LIBNOTIFY4) || defined(HAVE_LIBNOTIFY7)
if (!notify_is_initted())
notify_init(PACKAGE); /* NOTIFY_APPNAME */
-
-#ifdef HAVE_LIBNOTIFY4
- nn = notify_notification_new (summary, body, icon, NULL);
-#endif
+
#ifdef HAVE_LIBNOTIFY7
nn = notify_notification_new (summary, body, icon);
+#elseif HAVE_LIBNOTIFY4
+ nn = notify_notification_new (summary, body, icon, NULL);
#endif
notify_notification_show(nn, &error);
#else
More information about the Xfce4-commits
mailing list