Conditionally support libnotify 0.7 API
Fixes: https://bugs.launchpad.net/midori/+bug/710352
This commit is contained in:
parent
5acdb5516d
commit
26873b0f97
1 changed files with 7 additions and 1 deletions
|
@ -42,6 +42,9 @@
|
||||||
|
|
||||||
#if HAVE_LIBNOTIFY
|
#if HAVE_LIBNOTIFY
|
||||||
#include <libnotify/notify.h>
|
#include <libnotify/notify.h>
|
||||||
|
#ifndef NOTIFY_CHECK_VERSION
|
||||||
|
#define NOTIFY_CHECK_VERSION(x,y,z) 0
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct _MidoriApp
|
struct _MidoriApp
|
||||||
|
@ -1203,8 +1206,11 @@ midori_app_send_notification (MidoriApp* app,
|
||||||
if (notify_is_initted ())
|
if (notify_is_initted ())
|
||||||
{
|
{
|
||||||
NotifyNotification* note;
|
NotifyNotification* note;
|
||||||
|
#if NOTIFY_CHECK_VERSION (0, 7, 0)
|
||||||
|
note = notify_notification_new (title, message, "midori");
|
||||||
|
#else
|
||||||
note = notify_notification_new (title, message, "midori", NULL);
|
note = notify_notification_new (title, message, "midori", NULL);
|
||||||
|
#endif
|
||||||
notify_notification_show (note, NULL);
|
notify_notification_show (note, NULL);
|
||||||
g_object_unref (note);
|
g_object_unref (note);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue