Added support to libnotify (>= 0.7)

Signed-off-by: mancausoft <andreamilazzo@mancausoft.org>
This commit is contained in:
mancausoft 2011-03-29 18:11:18 +02:00 committed by Jaromil
parent 837a22a2e1
commit 1e1e4b2d70
2 changed files with 14 additions and 0 deletions

View File

@ -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,

View File

@ -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);