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. --- src/indicator-sound.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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