aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-04-15 11:55:49 +0200
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-04-15 11:55:49 +0200
commitcae62db5c6ad966fbc68f892c9723b010bcd774a (patch)
tree0c88c16f4ea26e2303648537212fb7e8a440f8f6 /src/service.vala
parent10537be76c7675bf7ade87a62f6be01b5beb3b2f (diff)
downloadayatana-indicator-sound-cae62db5c6ad966fbc68f892c9723b010bcd774a.tar.gz
ayatana-indicator-sound-cae62db5c6ad966fbc68f892c9723b010bcd774a.tar.bz2
ayatana-indicator-sound-cae62db5c6ad966fbc68f892c9723b010bcd774a.zip
Added a new signal in volumeWarning to notify when the user has pressed cancel. We use that to set the volume after pressing cancel, as sometimes setting the accounts service volume steps over the warning level
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/service.vala b/src/service.vala
index 33008a1..74c3fc5 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -68,6 +68,10 @@ public class IndicatorSound.Service: Object {
update_notification();
});
+ this._volume_warning.cancel_pressed.connect( (cancel_volume) => {
+ volume_control.set_volume_clamp (cancel_volume, VolumeControl.VolumeReasons.USER_KEYPRESS);
+ });
+
this.accounts_service = accounts;
/* If we're on the greeter, don't export */
if (this.accounts_service != null) {