[gnome-control-center/gnome-3-2] sound: Put the level bar at 0 when muting
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-2] sound: Put the level bar at 0 when muting
- Date: Wed, 7 Sep 2011 17:21:45 +0000 (UTC)
commit 8c32c01c4d94eb88733545ba1c10eb7284340cf5
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 45fa700..4d02484 100644
--- a/panels/sound/gvc-channel-bar.c
+++ b/panels/sound/gvc-channel-bar.c
@@ -520,27 +520,27 @@ update_mute_button (GvcChannelBar *bar)
bar->priv->is_muted);
} else {
gtk_widget_hide (bar->priv->mute_button);
+ }
- 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]