From 9e1ec4502a70a6e91a9de96a96e26388b99e811b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 3 Oct 2014 09:27:38 -0500 Subject: Don't represent silent mode in the indicator --- src/service.vala | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/service.vala b/src/service.vala index 18f283b..2a65492 100644 --- a/src/service.vala +++ b/src/service.vala @@ -227,26 +227,10 @@ public class IndicatorSound.Service: Object { return icon.serialize (); } - /* This kinda got complex with both mute and silent mode. So we're - gonna put it into a function */ - bool user_sound_output () { - if (this.volume_control.mute) { - return false; - } - - if (this.accounts_service != null) { - if (this.accounts_service.silentMode) { - return false; - } - } - - return true; - } - void update_root_icon () { double volume = this.volume_control.get_volume (); string icon; - if (!user_sound_output()) + if (this.volume_control.mute) icon = this.mute_blocks_sound ? "audio-volume-muted-blocking-panel" : "audio-volume-muted-panel"; else if (volume <= 0.0) icon = "audio-volume-low-zero-panel"; @@ -258,7 +242,7 @@ public class IndicatorSound.Service: Object { icon = "audio-volume-high-panel"; string accessible_name; - if (!user_sound_output()) { + if (this.volume_control.mute) { accessible_name = _("Volume (muted)"); } else { int volume_int = (int)(volume * 100); -- cgit v1.2.3