--- src/notification/libnotify.c +++ src/notification/libnotify.c @@ -28,6 +28,10 @@ #include +#ifndef NOTIFY_CHECK_VERSION +#define NOTIFY_CHECK_VERSION(x,y,z) 0 +#endif + #include "common.h" #include "conf.h" #include "debug.h" @@ -158,7 +162,12 @@ // notify_notification_update ( n, node_get_title(node_p), labelText_now_p, NULL); // notify_notification_clear_actions(n); - n = notify_notification_new (node_get_title (node_p), labelText_now_p, NULL, NULL); + n = notify_notification_new (node_get_title (node_p), labelText_now_p, NULL +#if NOTIFY_CHECK_VERSION (0, 7, 0) + ); +#else + , NULL); +#endif notify_notification_set_icon_from_pixbuf (n, node_get_icon (node_p)); notify_notification_set_category (n, "feed"); @@ -172,8 +181,11 @@ (NotifyActionCallback)notif_libnotify_callback_mark_read, node_p->id, NULL); } - +#if NOTIFY_CHECK_VERSION (0, 7, 0) + /* notify_notification_attach_to_status_icon was removed */ +#else notify_notification_attach_to_status_icon (n, ui_tray_get_status_icon ()); +#endif if (!notify_notification_show (n, NULL)) { g_warning ("libnotify.c - failed to update notification via libnotify\n"); @@ -249,7 +261,12 @@ labelSummary_p = g_strdup_printf (ngettext ("%s has %d new / updated headline\n", "%s has %d new / updated headlines\n", item_count), node_get_title (node), item_count); - n = notify_notification_new (_("Feed Update"), labelSummary_p, "liferea", NULL); + n = notify_notification_new (_("Feed Update"), labelSummary_p, "liferea" +#if NOTIFY_CHECK_VERSION (0, 7, 0) + ); +#else + , NULL); +#endif g_free (labelSummary_p); if (supports_append) { @@ -272,7 +289,11 @@ } notify_notification_set_category (n, "feed"); +#if NOTIFY_CHECK_VERSION (0, 7, 0) + /* notify_notification_attach_to_status_icon was removed */ +#else notify_notification_attach_to_status_icon (n, ui_tray_get_status_icon ()); +#endif if (!notify_notification_show (n, NULL)) g_warning ("notif_libnotify.c - failed to send notification via libnotify");