X11TrayIcon LibNotify API change, RM #44 (thanks Lionel!)

git-svn-id: svn://ultimatepp.org/upp/trunk@3272 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-03-08 12:25:06 +00:00
parent 0577f1a086
commit 8cdf08df08

View file

@ -7,6 +7,9 @@
#if !defined(flagNOGTK)
#include <glib.h>
#include <libnotify/notify.h>
#ifdef NOTIFY_CHECK_VERSION
#define NOTIFY_VERSION_GT_0_7_0
#endif
#endif
NAMESPACE_UPP
@ -106,7 +109,11 @@ void TrayIcon::Message(int type, const char *title, const char *text, int timeou
NotifyNotification *notification = notify_notification_new (title, text
, type == 1 ? "gtk-dialog-info"
: type == 2 ? "gtk-dialog-warning"
: "gtk-dialog-error", NULL);
: "gtk-dialog-error"
#ifndef NOTIFY_VERSION_GT_0_7_0
, NULL
#endif
);
notify_notification_set_timeout(notification, timeout * 1000);
notify_notification_show (notification, &error);
#endif