← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~cjcurran/indicator-sound/bugfix_522765 into lp:indicator-sound

 

Conor Curran has proposed merging lp:~cjcurran/indicator-sound/bugfix_522765 into lp:indicator-sound.

    Requested reviews:
    Indicator Applet Developers (indicator-applet-developers)


Bug fix which disables slider when in mute state. More tricky than first anticipated. 
-- 
https://code.launchpad.net/~cjcurran/indicator-sound/bugfix_522765/+merge/19610
Your team ayatana-commits is subscribed to branch lp:indicator-sound.
=== modified file 'src/indicator-sound.c'
--- src/indicator-sound.c	2010-02-18 11:11:38 +0000
+++ src/indicator-sound.c	2010-02-18 14:34:13 +0000
@@ -326,6 +326,7 @@
 static void determine_state_from_volume(gdouble volume_percent)
 {
 /*    g_debug("determine_state_from_volume - previous_state = %i", previous_state);*/
+
     gint state = previous_state;
     if (volume_percent < 30.0 && volume_percent > 0){
         state = STATE_LOW;
@@ -431,6 +432,8 @@
 **/
 static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data)
 {
+    if (current_state == STATE_MUTED)
+        return FALSE;
 
     GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);
     GtkRange* range = (GtkRange*)slider;       

=== modified file 'src/pulse-manager.c'
--- src/pulse-manager.c	2010-02-18 11:11:38 +0000
+++ src/pulse-manager.c	2010-02-18 14:34:13 +0000
@@ -342,7 +342,7 @@
         if(DEFAULT_SINK_INDEX == s->index)
         {
             //update the UI
-            if (volume_changed == TRUE)
+            if (volume_changed == TRUE && s->mute == FALSE)
             {
                 pa_volume_t vol = pa_cvolume_avg(&s->volume);
                 gdouble volume_percent = ((gdouble) vol * 100) / PA_VOLUME_NORM;


Follow ups