diff --git a/ChangeLog b/ChangeLog index e4ddaff9b2..6cded11b8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-26 Sven Neumann + + * app/widgets/gimppropwidgets.c + * app/widgets/gimpscalebutton.[ch]: some fiddling to get the step + and page sizes right. + 2008-05-26 Sven Neumann * app/widgets/gimppropwidgets.[ch]: support for GimpScaleButton. diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c index 50bbd25083..d065bd30e9 100644 --- a/app/widgets/gimppropwidgets.c +++ b/app/widgets/gimppropwidgets.c @@ -365,10 +365,9 @@ gimp_prop_scale_button_new (GObject *config, { GParamSpec *param_spec; GtkWidget *button; - GtkObject *adj; gdouble value; - gdouble lower; - gdouble upper; + gdouble min; + gdouble max; param_spec = check_param_spec_w (config, property_name, G_TYPE_PARAM_DOUBLE, G_STRFUNC); @@ -380,14 +379,12 @@ gimp_prop_scale_button_new (GObject *config, param_spec->name, &value, NULL); - lower = G_PARAM_SPEC_DOUBLE (param_spec)->minimum; - upper = G_PARAM_SPEC_DOUBLE (param_spec)->maximum; + min = G_PARAM_SPEC_DOUBLE (param_spec)->minimum; + max = G_PARAM_SPEC_DOUBLE (param_spec)->maximum; - button = gimp_scale_button_new (); + button = gimp_scale_button_new (min, max, (max - min) / 10.0); - adj = gtk_adjustment_new (value, lower, upper, (upper - lower) / 10.0, 0, 0); - gtk_scale_button_set_adjustment (GTK_SCALE_BUTTON (button), - GTK_ADJUSTMENT (adj)); + gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), value); set_param_spec (G_OBJECT (button), button, param_spec); diff --git a/app/widgets/gimpscalebutton.c b/app/widgets/gimpscalebutton.c index bf91fb19bb..301328acf5 100644 Binary files a/app/widgets/gimpscalebutton.c and b/app/widgets/gimpscalebutton.c differ diff --git a/app/widgets/gimpscalebutton.h b/app/widgets/gimpscalebutton.h index d7d7d45ff5..47540ac6b8 100644 --- a/app/widgets/gimpscalebutton.h +++ b/app/widgets/gimpscalebutton.h @@ -46,7 +46,9 @@ struct _GimpScaleButtonClass GType gimp_scale_button_get_type (void) G_GNUC_CONST; -GtkWidget * gimp_scale_button_new (void); +GtkWidget * gimp_scale_button_new (gdouble min, + gdouble max, + gdouble step); #endif /* __GIMP_SCALE_BUTTON_H__ */