[network-manager-applet/NMA_0_8] core: fixes for libnotify >= 0.7 (bgo #632327)
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/NMA_0_8] core: fixes for libnotify >= 0.7 (bgo #632327)
- Date: Tue, 7 Dec 2010 18:17:46 +0000 (UTC)
commit d0e1da0912df378aae26dbee085d6d4304aa844a
Author: Dan Williams <dcbw redhat com>
Date: Fri Nov 5 13:26:49 2010 -0500
core: fixes for libnotify >= 0.7 (bgo #632327)
configure.ac | 6 ++++++
src/applet.c | 10 ++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e0274b2..1adedd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,12 @@ esac
AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes")
+# Check for libnotify >= 0.7
+PKG_CHECK_MODULES(LIBNOTIFY_07, [libnotify >= 0.7], [have_libnotify_07=yes],[have_libnotify_07=no])
+if test x"$have_libnotify_07" = "xyes"; then
+ AC_DEFINE(HAVE_LIBNOTIFY_07, 1, [Define if you have libnotify 0.7 or later])
+fi
+
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
dnl GConf stuff
diff --git a/src/applet.c b/src/applet.c
index dfeef61..428520e 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -625,12 +625,18 @@ applet_do_notify (NMApplet *applet,
escaped = utils_escape_notify_message (message);
notify = notify_notification_new (summary,
escaped,
- icon ? icon : GTK_STOCK_NETWORK,
- NULL);
+ icon ? icon : GTK_STOCK_NETWORK
+#if HAVE_LIBNOTIFY_07
+ );
+#else
+ , NULL);
+#endif
g_free (escaped);
applet->notification = notify;
+#if !HAVE_LIBNOTIFY_07
notify_notification_attach_to_status_icon (notify, applet->status_icon);
+#endif
notify_notification_set_urgency (notify, urgency);
notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]