aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/com.canonical.indicators.sound.gschema.xml9
-rw-r--r--src/indicator-sound.c5
2 files changed, 13 insertions, 1 deletions
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.
</description>
</key>
+ <key name="show-notify-osd-on-scroll" type="b">
+ <default>true</default>
+ <summary>Initial setting for showing notify-osd notification on scroll volume-change</summary>
+ <description>
+ 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).
+ </description>
+ </key>
</schema>
</schemalist>
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);
}