diff --git a/configure.ac b/configure.ac index 9d67fe4..770a0c8 100644 --- 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 index 24ebbf9..70e4d57 100644 --- 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);