diff --git a/ChangeLog b/ChangeLog index dddfacebff..e4eacb2f01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-09 Matthias Clasen + + * gtk/gtkhscale.c (gtk_hscale_new): + * gtk/gtkvscale.c (gtk_vscale_new): Cosmetic change to make + it more obvious that this is a convenience function. + 2007-06-09 Matthias Clasen * gtk/gtkcalendar.c (gtk_calendar_init): Handle return values diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c index 4b407ccf59..1a6f730b07 100644 --- a/gtk/gtkhscale.c +++ b/gtk/gtkhscale.c @@ -106,10 +106,6 @@ gtk_hscale_new_with_range (gdouble min, g_return_val_if_fail (step != 0.0, NULL); adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0); - - scale = g_object_new (GTK_TYPE_HSCALE, - "adjustment", adj, - NULL); if (fabs (step) >= 1.0 || step == 0.0) digits = 0; @@ -118,8 +114,11 @@ gtk_hscale_new_with_range (gdouble min, if (digits > 5) digits = 5; } - - gtk_scale_set_digits (scale, digits); + + scale = g_object_new (GTK_TYPE_HSCALE, + "adjustment", adj, + "digits", digits, + NULL); return GTK_WIDGET (scale); } diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c index b0321e8b41..8f8fb6dfd5 100644 --- a/gtk/gtkvscale.c +++ b/gtk/gtkvscale.c @@ -109,10 +109,6 @@ gtk_vscale_new_with_range (gdouble min, adj = gtk_adjustment_new (min, min, max, step, 10 * step, 0); - scale = g_object_new (GTK_TYPE_VSCALE, - "adjustment", adj, - NULL); - if (fabs (step) >= 1.0 || step == 0.0) digits = 0; else { @@ -121,7 +117,10 @@ gtk_vscale_new_with_range (gdouble min, digits = 5; } - gtk_scale_set_digits (scale, digits); + scale = g_object_new (GTK_TYPE_VSCALE, + "adjustment", adj, + "digits", digits, + NULL); return GTK_WIDGET (scale); }