From d834013cb980c93b88d2f09aec69bce9d5f95148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 27 Jan 2011 18:25:15 +0100 Subject: Added show-notify-osd-on-scroll gsettings parameter This parameter (ON, by default) allows to enable/disable the notify-osd bubble on volume-change by mouse scroll. --- data/com.canonical.indicators.sound.gschema.xml | 9 +++++++++ src/indicator-sound.c | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/data/com.canonical.indicators.sound.gschema.xml b/data/com.canonical.indicators.sound.gschema.xml index 3850f65..1e08269 100644 --- a/data/com.canonical.indicators.sound.gschema.xml +++ b/data/com.canonical.indicators.sound.gschema.xml @@ -25,5 +25,14 @@ On start up volume should not be muted. + + true + Initial setting for showing notify-osd notification on scroll volume-change + + When using the mouse scroll-wheel over the indicator-sound icon, the volume changes. + Enabling this setting, every scroll volume-change a notify-osd bubble with the + updated volume value will be shown (if supported by your notification daemon). + + diff --git a/src/indicator-sound.c b/src/indicator-sound.c index 29a9f91..9867e04 100644 --- a/src/indicator-sound.c +++ b/src/indicator-sound.c @@ -49,6 +49,7 @@ struct _IndicatorSoundPrivate GList* transport_widgets_list; GDBusProxy *dbus_proxy; SoundStateManager* state_manager; + GSettings *settings_manager; NotifyNotification* notification; }; @@ -140,6 +141,7 @@ indicator_sound_init (IndicatorSound *self) priv->state_manager = g_object_new (SOUND_TYPE_STATE_MANAGER, NULL); priv->notification = NULL; + priv->settings_manager = g_settings_new("com.canonical.indicators.sound"); indicator_sound_notification_init (self); g_signal_connect ( G_OBJECT(self->service), @@ -651,5 +653,6 @@ indicator_sound_scroll (IndicatorObject *io, gint delta, //g_debug("indicator-sound-scroll - update slider with value %f", value); volume_widget_update(VOLUME_WIDGET(priv->volume_widget), value); - indicator_sound_notification_show(INDICATOR_SOUND (io), current_state, value); + if (g_settings_get_boolean(priv->settings_manager, "show-notify-osd-on-scroll")) + indicator_sound_notification_show(INDICATOR_SOUND (io), current_state, value); } -- cgit v1.2.3