[Xfce4-commits] <midori:master> Conditionally support libnotify 0.7 API

Christian Dywan noreply at xfce.org
Mon Jan 31 01:50:01 CET 2011


Updating branch refs/heads/master
         to 26873b0f97bc7406204356b7f86c93e7e31b0293 (commit)
       from 5acdb5516d5d6960b91a404a4431f56698cc9c16 (commit)

commit 26873b0f97bc7406204356b7f86c93e7e31b0293
Author: Samuli Suominen <ssuominen at gentoo.org>
Date:   Mon Jan 31 01:46:19 2011 +0100

    Conditionally support libnotify 0.7 API
    
    Fixes: https://bugs.launchpad.net/midori/+bug/710352

 midori/midori-app.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/midori/midori-app.c b/midori/midori-app.c
index d3b7583..4440de7 100644
--- a/midori/midori-app.c
+++ b/midori/midori-app.c
@@ -42,6 +42,9 @@
 
 #if HAVE_LIBNOTIFY
     #include <libnotify/notify.h>
+    #ifndef NOTIFY_CHECK_VERSION
+        #define NOTIFY_CHECK_VERSION(x,y,z) 0
+    #endif
 #endif
 
 struct _MidoriApp
@@ -1203,8 +1206,11 @@ midori_app_send_notification (MidoriApp*   app,
     if (notify_is_initted ())
     {
         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);
+        #endif
         notify_notification_show (note, NULL);
         g_object_unref (note);
     }



More information about the Xfce4-commits mailing list