aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/service.vala2
-rw-r--r--src/volume-control-pulse.vala20
-rw-r--r--src/volume-control.vala1
-rw-r--r--src/volume-warning.vala2
4 files changed, 2 insertions, 23 deletions
diff --git a/src/service.vala b/src/service.vala
index 85e03fa..55743b5 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -619,7 +619,7 @@ public class IndicatorSound.Service: Object {
}
var loud = volume_control.high_volume;
- bool ignore_warning_this_time = this.volume_control.ignore_high_volume;
+ bool ignore_warning_this_time = _volume_warning.ignore_high_volume;
var warn = loud
&& this.notify_server_supports_actions
&& !this.volume_control.high_volume_approved
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index 25ba32f..985b897 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -42,7 +42,6 @@ public class VolumeControlPulse : VolumeControl
private PulseAudio.Context context;
private bool _mute = true;
private bool _is_playing = false;
- private bool _ignore_warning_this_time = false;
private VolumeControl.Volume _volume = new VolumeControl.Volume();
private double _mic_volume = 0.0;
private Settings _settings = new Settings ("com.canonical.indicator.sound");
@@ -345,10 +344,6 @@ public class VolumeControlPulse : VolumeControl
var vol = new VolumeControl.Volume();
vol.volume = volume_to_double (lvolume);
vol.reason = VolumeControl.VolumeReasons.PULSE_CHANGE;
- // Ignore changes from PULSE to avoid issues with
- // some apps that change the volume in the sink
- // We only take into account volume changes from the user
- this._ignore_warning_this_time = true;
this.volume = vol;
}
}
@@ -393,10 +388,6 @@ public class VolumeControlPulse : VolumeControl
var vol = new VolumeControl.Volume();
vol.volume = volume_to_double (volume);
vol.reason = VolumeControl.VolumeReasons.VOLUME_STREAM_CHANGE;
- // Ignore changes from PULSE to avoid issues with
- // some apps that change the volume in the sink
- // We only take into account volume changes from the user
- this._ignore_warning_this_time = true;
this.volume = vol;
} catch (GLib.Error e) {
warning ("unable to get volume for active role %s (%s)", sink_input_objp, e.message);
@@ -724,17 +715,6 @@ public class VolumeControlPulse : VolumeControl
/** HIGH VOLUME PROPERTY **/
private bool _high_volume = false;
- public override bool ignore_high_volume {
- get {
- if (_ignore_warning_this_time) {
- warning("Ignore");
- _ignore_warning_this_time = false;
- return true;
- }
- return false;
- }
- set { }
- }
public override bool high_volume {
get { return this._high_volume; }
private set { this._high_volume = value; }
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 62655be..430e9c5 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -55,7 +55,6 @@ public abstract class VolumeControl : Object
public virtual bool ready { get { return false; } set { } }
public virtual bool active_mic { get { return false; } set { } }
public virtual bool high_volume { get { return false; } protected set { } }
- public virtual bool ignore_high_volume { get { return false; } protected set { } }
public virtual bool mute { get { return false; } }
public virtual bool is_playing { get { return false; } }
public virtual VolumeControl.ActiveOutput active_output { get { return VolumeControl.ActiveOutput.SPEAKERS; } }
diff --git a/src/volume-warning.vala b/src/volume-warning.vala
index 01ddeff..452acbe 100644
--- a/src/volume-warning.vala
+++ b/src/volume-warning.vala
@@ -651,7 +651,7 @@ public class VolumeWarning : VolumeControl
/** HIGH VOLUME PROPERTY **/
private bool _high_volume = false;
- public override bool ignore_high_volume {
+ public bool ignore_high_volume {
get {
if (_ignore_warning_this_time) {
warning("Ignore");