aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-30 17:23:18 -0600
committercharles kerr <charlesk@canonical.com>2015-12-30 17:23:18 -0600
commit462abafeb9286aa91fdc11bd789914add4db6ca9 (patch)
tree1b40600d16f7cd3eeb15a266d0d088a77d9f3b75 /src/service.vala
parentbf558d1150e8ed346c659056ad4c18cbc26b8daa (diff)
downloadayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.tar.gz
ayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.tar.bz2
ayatana-indicator-sound-462abafeb9286aa91fdc11bd789914add4db6ca9.zip
make VolumeControl::active_output easier to mock for tests
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index 25b3520..cd016c1 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -48,7 +48,7 @@ public class IndicatorSound.Service: Object {
this.volume_control = volume;
this.volume_control.active_output_changed.connect(() => {
bool headphones;
- switch(volume_control.active_output) {
+ switch(volume_control.active_output()) {
case VolumeControl.ActiveOutput.HEADPHONES:
case VolumeControl.ActiveOutput.USB_HEADPHONES:
case VolumeControl.ActiveOutput.HDMI_HEADPHONES:
@@ -252,7 +252,7 @@ public class IndicatorSound.Service: Object {
void update_root_icon () {
double volume = this.volume_control.volume.volume;
- string icon = get_volume_root_icon (volume, this.volume_control.mute, volume_control.active_output);
+ string icon = get_volume_root_icon (volume, this.volume_control.mute, volume_control.active_output());
string accessible_name;
if (this.volume_control.mute) {
@@ -276,7 +276,7 @@ public class IndicatorSound.Service: Object {
private bool block_info_notifications = false;
- private string get_volume_root_icon_by_volume (double volume, VolumeControl.ActiveOutput active_output)
+ private static string get_volume_root_icon_by_volume (double volume, VolumeControl.ActiveOutput active_output)
{
string icon = "";
switch (active_output)
@@ -439,7 +439,7 @@ public class IndicatorSound.Service: Object {
private void update_notification () {
if (!_volume_warning.active && !block_info_notifications) {
- _info_notification.show(this.volume_control.active_output,
+ _info_notification.show(this.volume_control.active_output(),
get_volume_percent(),
_volume_warning.high_volume);
}