[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/02: Use the appropriate constants for volume levels

noreply at xfce.org noreply at xfce.org
Sat Mar 21 12:07:01 CET 2015


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.

commit 1ac5a5b51b3310958e526eee2f93fe862760f89b
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Mar 21 12:05:38 2015 +0100

    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));

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list