summaryrefslogtreecommitdiffstats
path: root/mozilla-notify.patch
blob: 7c865deae8fe0cffd1016324c810c8767bbfa75a (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
https://bugzilla.mozilla.org/show_bug.cgi?id=628222

# HG changeset patch
# User Priit Laes <plaes@plaes.org>
# Date 1295907218 -7200
# Node ID ebfe5822e8916cce3d1811e67f6cb95ba3caeb24
# Parent  e874889e43d1b40f16c8234d53f39126a04e6621
Add support for libnotify-0.7+

diff -r e874889e43d1 -r ebfe5822e891 toolkit/system/gnome/nsAlertsIconListener.cpp
--- a/toolkit/system/gnome/nsAlertsIconListener.cpp	Fri Jan 21 16:45:23 2011 -0500
+++ b/toolkit/system/gnome/nsAlertsIconListener.cpp	Tue Jan 25 00:13:38 2011 +0200
@@ -46,6 +46,11 @@
 
 #include <gdk/gdk.h>
 
+// Compatibility macro for <libnotify-0.7
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 static PRBool gHasActions = PR_FALSE;
 
 static void notify_action_cb(NotifyNotification *notification,
@@ -218,7 +223,13 @@
 {
   mNotification = notify_notification_new(mAlertTitle.get(),
                                           mAlertText.get(),
-                                          NULL, NULL);
+                                          NULL
+// >=libnotify-0.7.0 has no support for attaching to widgets
+#if !NOTIFY_CHECK_VERSION(0,7,0)
+                                          , NULL
+#endif
+                                          );
+
   if (!mNotification)
     return NS_ERROR_OUT_OF_MEMORY;