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
11 #include "egg-debug.h"
12 #include "egg-console-kit.h"
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);
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);
26 notification = notify_notification_new (title, message, icon, NULL);
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);