diff options
author | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-07-25 05:05:35 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <diegoe@src.gnome.org> | 2008-07-25 05:05:35 +0800 |
commit | bcfca9743b166b426967008df11c1d4b3b367348 (patch) | |
tree | b9b9210217205d1d14728c09c2b9fb5cc1391a9e | |
parent | d7b662e7b30776e3a9d1ad8f76e2b6787f66fab9 (diff) | |
download | gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar.gz gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar.bz2 gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar.lz gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar.xz gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.tar.zst gsoc2013-epiphany-bcfca9743b166b426967008df11c1d4b3b367348.zip |
Enable complete-download sound with libcanberra.
svn path=/branches/gnome-2-24/; revision=8361
-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: |