[gnome-docker] update to new libnotify API



commit c751c76db20a005578d660d1c47a69139df840b8
Author: Holger Macht <holger homac de>
Date:   Tue May 24 09:53:44 2011 +0200

    update to new libnotify API

 src/gd-notify.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/gd-notify.c b/src/gd-notify.c
index 3ffaa9a..e6ba67d 100644
--- a/src/gd-notify.c
+++ b/src/gd-notify.c
@@ -11,7 +11,12 @@
 # include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include <gtk/gtk.h>
 #include <libnotify/notify.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 
 #include "gd-notify.h"
 
@@ -29,7 +34,12 @@ static void gd_notify(const char *summary,
 		notify_init("gnome-docker");
 
 	notify_icon = GTK_STOCK_NETWORK;
-	notify = notify_notification_new (summary, body, notify_icon, NULL);
+	notify = notify_notification_new (summary, body, notify_icon
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+			);
+#else
+			, NULL);
+#endif
 	notify_notification_set_urgency(notify, urgency);
 	notify_notification_show(notify, NULL);
 }



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