[seahorse] Fix build with libnotify 0.7
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] Fix build with libnotify 0.7
- Date: Thu, 21 Oct 2010 00:39:00 +0000 (UTC)
commit a6a21d1cc8f52f956e2f2bbab057ea301be18257
Author: Stef Walter <stef memberwebs com>
Date: Wed Oct 20 23:03:03 2010 +0000
Fix build with libnotify 0.7
libseahorse/seahorse-notification.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libseahorse/seahorse-notification.c b/libseahorse/seahorse-notification.c
index 567639f..3c51457 100644
--- a/libseahorse/seahorse-notification.c
+++ b/libseahorse/seahorse-notification.c
@@ -37,6 +37,11 @@
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
+
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION 0
+#endif
+
#endif
/* -----------------------------------------------------------------------------
@@ -230,8 +235,13 @@ setup_libnotify_notification (SeahorseNotification *snotif, gboolean urgent,
heading = format_key_text (snotif->heading);
message = format_key_text (snotif->message);
-
+
+/* libnotify 0.7.0 and later has no support for attaching to widgets */
+#if NOTIFY_CHECK_VERSION(0,7,0)
+ notif = notify_notification_new (heading, message, snotif->icon);
+#else
notif = notify_notification_new (heading, message, snotif->icon, attachto);
+#endif
g_free (heading);
g_free (message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]