aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control-pulse.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-13 09:49:55 +0200
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-10-13 09:49:55 +0200
commit828fae630464f2eae96145cffcf97e5791497264 (patch)
tree1f6050d65ac9ef0f251506c2abcb9a561c9a832c /src/volume-control-pulse.vala
parent8402eadfcbd96b753f7cf2402956c100812de54e (diff)
downloadayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.tar.gz
ayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.tar.bz2
ayatana-indicator-sound-828fae630464f2eae96145cffcf97e5791497264.zip
Added notifications tests integrated with the test instance of pulseAudio and gmenuharness
Diffstat (limited to 'src/volume-control-pulse.vala')
-rw-r--r--src/volume-control-pulse.vala11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index 042c1c1..ab0d6d7 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -206,10 +206,11 @@ public class VolumeControlPulse : VolumeControl
* checking for the port name. On touch (with the pulseaudio droid element)
* the headset/headphone port is called 'output-headset' and 'output-headphone'.
* On the desktop this is usually called 'analog-output-headphones' */
- if (i.active_port != null &&
- (i.active_port.name == "output-wired_headset" ||
- i.active_port.name == "output-wired_headphone" ||
- i.active_port.name == "analog-output-headphones")) {
+ if ( (i.active_port != null &&
+ (i.active_port.name == "output-wired_headset" ||
+ i.active_port.name == "output-wired_headphone" ||
+ i.active_port.name == "analog-output-headphones")) ||
+ (i.name == "indicator_sound_test_headphones")) {
_active_port_headphone = true;
} else {
_active_port_headphone = false;
@@ -711,7 +712,7 @@ public class VolumeControlPulse : VolumeControl
private bool calculate_high_volume_from_volume(double volume) {
return _active_port_headphone
&& _warning_volume_enabled
- && volume >= _warning_volume_norms
+ && volume > _warning_volume_norms
&& (stream == "multimedia");
}