diff --git a/libgimpwidgets/gimpsizeentry.c b/libgimpwidgets/gimpsizeentry.c index 91eb6a94cb..29c0a24603 100644 --- a/libgimpwidgets/gimpsizeentry.c +++ b/libgimpwidgets/gimpsizeentry.c @@ -321,12 +321,14 @@ gimp_size_entry_new (gint number_of_fields, gsef->refval_digits : ((unit == GIMP_UNIT_PERCENT) ? 2 : GIMP_SIZE_ENTRY_DIGITS (unit))); - gsef->value_spinbutton = gimp_spin_button_new ((GtkObject **) &gsef->value_adjustment, - gsef->value, - gsef->min_value, - gsef->max_value, - 1.0, 10.0, 0.0, - 1.0, digits); + gsef->value_adjustment = (GtkAdjustment *) + gtk_adjustment_new (gsef->value, + gsef->min_value, gsef->max_value, + 1.0, 10.0, 0.0); + gsef->value_spinbutton = gtk_spin_button_new (gsef->value_adjustment, + 1.0, digits); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gsef->value_spinbutton), + TRUE); gimp_size_entry_attach_eevl (GTK_SPIN_BUTTON (gsef->value_spinbutton), gsef); @@ -352,11 +354,15 @@ gimp_size_entry_new (gint number_of_fields, if (gse->show_refval) { - gsef->refval_spinbutton = - gimp_spin_button_new ((GtkObject **) &gsef->refval_adjustment, - gsef->refval, - gsef->min_refval, gsef->max_refval, - 1.0, 10.0, 0.0, 1.0, gsef->refval_digits); + gsef->refval_adjustment = (GtkAdjustment *) + gtk_adjustment_new (gsef->refval, + gsef->min_refval, gsef->max_refval, + 1.0, 10.0, 0.0); + gsef->refval_spinbutton = gtk_spin_button_new (gsef->refval_adjustment, + 1.0, + gsef->refval_digits); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gsef->refval_spinbutton), + TRUE); gtk_widget_set_size_request (gsef->refval_spinbutton, spinbutton_width, -1);