aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.vala1
-rw-r--r--src/volume-control-pulse.vala8
-rw-r--r--src/volume-control.vala1
3 files changed, 10 insertions, 0 deletions
diff --git a/src/service.vala b/src/service.vala
index 2b2d667..985d434 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -610,6 +610,7 @@ public class IndicatorSound.Service: Object {
&& this.notify_server_supports_actions
&& !this.volume_control.high_volume_approved;
if (waiting_user_approve_warn && volume_control.below_warning_volume) {
+ volume_control.set_warning_volume();
close_notification(warn_notification);
}
if (warn) {
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;
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 632af08..9b59a18 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -60,6 +60,7 @@ public abstract class VolumeControl : Object
public virtual bool high_volume_approved { get { return false; } protected set { } }
public virtual void approve_high_volume() { }
public virtual void clamp_to_high_volume() { }
+ public virtual void set_warning_volume() { }
public abstract void set_mute (bool mute);