diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | embed/downloader-view.c | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3ea0bf815..180874e19 100644 --- a/configure.ac +++ b/configure.ac @@ -114,10 +114,17 @@ LIBGNOMEUI_REQUIRED=2.14.0 GNOME_DESKTOP_REQUIRED=2.9.91 LIBSTARTUP_NOTIFICATION_REQUIRED=0.5 LIBNOTIFY_REQUIRED=0.4 +LIBCANBERRA_GTK_REQUIRED=0.3 DBUS_GLIB_REQUIRED=0.35 PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no]) +PKG_CHECK_EXISTS([libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED],[have_libcanberra_gtk=yes],[have_libcanberra_gtk=no]) +LIBCANBERRA_GTK_PACKAGE= +if test "$have_libcanberra_gtk" = "yes"; then + LIBCANBERRA_GTK_PACKAGE="libcanberra_gtk >= $LIBCANBERRA_GTK_REQUIRED" + AC_DEFINE([HAVE_LIBCANBERRA_GTK],[1],[Define if libcanberra-gtk is available]) +fi LIBNOTIFY_PACKAGE= if test "$have_libnotify" = "yes"; then LIBNOTIFY_PACKAGE="libnotify >= $LIBNOTIFY_REQUIRED" @@ -137,6 +144,7 @@ PKG_CHECK_MODULES([DEPENDENCIES], [ libglade-2.0 >= $LIBGLADE_REQUIRED \ gconf-2.0 gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED + libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED $LIBNOTIFY_PACKAGE ]) diff --git a/embed/downloader-view.c b/embed/downloader-view.c index 610475cf9..3e84a8af0 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -35,6 +35,9 @@ #include <gtk/gtk.h> #include <libgnomeui/gnome-icon-lookup.h> +#ifdef HAVE_LIBCANBERRA_GTK +#include <canberra-gtk.h> +#endif #ifdef HAVE_LIBNOTIFY #include <libnotify/notify.h> @@ -440,6 +443,13 @@ update_download_row (DownloaderView *dv, EphyDownload *download) g_free (downloaded); #endif +#ifdef HAVE_LIBCANBERRA_GTK + ca_context_play (ca_gtk_context_get (), 0, + CA_PROP_APPLICATION_NAME, _("GNOME Web Browser"), + CA_PROP_EVENT_ID, "complete-download", + CA_PROP_EVENT_DESCRIPTION, _("Download completed"), + NULL); +#endif return; case EPHY_DOWNLOAD_PAUSED: |