mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 03:24:59 -06:00
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:
parent
0577f1a086
commit
8cdf08df08
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue