[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 02/12: Use the same icon names and sizes as in xfce4-mixer

noreply at xfce.org noreply at xfce.org
Tue Feb 17 00:12:41 CET 2015


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

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

commit 674ebf1a5c9ba91578c0ff5bad4cc27b56edc4cd
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Apr 25 00:27:41 2014 +0100

    Use the same icon names and sizes as in xfce4-mixer
    
    Icons audio-volume-...-panel used in sound-indicator are one size only.
---
 panel-plugin/pulseaudio-button.c |   21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/panel-plugin/pulseaudio-button.c b/panel-plugin/pulseaudio-button.c
index eed39b2..b61f38f 100644
--- a/panel-plugin/pulseaudio-button.c
+++ b/panel-plugin/pulseaudio-button.c
@@ -32,21 +32,19 @@
 #include "pulseaudio-button.h"
 
 #define V_MUTED  0
-#define V_ZERO   1
-#define V_LOW    2
-#define V_MEDIUM 3
-#define V_HIGH   4
+#define V_LOW    1
+#define V_MEDIUM 2
+#define V_HIGH   3
 
 #define STEP 0.06
 
 
 /* Icons for different volume levels */
 static const char *icons[] = {
-  "audio-volume-muted-panel",
-  "audio-volume-low-zero-panel",
-  "audio-volume-low-panel",
-  "audio-volume-medium-panel",
-  "audio-volume-high-panel",
+  "audio-volume-muted",
+  "audio-volume-low",
+  "audio-volume-medium",
+  "audio-volume-high",
   NULL
 };
 
@@ -76,6 +74,7 @@ struct _PulseaudioButton
 
   /* Icon size currently used */
   gint                  icon_size;
+  gint                  size;
 
   /* Array of preloaded icons */
   guint                 pixbuf_idx;
@@ -296,7 +295,7 @@ pulseaudio_button_update (PulseaudioButton *button,
   if (pulseaudio_volume_get_muted (button->volume))
     idx = V_MUTED;
   else if (volume <= 0.0)
-    idx = V_ZERO;
+    idx = V_MUTED;
   else if (volume <= 0.3)
     idx = V_LOW;
   else if (volume <= 0.7)
@@ -319,7 +318,7 @@ pulseaudio_button_set_size (PulseaudioButton *button,
   g_return_if_fail (IS_PULSEAUDIO_BUTTON (button));
   g_return_if_fail (size > 0);
 
-  button->icon_size = size - 2;
+  button->icon_size = size - 4;
   gtk_widget_set_size_request (GTK_WIDGET (button), size, size);
   pulseaudio_button_update_icons (button);
 }

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


More information about the Xfce4-commits mailing list