aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xfce/recipes-apps/xfce4-notifyd/files/0001-Restore-libnotify-version-7.0.0-compatibility.patch
blob: 9e61a0ecfdf93723bf60a2b456fd1ab9a5047528 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
From ebfbe9358068716ed7f39e253bce4d13e696bc9b Mon Sep 17 00:00:00 2001
From: Ivailo Monev <xakepa10@gmail.com>
Date: Wed, 11 Dec 2013 13:18:13 +0000
Subject: [PATCH 1/1] Restore libnotify version < 7.0.0 compatibility

Upstream-Status: Pending [1]

[1] https://mail.xfce.org/pipermail/xfce/2013-December/032733.html

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
---
 Makefile.am                 |  4 +++-
 configure.ac                |  2 +-
 tests/test-actions.c        |  7 ++++++-
 tests/test-positioning.c    |  7 ++++++-
 tests/test-text.c           | 21 ++++++++++++++++++---
 xfce4-notifyd-config/main.c |  7 ++++++-
 6 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index df81bea..034d6c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -271,9 +271,11 @@ noinst_PROGRAMS = \
 
 tests_cflags = \
 	-I$(top_srcdir) \
-	$(LIBNOTIFY_CFLAGS)
+	$(LIBNOTIFY_CFLAGS) \
+	$(common_cflags)
 
 tests_ldadd = \
+	$(common_ldadd) \
 	$(LIBNOTIFY_LIBS)
 
 tests_test_actions_SOURCES = tests/test-actions.c
diff --git a/configure.ac b/configure.ac
index cf5258f..9d2e8a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [0.1.0svn-r26876])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
 XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.0.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.72])
-XDT_CHECK_PACKAGE([LIBNOTIFY], [libnotify], [0.7.0])
+XDT_CHECK_PACKAGE([LIBNOTIFY], [libnotify], [0.5.0])
 
 AC_PATH_PROG([DBUS_BINDING_TOOL], [dbus-binding-tool])
 AS_IF([test -z "$DBUS_BINDING_TOOL"],
diff --git a/tests/test-actions.c b/tests/test-actions.c
index a7f6494..4cdf882 100644
--- a/tests/test-actions.c
+++ b/tests/test-actions.c
@@ -106,7 +106,12 @@ int main (int argc, char **argv)
 
   notification = notify_notification_new ("Action!",
                                           "Click my shiny actions",
-                                          NULL);
+                                          NULL
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                          );
+#else
+                                          ,NULL);
+#endif
 
   notify_notification_add_action (notification,
                                   "action1",
diff --git a/tests/test-positioning.c b/tests/test-positioning.c
index 4478a92..2a90c6e 100644
--- a/tests/test-positioning.c
+++ b/tests/test-positioning.c
@@ -60,7 +60,12 @@ int main (int argc, char **argv)
 
       notification = notify_notification_new (summary,
                                               body,
-                                              NULL);
+                                              NULL
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                              );
+#else
+                                              ,NULL);
+#endif
 
       if (!notify_notification_show (notification, NULL))
         {
diff --git a/tests/test-text.c b/tests/test-text.c
index 7500cb2..ac95931 100644
--- a/tests/test-text.c
+++ b/tests/test-text.c
@@ -40,7 +40,12 @@ int main (int argc, char **argv)
 
   notification = notify_notification_new ("Test text support",
                                           "Does it work?",
-                                          NULL);
+                                          NULL
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                          );
+#else
+                                          ,NULL);
+#endif
 
   if (!notify_notification_show (notification, NULL))
     {
@@ -56,7 +61,12 @@ int main (int argc, char **argv)
 
   notification = notify_notification_new ("Summary only support",
                                           NULL,
-                                          NULL);
+                                          NULL
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                          );
+#else
+                                          ,NULL);
+#endif
 
   if (!notify_notification_show (notification, NULL))
     {
@@ -75,7 +85,12 @@ int main (int argc, char **argv)
                                           "<b>Bold</b>\n"
                                           "<u>Underlined</u>\n"
                                           "<a href=\"http://www.xfce.org\">Xfce Web site</a>",
-                                          NULL);
+                                          NULL
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                          );
+#else
+                                          ,NULL);
+#endif
 
   if (!notify_notification_show (notification, NULL))
     {
diff --git a/xfce4-notifyd-config/main.c b/xfce4-notifyd-config/main.c
index 5977749..eff4994 100644
--- a/xfce4-notifyd-config/main.c
+++ b/xfce4-notifyd-config/main.c
@@ -56,7 +56,12 @@ xfce_notifyd_config_show_notification_preview(GtkWindow *parent_window)
     notification =
         notify_notification_new(_("Notification Preview"),
                                 _("This is how notifications will look like"),
-                                "xfce4-notifyd");
+                                "xfce4-notifyd"
+#if NOTIFY_CHECK_VERSION > (0, 6, 9)
+                                );
+#else
+                                ,NULL);
+#endif
 
     notify_notification_add_action(notification,
                                    "button",
-- 
1.9.3