aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control-pulse.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-11-19 17:06:59 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-11-19 17:06:59 +0100
commitd7fa04a96f2d9eabfdcc56574895c0c9f5785231 (patch)
treef4912bc7d23ea292c36177d3aa911137294c0a8f /src/volume-control-pulse.vala
parentf06c2ddee06bce9ed8320d78a65fd6206db3e6f1 (diff)
downloadayatana-indicator-sound-d7fa04a96f2d9eabfdcc56574895c0c9f5785231.tar.gz
ayatana-indicator-sound-d7fa04a96f2d9eabfdcc56574895c0c9f5785231.tar.bz2
ayatana-indicator-sound-d7fa04a96f2d9eabfdcc56574895c0c9f5785231.zip
restore warning level volume when warning dialog is cancelled
Diffstat (limited to 'src/volume-control-pulse.vala')
-rw-r--r--src/volume-control-pulse.vala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index 45cf8a6..83b10d5 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -783,6 +783,14 @@ public class VolumeControlPulse : VolumeControl
}
}
+ public override void set_warning_volume() {
+ var vol = new VolumeControl.Volume();
+ vol.volume = _warning_volume_norms;
+ vol.reason = _volume.reason;
+ debug("Setting warning level volume from %f down to %f", _volume.volume, vol.volume);
+ volume = vol;
+ }
+
/** HIGH VOLUME APPROVED PROPERTY **/
private bool _high_volume_approved = false;