[gnome-control-center] sound: Put the level bar at 0 when muting



commit 48b2a58add9c36de0ed134ea1867907f9e184ce7
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 7 18:16:15 2011 +0100

    sound: Put the level bar at 0 when muting
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644537

 panels/sound/gvc-channel-bar.c |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/panels/sound/gvc-channel-bar.c b/panels/sound/gvc-channel-bar.c
index dea3775..f51745c 100644
--- a/panels/sound/gvc-channel-bar.c
+++ b/panels/sound/gvc-channel-bar.c
@@ -520,27 +520,27 @@ update_mute_switch (GvcChannelBar *bar)
                                        !bar->priv->is_muted);
         } else {
                 gtk_widget_hide (bar->priv->mute_switch);
+        }
 
-                if (bar->priv->is_muted) {
-                        /* If we aren't showing the mute button then
-                         * move slider to the zero.  But we don't want to
-                         * change the adjustment.  */
-                        g_signal_handlers_block_by_func (bar->priv->zero_adjustment,
-                                                         on_zero_adjustment_value_changed,
-                                                         bar);
-                        gtk_adjustment_set_value (bar->priv->zero_adjustment, 0);
-                        g_signal_handlers_unblock_by_func (bar->priv->zero_adjustment,
-                                                           on_zero_adjustment_value_changed,
-                                                           bar);
-                        gtk_range_set_adjustment (GTK_RANGE (bar->priv->scale),
-                                                  bar->priv->zero_adjustment);
-                } else {
-                        /* no longer muted so restore the original adjustment
-                         * and tell the front-end that the value changed */
-                        gtk_range_set_adjustment (GTK_RANGE (bar->priv->scale),
-                                                  bar->priv->adjustment);
-                        gtk_adjustment_value_changed (bar->priv->adjustment);
-                }
+        if (bar->priv->is_muted) {
+                /* If we aren't showing the mute button then
+                 * move slider to the zero.  But we don't want to
+                 * change the adjustment.  */
+                g_signal_handlers_block_by_func (bar->priv->zero_adjustment,
+                                                 on_zero_adjustment_value_changed,
+                                                 bar);
+                gtk_adjustment_set_value (bar->priv->zero_adjustment, 0);
+                g_signal_handlers_unblock_by_func (bar->priv->zero_adjustment,
+                                                   on_zero_adjustment_value_changed,
+                                                   bar);
+                gtk_range_set_adjustment (GTK_RANGE (bar->priv->scale),
+                                          bar->priv->zero_adjustment);
+        } else {
+                /* no longer muted so restore the original adjustment
+                 * and tell the front-end that the value changed */
+                gtk_range_set_adjustment (GTK_RANGE (bar->priv->scale),
+                                          bar->priv->adjustment);
+                gtk_adjustment_value_changed (bar->priv->adjustment);
         }
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]