[gnome-media] Fix run-time warning



commit b28b6712d2c9dcb595aae5d8442b0ec06f8df0dd
Author: Bastien Nocera <hadess hadess net>
Date:   Thu May 21 10:51:42 2009 +0100

    Fix run-time warning
    
    The scale didn't exist at that point.
---
 gnome-volume-control/src/gvc-balance-bar.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnome-volume-control/src/gvc-balance-bar.c b/gnome-volume-control/src/gvc-balance-bar.c
index acdf0aa..9cec457 100644
--- a/gnome-volume-control/src/gvc-balance-bar.c
+++ b/gnome-volume-control/src/gvc-balance-bar.c
@@ -131,7 +131,9 @@ _scale_box_new (GvcBalanceBar *bar)
                 gtk_scale_add_mark (GTK_SCALE (priv->scale),
                                     (adjustment->upper - adjustment->lower)/2 + adjustment->lower,
                                     GTK_POS_BOTTOM, NULL);
-        }
+        } else {
+                gtk_scale_set_digits (GTK_SCALE (bar->priv->scale), 0);
+	}
 
         bar->priv->end_box = ebox = gtk_hbox_new (FALSE, 6);
         gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
@@ -275,7 +277,6 @@ gvc_balance_bar_set_balance_type (GvcBalanceBar *bar,
                                                                             ADJUSTMENT_MAX_NORMAL/100.0,
                                                                             ADJUSTMENT_MAX_NORMAL/10.0,
                                                                             0.0));
-                gtk_scale_set_digits (GTK_SCALE (bar->priv->scale), 0);
         }
 
         g_object_ref_sink (bar->priv->adjustment);



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