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
|
--- libbalsa/information.c
+++ libbalsa/information.c
@@ -27,6 +27,9 @@
#ifdef HAVE_NOTIFY
#include <libnotify/notify.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
#include <gtk/gtk.h>
#endif
#include <string.h>
@@ -122,7 +125,11 @@
g_free(msg);
note =
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ notify_notification_new("Balsa", escaped->str, icon_str);
+#else
notify_notification_new("Balsa", escaped->str, icon_str, NULL);
+#endif
g_string_free(escaped, TRUE);
notify_notification_set_timeout(note, 7000); /* 7 seconds */
--- src/main-window.c
+++ src/main-window.c
@@ -85,6 +85,12 @@
#define MAILBOX_DATA "mailbox_data"
+#ifdef HAVE_NOTIFY
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+#endif
+
enum {
OPEN_MAILBOX_NODE,
CLOSE_MAILBOX_NODE,
@@ -3406,7 +3412,11 @@
} else {
num_total = num_new;
balsa_app.main_window->new_mail_note =
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ notify_notification_new("Balsa", NULL, NULL);
+#else
notify_notification_new("Balsa", NULL, NULL, NULL);
+#endif
g_object_add_weak_pointer(G_OBJECT(balsa_app.main_window->
new_mail_note),
(gpointer) & balsa_app.main_window->
|