aboutsummaryrefslogtreecommitdiffstats
path: root/community/gnome-power-manager/gnome-power-manager-2.32.0-libnotify-0.7.patch
blob: 022d2c5fe58ae40bb2056080fa4d0712f4abefd0 (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
--- ./src/gpm-manager.c
+++ ./src/gpm-manager.c
@@ -43,6 +43,10 @@
 #include <libupower-glib/upower.h>
 #include <libnotify/notify.h>
 
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 #include "egg-debug.h"
 #include "egg-console-kit.h"
 
@@ -480,12 +484,16 @@
 	/* close any existing notification of this class */
 	gpm_manager_notify_close (manager, *notification_class);
 
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+	notification = notify_notification_new (title, message, icon);
+#else
 	/* if the status icon is hidden, don't point at it */
 	if (manager->priv->status_icon != NULL &&
 	    gtk_status_icon_is_embedded (manager->priv->status_icon))
 		notification = notify_notification_new_with_status_icon (title, message, icon, manager->priv->status_icon);
 	else
 		notification = notify_notification_new (title, message, icon, NULL);
+#endif
 	notify_notification_set_timeout (notification, timeout);
 	notify_notification_set_urgency (notification, urgency);
 	g_signal_connect (notification, "closed", G_CALLBACK (gpm_manager_notification_closed_cb), notification_class);