gentoo-overlay/net-irc/xchat-gnome/files/xchat-gnome-0.26.1-libnotify-0.7.patch

27 lines
914 B
Diff

--- plugins/notify-osd/notify-osd.c
+++ plugins/notify-osd/notify-osd.c
@@ -27,6 +27,10 @@
#include "xchat-plugin.h"
#include "xg-plugin.h"
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
#define NOTIFY_OSD_NAME _("On-screen display")
#define NOTIFY_OSD_VERSION "0.1"
#define NOTIFY_OSD_DESCRIPTION _("Pops up notification of important messages when XChat-GNOME doesn't have the focus")
@@ -67,7 +71,12 @@
gchar *escaped;
escaped = g_markup_escape_text (message, strlen(message));
- notify = notify_notification_new (summary, escaped, NULL, NULL);
+ notify = notify_notification_new (summary, escaped, NULL
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+ );
+#else
+ , NULL);
+#endif
notify_notification_set_urgency (notify, NOTIFY_URGENCY_NORMAL);
notify_notification_set_icon_from_pixbuf (notify, notify_icon);
if (!notify_notification_show (notify, &error)) {