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
|
--- plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -48,6 +48,9 @@
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
#endif /* HAVE_LIBNOTIFY */
#include "gnome-settings-profile.h"
@@ -608,9 +611,13 @@
gsd_a11y_keyboard_manager_ensure_status_icon (manager);
manager->priv->notification = notify_notification_new (title,
message,
- "preferences-desktop-accessibility",
- NULL);
+ "preferences-desktop-accessibility"
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ );
+#else
+ , NULL);
notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
+#endif
notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
notify_notification_add_action (manager->priv->notification,
@@ -747,9 +754,13 @@
gsd_a11y_keyboard_manager_ensure_status_icon (manager);
manager->priv->notification = notify_notification_new (title,
message,
- "preferences-desktop-accessibility",
- NULL);
+ "preferences-desktop-accessibility"
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ );
+#else
+ , NULL);
notify_notification_attach_to_status_icon (manager->priv->notification, manager->priv->status_icon);
+#endif
notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
notify_notification_add_action (manager->priv->notification,
--- plugins/xrandr/gsd-xrandr-manager.c
+++ plugins/xrandr/gsd-xrandr-manager.c
@@ -48,6 +48,9 @@
#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
#endif
#include "gnome-settings-profile.h"
@@ -1086,6 +1089,11 @@
g_assert (error_to_display == NULL || secondary_text == NULL);
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ notification = notify_notification_new (primary_text,
+ error_to_display ? error_to_display->message : secondary_text,
+ GSD_XRANDR_ICON_NAME);
+#else
if (priv->status_icon)
notification = notify_notification_new_with_status_icon (primary_text,
error_to_display ? error_to_display->message : secondary_text,
@@ -1096,6 +1104,7 @@
error_to_display ? error_to_display->message : secondary_text,
GSD_XRANDR_ICON_NAME,
NULL);
+#endif
notify_notification_show (notification, NULL); /* NULL-GError */
#else
|