aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-03 09:27:38 -0500
committerTed Gould <ted@gould.cx>2014-10-03 09:27:38 -0500
commit9e1ec4502a70a6e91a9de96a96e26388b99e811b (patch)
treeb823af288d13e76e3c230fc97e6e4b807763279b /src
parentaf38d9e73aeca412a11b6b8e59039042375ed335 (diff)
downloadayatana-indicator-sound-9e1ec4502a70a6e91a9de96a96e26388b99e811b.tar.gz
ayatana-indicator-sound-9e1ec4502a70a6e91a9de96a96e26388b99e811b.tar.bz2
ayatana-indicator-sound-9e1ec4502a70a6e91a9de96a96e26388b99e811b.zip
Don't represent silent mode in the indicator
Diffstat (limited to 'src')
-rw-r--r--src/service.vala20
1 files 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);