[gnome-settings-daemon] Bug 404683 - add sound effect to volume key handling
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] Bug 404683 - add sound effect to volume key handling
- Date: Wed, 9 Sep 2009 16:29:52 +0000 (UTC)
commit 60b9a62e11b3f3fe9c87958e977fc9bfb7c4f799
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 9 13:11:07 2009 +0100
Bug 404683 - add sound effect to volume key handling
Play a sound when the sound is changed
configure.ac | 2 +-
plugins/media-keys/gsd-media-keys-manager.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d7d516a..168b830 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,7 @@ AC_ARG_ENABLE(pulse,
if test x$WANT_PULSE = xyes ; then
PA_REQUIRED_VERSION=0.9.15
- PKG_CHECK_MODULES(PULSE, glib-2.0 libpulse >= $PA_REQUIRED_VERSION libpulse-mainloop-glib >= $PA_REQUIRED_VERSION,
+ PKG_CHECK_MODULES(PULSE, glib-2.0 libpulse >= $PA_REQUIRED_VERSION libpulse-mainloop-glib >= $PA_REQUIRED_VERSION libcanberra-gtk,
[have_pulse=true
AC_DEFINE(HAVE_PULSE, 1, [Define if PULSE sound server should be used])],
[have_pulse=false])
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 33b4675..4ae1bda 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -51,6 +51,7 @@
#include "gsd-media-keys-window.h"
#ifdef HAVE_PULSE
+#include <canberra-gtk.h>
#include "gvc-mixer-control.h"
#endif /* HAVE_PULSE */
@@ -625,6 +626,12 @@ update_dialog (GsdMediaKeysManager *manager,
gsd_media_keys_window_set_action (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog),
GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME);
dialog_show (manager);
+
+ ca_gtk_play_for_widget (manager->priv->dialog, 0,
+ CA_PROP_EVENT_ID, "audio-volume-change",
+ CA_PROP_EVENT_DESCRIPTION, "volume changed through key press",
+ CA_PROP_APPLICATION_ID, "org.gnome.VolumeControl",
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]