[goobox] libnotify 0.7 API support



commit bcfa0c77f5d8fcd19392b1483b5ed596da448390
Author: Andrew Munkres <amunkres nyx net>
Date:   Wed Apr 20 10:48:05 2011 +0200

    libnotify 0.7 API support
    
    The function "notify_notification_new_with_status_icon" has been
    removed from libnotify, so goobox won't build against libnotify 0.7

 src/main.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 9c982d7..4286740 100644
--- a/src/main.c
+++ b/src/main.c
@@ -37,6 +37,9 @@
 
 #ifdef ENABLE_NOTIFICATION
 #include <libnotify/notify.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
 static NotifyNotification *notification = NULL;
 #endif /* ENABLE_NOTIFICATION */
 
@@ -591,7 +594,11 @@ system_notify (GooWindow  *window,
 			g_list_free (caps);
 		}
 
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+		notification = notify_notification_new (title, msg, "goobox");
+#else
 		notification = notify_notification_new_with_status_icon (title, msg, "goobox", status_icon);
+#endif
 		notify_notification_set_urgency (notification, NOTIFY_URGENCY_LOW);
 
 		if (supports_actions) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]