aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavi Garcia <xavi.garcia.mena@canonical.com>2015-08-12 11:51:52 +0200
committerXavi Garcia <xavi.garcia.mena@canonical.com>2015-08-12 11:51:52 +0200
commit04179cf043ffe4aadbba4504e30a89f97ff86267 (patch)
tree09107711e5bb601035d1b9bb3de6ad9d1fcf2e4f /src
parentde077cfdb0a73fc61218ee9f769a60e73499ebb9 (diff)
downloadayatana-indicator-sound-04179cf043ffe4aadbba4504e30a89f97ff86267.tar.gz
ayatana-indicator-sound-04179cf043ffe4aadbba4504e30a89f97ff86267.tar.bz2
ayatana-indicator-sound-04179cf043ffe4aadbba4504e30a89f97ff86267.zip
Changed sound icon when volume is 0
Diffstat (limited to 'src')
-rw-r--r--src/service.vala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/service.vala b/src/service.vala
index 73a331a..c2194a7 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -133,7 +133,7 @@ public class IndicatorSound.Service: Object {
private void show_notification(Notify.Notification? n) {
if (n != null) {
try {
- n.show ();
+ n.show ();
} catch (GLib.Error e) {
warning ("Unable to show notification: %s", e.message);
}
@@ -275,12 +275,10 @@ public class IndicatorSound.Service: Object {
void update_root_icon () {
double volume = this.volume_control.volume.volume;
string icon;
- if (this.volume_control.mute)
+ if (this.volume_control.mute || volume <= 0.0)
icon = this.mute_blocks_sound ? "audio-volume-muted-blocking-panel" : "audio-volume-muted-panel";
else if (this.accounts_service != null && this.accounts_service.silentMode)
icon = "audio-volume-muted-panel";
- else if (volume <= 0.0)
- icon = "audio-volume-low-zero-panel";
else if (volume <= 0.3)
icon = "audio-volume-low-panel";
else if (volume <= 0.7)