1 |
ssuominen 11/01/31 18:00:59 |
2 |
|
3 |
Added: claws-mail-notification-0.26-libnotify-0.7.patch |
4 |
Log: |
5 |
Fix building with x11-libs/libnotify >= 0.7. |
6 |
|
7 |
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 mail-client/claws-mail-notification/files/claws-mail-notification-0.26-libnotify-0.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/claws-mail-notification/files/claws-mail-notification-0.26-libnotify-0.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/mail-client/claws-mail-notification/files/claws-mail-notification-0.26-libnotify-0.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: claws-mail-notification-0.26-libnotify-0.7.patch |
16 |
=================================================================== |
17 |
--- src/notification_popup.c |
18 |
+++ src/notification_popup.c |
19 |
@@ -339,7 +339,16 @@ |
20 |
break; |
21 |
} |
22 |
|
23 |
+#ifdef NOTIFY_CHECK_VERSION |
24 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
25 |
+ ppopup->notification = notify_notification_new(summary, utf8_str, NULL); |
26 |
+#else |
27 |
ppopup->notification = notify_notification_new(summary, utf8_str, NULL, NULL); |
28 |
+#endif |
29 |
+#else |
30 |
+ ppopup->notification = notify_notification_new(summary, utf8_str, NULL, NULL); |
31 |
+#endif |
32 |
+ |
33 |
g_free(utf8_str); |
34 |
if(ppopup->notification == NULL) { |
35 |
debug_print("Notification Plugin: Failed to create a new " |
36 |
--- src/notification_trayicon.c |
37 |
+++ src/notification_trayicon.c |
38 |
@@ -61,6 +61,10 @@ |
39 |
#ifdef HAVE_LIBNOTIFY |
40 |
#include <libnotify/notify.h> |
41 |
|
42 |
+#ifndef NOTIFY_CHECK_VERSION |
43 |
+#define NOTIFY_CHECK_VERSION(x,y,z) 0 |
44 |
+#endif |
45 |
+ |
46 |
typedef struct { |
47 |
gint count; |
48 |
gint num_mail; |
49 |
@@ -601,8 +605,17 @@ |
50 |
summary = notification_trayicon_popup_assemble_summary(); |
51 |
utf8_str = notification_trayicon_popup_assemble_body(msginfo); |
52 |
|
53 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
54 |
+ popup.notification = notify_notification_new(summary, utf8_str, NULL); |
55 |
+#else |
56 |
popup.notification = notify_notification_new(summary, utf8_str, NULL, NULL); |
57 |
+#endif |
58 |
+ |
59 |
+#if NOTIFY_CHECK_VERSION (0, 7, 0) |
60 |
+ /* notify_notification_attach_to_status_icon function was removed */ |
61 |
+#else |
62 |
notify_notification_attach_to_status_icon(popup.notification, trayicon); |
63 |
+#endif |
64 |
|
65 |
g_free(summary); |
66 |
g_free(utf8_str); |