aboutsummaryrefslogtreecommitdiff
path: root/src/volume-control.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/volume-control.vala')
-rw-r--r--src/volume-control.vala24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/volume-control.vala b/src/volume-control.vala
index 8de5d2f..33ba878 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -76,7 +76,6 @@ public class VolumeControl : Object
_notification.set_hint ("value", 0);
_notification.set_hint ("x-canonical-private-synchronous", "true");
_notification.set_hint ("x-canonical-non-shaped-icon", "true");
- _notification.set_hint ("sound-file", "/usr/share/sounds/ubuntu/stereo/message.ogg");
setup_accountsservice.begin ();
@@ -350,18 +349,19 @@ public class VolumeControl : Object
public void set_volume (double volume)
{
- if (set_volume_internal (volume)) {
- if (_volume == 0.0)
- _notification.update ("Volume", "", "audio-volume-muted");
- if (_volume > 0.0 && _volume <= 0.33)
- _notification.update ("Volume", "", "audio-volume-low");
- if (_volume > 0.33 && _volume <= 0.66)
- _notification.update ("Volume", "", "audio-volume-medium");
- if (_volume > 0.66 && _volume <= 1.0)
- _notification.update ("Volume", "", "audio-volume-high");
- _notification.set_hint ("value", _volume * 100.0);
- _notification.show ();
+ if (_volume == 0.0)
+ _notification.update ("Volume", "", "audio-volume-muted");
+ if (_volume > 0.0 && _volume <= 0.33)
+ _notification.update ("Volume", "", "audio-volume-low");
+ if (_volume > 0.33 && _volume <= 0.66)
+ _notification.update ("Volume", "", "audio-volume-medium");
+ if (_volume > 0.66 && _volume <= 1.0)
+ _notification.update ("Volume", "", "audio-volume-high");
+ _notification.set_hint ("value", _volume * 100.0);
+ _notification.set_hint ("sound-file", "/usr/share/sounds/ubuntu/stereo/message.ogg");
+ _notification.show ();
+ if (set_volume_internal (volume)) {
start_local_volume_timer();
}
}