summaryrefslogtreecommitdiff
path: root/extra/network-manager-applet/nm-applet-0.8.2-libnotify-0.7.patch
blob: 54aa473af98af7ec946fa64f7dbcfb84315ce639 (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
--- src/applet.c
+++ src/applet.c
@@ -58,6 +58,10 @@
 #include <gnome-keyring.h>
 #include <libnotify/notify.h>
 
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 #include "applet.h"
 #include "applet-device-wired.h"
 #include "applet-device-wifi.h"
@@ -626,12 +630,20 @@
 	escaped = utils_escape_notify_message (message);
 	notify = notify_notification_new (summary,
 	                                  escaped,
-	                                  icon ? icon : GTK_STOCK_NETWORK,
-	                                  NULL);
+	                                  icon ? icon : GTK_STOCK_NETWORK
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+					  );
+#else
+                                          , NULL);
+#endif
 	g_free (escaped);
 	applet->notification = notify;
 
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+        /* notify_notification_attach_to_status_icon was removed */
+#else
 	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);