From 1ac5a5b51b3310958e526eee2f93fe862760f89b Mon Sep 17 00:00:00 2001
From: Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>
Date: Sat, 21 Mar 2015 12:05:38 +0100
Subject: [PATCH] Use the appropriate constants for volume levels

---
 panel-plugin/pulseaudio-button.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/pulseaudio-button.c b/panel-plugin/pulseaudio-button.c
index 5412733..d634463 100644
--- a/panel-plugin/pulseaudio-button.c
+++ b/panel-plugin/pulseaudio-button.c
@@ -284,15 +284,15 @@ pulseaudio_button_update (PulseaudioButton *button,
   volume = pulseaudio_volume_get_volume (button->volume);
   muted = pulseaudio_volume_get_muted (button->volume);
   if (muted)
-    icon_name = icons[0];
+    icon_name = icons[V_MUTED];
   else if (volume <= 0.0)
-    icon_name = icons[0];
+    icon_name = icons[V_MUTED];
   else if (volume <= 0.3)
-    icon_name = icons[1];
+    icon_name = icons[V_LOW];
   else if (volume <= 0.7)
-    icon_name = icons[2];
+    icon_name = icons[V_MEDIUM];
   else
-    icon_name = icons[3];
+    icon_name = icons[V_HIGH];
 
   if (muted)
     tip_text = g_strdup_printf (_("Volume %d%% (muted)"), (gint) round (volume * 100));
-- 
GitLab