From a5d0e139cbd332419d2e82f45e8656462e39d029 Mon Sep 17 00:00:00 2001 From: charles kerr Date: Sat, 19 Dec 2015 23:09:49 -0600 Subject: remove 'high_volume' property from volume-control --- src/volume-warning.vala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/volume-warning.vala') diff --git a/src/volume-warning.vala b/src/volume-warning.vala index 5809f61..423f129 100644 --- a/src/volume-warning.vala +++ b/src/volume-warning.vala @@ -30,6 +30,9 @@ public class VolumeWarning : VolumeControl // true if the warning dialog is currently active public bool active { get; public set; default = false; } + // true iff we're playing unapproved loud multimedia over headphones + public bool high_volume { get; protected set; default = false; } + // FIXME: this is temporarily necessary while bootstrapping this // code because VolumeWarning is still subclassed from VolumeControl, // but TBH we don't need any concept of mute here. @@ -638,7 +641,6 @@ public class VolumeWarning : VolumeControl /** HIGH VOLUME PROPERTY **/ - private bool _high_volume = false; public bool ignore_high_volume { get { if (_ignore_warning_this_time) { @@ -650,10 +652,6 @@ public class VolumeWarning : VolumeControl } set { } } - public override bool high_volume { - get { return this._high_volume; } - private set { this._high_volume = value; } - } private void init_high_volume() { _options.loud_changed.connect(() => update_high_volume()); update_high_volume(); @@ -674,7 +672,7 @@ public class VolumeWarning : VolumeControl && (stream == "multimedia"); } - public override void clamp_to_high_volume() { + public void clamp_to_high_volume() { if (_high_volume && _options.is_loud(_volume)) { var vol = new VolumeControl.Volume(); vol.volume = _volume.volume.clamp(0, volume_to_double(_options.loud_volume())); -- cgit v1.2.3