aboutsummaryrefslogtreecommitdiff
path: root/tests/volume-control-mock.vala
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-08-12 20:55:01 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-08-12 20:55:01 +0000
commitcd0495a9ef8beca52290b01c2df5c8ba2554e03b (patch)
tree677c774c380914e03c76646d22cf40200fe4803c /tests/volume-control-mock.vala
parentde077cfdb0a73fc61218ee9f769a60e73499ebb9 (diff)
parent480d998efb8bcd94401ff2d7c40a1fb9b81d8db1 (diff)
downloadayatana-indicator-sound-cd0495a9ef8beca52290b01c2df5c8ba2554e03b.tar.gz
ayatana-indicator-sound-cd0495a9ef8beca52290b01c2df5c8ba2554e03b.tar.bz2
ayatana-indicator-sound-cd0495a9ef8beca52290b01c2df5c8ba2554e03b.zip
When showing a "Loud volumes can damage your hearing" confirmation warning, clamp the volume until the user hits "OK". Fixes: #1481913
Approved by: Antti Kaijanmäki, PS Jenkins bot
Diffstat (limited to 'tests/volume-control-mock.vala')
-rw-r--r--tests/volume-control-mock.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/volume-control-mock.vala b/tests/volume-control-mock.vala
index 4c96518..dc11fba 100644
--- a/tests/volume-control-mock.vala
+++ b/tests/volume-control-mock.vala
@@ -20,12 +20,14 @@
public class VolumeControlMock : VolumeControl
{
+ private bool _high_volume = false;
+ public override bool high_volume { get { return _high_volume; } protected set { _high_volume = value; } }
+ public void set_high_volume(bool b) { high_volume = b; }
+
public string mock_stream { get; set; default = "multimedia"; }
public override string stream { get { return mock_stream; } }
public override bool ready { get; set; }
public override bool active_mic { get; set; }
- public bool mock_high_volume { get; set; }
- public override bool high_volume { get { return mock_high_volume; } }
public bool mock_mute { get; set; }
public override bool mute { get { return mock_mute; } }
public bool mock_is_playing { get; set; }