aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-10-15 09:15:26 -0500
committerTed Gould <ted@gould.cx>2014-10-15 09:15:26 -0500
commitc104a2064c6e328a20d134d5985828ba913b2bce (patch)
treefd1fc33f62bbde5a306cbafc0babf446f6bfbccb /src
parent714687351a4eb93f3fc712ef3ce2459371075142 (diff)
parent46c7d4c1cb1a6552ba205beaf233d66dcd4fc8a7 (diff)
downloadayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.tar.gz
ayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.tar.bz2
ayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.zip
Fixes for icon values and manual tests
Diffstat (limited to 'src')
-rw-r--r--src/service.vala2
-rw-r--r--src/volume-control.vala8
2 files changed, 7 insertions, 3 deletions
diff --git a/src/service.vala b/src/service.vala
index 64a89fd..bd44b0d 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -186,6 +186,8 @@ public class IndicatorSound.Service: Object {
double v = this.volume_control.get_volume () + volume_step_percentage * delta;
this.volume_control.set_volume (v.clamp (0.0, this.max_volume));
+ /* TODO: Don't want to mess up the desktop today, but we should remove this
+ scrolling change and merge that into volume control's notification */
if (this.notification != null) {
string icon;
if (v <= 0.0)
diff --git a/src/volume-control.vala b/src/volume-control.vala
index fb29d52..b40189b 100644
--- a/src/volume-control.vala
+++ b/src/volume-control.vala
@@ -617,11 +617,13 @@ public class VolumeControl : Object
/* Choose an icon */
string icon = "audio-volume-muted";
- if (volume > 0.0 && volume <= 0.33)
+ if (volume <= 0.0)
+ icon = "audio-volume-muted";
+ else if (volume <= 0.3)
icon = "audio-volume-low";
- if (volume > 0.33 && volume <= 0.66)
+ else if (volume <= 0.7)
icon = "audio-volume-medium";
- if (volume > 0.66 && volume <= 1.0)
+ else
icon = "audio-volume-high";
/* Choose a sound */