updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / gnome-power-manager-smapi / gnome-power-manager-2.32.0-libnotify-0.7.patch
blobd021f2930ecad5411d2f34bb8d43c231c63a99f7
1 --- src/gpm-manager.c
2 +++ src/gpm-manager.c
3 @@ -43,6 +43,10 @@
4 #include <libupower-glib/upower.h>
5 #include <libnotify/notify.h>
7 +#ifndef NOTIFY_CHECK_VERSION
8 +#define NOTIFY_CHECK_VERSION(x,y,z) 0
9 +#endif
11 #include "egg-debug.h"
12 #include "egg-console-kit.h"
14 @@ -480,12 +484,16 @@
15 /* close any existing notification of this class */
16 gpm_manager_notify_close (manager, *notification_class);
18 +#if NOTIFY_CHECK_VERSION (0, 7, 0)
19 + notification = notify_notification_new (title, message, icon);
20 +#else
21 /* if the status icon is hidden, don't point at it */
22 if (manager->priv->status_icon != NULL &&
23 gtk_status_icon_is_embedded (manager->priv->status_icon))
24 notification = notify_notification_new_with_status_icon (title, message, icon, manager->priv->status_icon);
25 else
26 notification = notify_notification_new (title, message, icon, NULL);
27 +#endif
28 notify_notification_set_timeout (notification, timeout);
29 notify_notification_set_urgency (notification, urgency);
30 g_signal_connect (notification, "closed", G_CALLBACK (gpm_manager_notification_closed_cb), notification_class);