commit 1e1e4b2d708bb4ca4b61a0a58433c42bc58d8404
parent 837a22a2e1e3d97f9a4ca00e5766b01f1497a68d
Author: mancausoft <andreamilazzo@mancausoft.org>
Date: Tue, 29 Mar 2011 18:11:18 +0200
Added support to libnotify (>= 0.7)
Signed-off-by: mancausoft <andreamilazzo@mancausoft.org>
Diffstat:
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/configure.ac b/configure.ac
@@ -82,6 +82,13 @@ PKG_CHECK_MODULES(NOTIFY, libnotify, :,
AC_MSG_ERROR([*** libnotify development files not found!]))
AC_SUBST([NOTIFY_CFLAGS])
AC_SUBST([NOTIFY_LIBS])
+REALCFLAGS="$CFLAGS"
+REALLIBS="$LIBS"
+CFLAGS="$NOTIFY_CFLAGS $CFLAGS"
+LIBS="$NOTIFY_LIBS $LIBS"
+AC_CHECK_FUNCS([notify_notification_new_with_status_icon])
+CFLAGS="$REALCFLAGS"
+LIBS="$REALLIBS"
dnl compile with full warnings and debugging symbols
AC_ARG_ENABLE(debug,
diff --git a/src/tomb-status.c b/src/tomb-status.c
@@ -121,10 +121,17 @@ int main(int argc, char **argv) {
g_signal_connect_swapped(status_tomb, "popup-menu", G_CALLBACK(right_click), menu_right);
// status icon
+#if (HAVE_NOTIFY_NOTIFICATION_NEW_WITH_STATUS_ICON)
notice = notify_notification_new_with_status_icon
("Tomb encrypted undertaker",
"We started digging out bones",
NULL, status_tomb);
+#else
+ notice = notify_notification_new
+ ("Tomb encrypted undertaker",
+ "We started digging out bones",
+ NULL);
+#endif
notify_notification_set_icon_from_pixbuf(notice, pb_monmort);
notify_notification_show(notice, &error);