summaryrefslogtreecommitdiff
blob: 0cc11769b64b83c65b4a3073b7ecadb5c161791e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- src/notification/libnotify.c
+++ src/notification/libnotify.c
@@ -28,6 +28,10 @@
 
 #include <libnotify/notify.h>
 
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 #include "common.h"
 #include "conf.h"
 #include "debug.h"
@@ -158,7 +162,12 @@
 //		notify_notification_update ( n, node_get_title(node_p), labelText_now_p, NULL);
 //		notify_notification_clear_actions(n);
 
-		n = notify_notification_new (node_get_title (node_p), labelText_now_p, NULL, NULL);
+		n = notify_notification_new (node_get_title (node_p), labelText_now_p, NULL
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+		);
+#else
+		, NULL);
+#endif
 
 		notify_notification_set_icon_from_pixbuf (n, node_get_icon (node_p));
 		notify_notification_set_category (n, "feed");
@@ -172,8 +181,11 @@
 							(NotifyActionCallback)notif_libnotify_callback_mark_read,
 							node_p->id, NULL);
 		}
-
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+		/* notify_notification_attach_to_status_icon was removed */
+#else
 		notify_notification_attach_to_status_icon (n, ui_tray_get_status_icon ());
+#endif
 
 		if (!notify_notification_show (n, NULL)) {
 			g_warning ("libnotify.c - failed to update notification via libnotify\n");
@@ -249,7 +261,12 @@
 
 	labelSummary_p = g_strdup_printf (ngettext ("%s has %d new / updated headline\n", "%s has %d new / updated headlines\n", item_count), 
 	                                  node_get_title (node), item_count);
-	n = notify_notification_new (_("Feed Update"), labelSummary_p, "liferea", NULL);
+	n = notify_notification_new (_("Feed Update"), labelSummary_p, "liferea"
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+	);
+#else
+	, NULL);
+#endif
 	g_free (labelSummary_p);
 
  	if (supports_append) {
@@ -272,7 +289,11 @@
 	}
 	notify_notification_set_category (n, "feed");
 
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+	/* notify_notification_attach_to_status_icon was removed */
+#else
 	notify_notification_attach_to_status_icon (n, ui_tray_get_status_icon ());
+#endif
 
 	if (!notify_notification_show (n, NULL))
 		g_warning ("notif_libnotify.c - failed to send notification via libnotify");