Implement wxNotificationMessage using libnotify in wxGTK.

Use libnotify -- if detected by configure -- to provide native notifications
in wxGTK. Our API maps to libnotify one in rather straightforward way, we
might consider extending it to cover more of libnotify functionality
(categories, user-defined icons and, especially, actions) later.

Also update the dialogs sample to show another kind of notification and the
documentation to clarify the behaviour of various methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-07-27 15:36:54 +00:00
parent 5a92b56137
commit afbf46a317
13 changed files with 481 additions and 9 deletions

View File

@@ -591,6 +591,7 @@ WX_ARG_WITH(libmspack, [ --with-libmspack use libmspack (CHM help fi
WX_ARG_WITHOUT(gtkprint, [ --without-gtkprint don't use GTK printing support], wxUSE_GTKPRINT)
WX_ARG_WITHOUT(gnomeprint, [ --without-gnomeprint don't use GNOME printing libraries], wxUSE_LIBGNOMEPRINT)
WX_ARG_WITH(gnomevfs, [ --with-gnomevfs use GNOME VFS for associating MIME types], wxUSE_LIBGNOMEVFS)
WX_ARG_WITH(libnotify, [ --with-libnotify use libnotify for notifications], wxUSE_LIBNOTIFY)
WX_ARG_WITH(hildon, [ --with-hildon use Hildon framework for Nokia 770/800/810], wxUSE_LIBHILDON)
WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
@@ -5665,6 +5666,22 @@ if test "$WXGTK2" = 1; then
fi
fi
if test "$wxUSE_NOTIFICATION_MESSAGE" = "yes" ; then
if test "$wxUSE_LIBNOTIFY" = "yes" ; then
PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.7],
[
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $LIBNOTIFY_LIBS"
CFLAGS="$LIBNOTIFY_CFLAGS $CFLAGS"
CXXFLAGS="$LIBNOTIFY_CFLAGS $CXXFLAGS"
AC_DEFINE(wxUSE_LIBNOTIFY)
],
[
AC_MSG_WARN([libnotify not found, wxNotificationMessage will use generic implementation.])
]
)
fi
fi
if test "$wxUSE_LIBHILDON" = "yes" ; then
PKG_CHECK_MODULES(HILDON,
[hildon-lgpl >= 0.9],
@@ -7981,6 +7998,9 @@ case "$TOOLKIT" in
if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then
TOOLKIT_EXTRA="$TOOLKIT_EXTRA gnomevfs"
fi
if test "$wxUSE_LIBNOTIFY" = "yes" ; then
TOOLKIT_EXTRA="$TOOLKIT_EXTRA libnotify"
fi
if test "$wxUSE_LIBHILDON" = "yes"; then
TOOLKIT_EXTRA="$TOOLKIT_EXTRA hildon"
fi