summaryrefslogtreecommitdiffstats
path: root/main/gnome-screensaver/gnome-screensaver-2.30.2-libnotify-0.7.patch
blob: 6eeb1681906b476ce30c021a1cff1f9a7a7f6231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff -Nur gnome-screensaver-2.30.2.orig/src/gs-lock-plug.c gnome-screensaver-2.30.2/src/gs-lock-plug.c
--- gnome-screensaver-2.30.2.orig/src/gs-lock-plug.c	2010-09-28 13:36:51.000000000 -0700
+++ gnome-screensaver-2.30.2/src/gs-lock-plug.c	2011-03-07 00:54:44.086669840 -0800
@@ -47,6 +47,10 @@
 #include <libnotify/notify.h>
 #endif
 
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 #include "gs-lock-plug.h"
 
 #include "gs-debug.h"
@@ -1090,7 +1094,11 @@
         strftime (summary, 128, "%X", tmp);
 
         notify_init ("gnome-screensaver-dialog");
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+        note = notify_notification_new (summary, escaped_text, NULL);
+#else
         note = notify_notification_new (summary, escaped_text, NULL, NULL);
+#endif
         notify_notification_set_timeout (note, NOTIFY_EXPIRES_NEVER);
         notify_notification_show (note, NULL);
         g_object_unref (note);