Commit 8954d1f3 authored by Ell's avatar Ell

libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere

Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
parent 0a1e688c
......@@ -199,7 +199,7 @@ convert_indexed_dialog_new (GimpImage *image,
private->max_colors = 255;
adjustment = gtk_adjustment_new (private->max_colors, 2, 256, 1, 8, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), spinbutton);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
......
......@@ -261,7 +261,7 @@ layer_options_dialog_new (GimpImage *image,
/* The size sizeentry */
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 2);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
......@@ -318,7 +318,7 @@ layer_options_dialog_new (GimpImage *image,
/* The offset sizeentry */
adjustment = gtk_adjustment_new (0, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 2);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
......
......@@ -169,7 +169,7 @@ offset_dialog_new (GimpDrawable *drawable,
gtk_widget_show (vbox);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 2);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
......
......@@ -155,12 +155,12 @@ print_size_dialog_new (GimpImage *image,
/* the print size entry */
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
width = gtk_spin_button_new (adj, 1.0, 2);
width = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (width), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (width), SB_WIDTH);
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
height = gtk_spin_button_new (adj, 1.0, 2);
height = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (height), SB_WIDTH);
......@@ -216,12 +216,12 @@ print_size_dialog_new (GimpImage *image,
/* the resolution entry */
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
width = gtk_spin_button_new (adj, 1.0, 2);
width = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (width), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (width), SB_WIDTH);
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
height = gtk_spin_button_new (adj, 1.0, 2);
height = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (height), SB_WIDTH);
......
......@@ -236,7 +236,7 @@ resize_dialog_new (GimpViewable *viewable,
/* the offset sizeentry */
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 2);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), SB_WIDTH);
......
......@@ -157,7 +157,7 @@ gimp_display_shell_rotate_dialog (GimpDisplayShell *shell)
data->rotate_adj = gtk_adjustment_new (shell->rotate_angle,
0.0, 360.0, 1, 15, 0);
spin = gtk_spin_button_new (data->rotate_adj, 1.0, 2);
spin = gimp_spin_button_new (data->rotate_adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spin), TRUE);
......
......@@ -165,7 +165,7 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
gimp_zoom_model_get_fraction (data->model, &num, &denom);
data->num_adj = gtk_adjustment_new (num, 1, 256, 1, 8, 0);
spin = gtk_spin_button_new (data->num_adj, 1.0, 0);
spin = gimp_spin_button_new (data->num_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spin), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spin, TRUE, TRUE, 0);
......@@ -176,7 +176,7 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
gtk_widget_show (label);
data->denom_adj = gtk_adjustment_new (denom, 1, 256, 1, 8, 0);
spin = gtk_spin_button_new (data->denom_adj, 1.0, 0);
spin = gimp_spin_button_new (data->denom_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spin), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spin, TRUE, TRUE, 0);
......@@ -190,7 +190,7 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
data->scale_adj = gtk_adjustment_new (fabs (shell->other_scale) * 100,
100.0 / 256.0, 25600.0,
10, 50, 0);
spin = gtk_spin_button_new (data->scale_adj, 1.0, 2);
spin = gimp_spin_button_new (data->scale_adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spin), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spin, TRUE, TRUE, 0);
......
......@@ -1294,7 +1294,7 @@ gimp_gradient_tool_editor_init_endpoint_gui (GimpGradientTool *gradient_tool)
gtk_widget_show (label);
/* the position size entry */
spinbutton = gtk_spin_button_new_with_range (0.0, 0.0, 1.0);
spinbutton = gimp_spin_button_new_with_range (0.0, 0.0, 1.0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 6);
......
......@@ -793,7 +793,7 @@ gimp_rectangle_options_prop_dimension_frame_new (GObject *config,
gtk_widget_show (hbox);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), SB_WIDTH);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
......
......@@ -272,7 +272,7 @@ gimp_rotate_tool_dialog (GimpTransformGridTool *tg_tool)
gtk_widget_show (grid);
rotate->angle_adj = gtk_adjustment_new (0, -180, 180, 0.1, 15, 0);
button = gtk_spin_button_new (rotate->angle_adj, 1.0, 2);
button = gimp_spin_button_new (rotate->angle_adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (button), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (button), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (button), SB_WIDTH);
......@@ -292,7 +292,7 @@ gimp_rotate_tool_dialog (GimpTransformGridTool *tg_tool)
gtk_widget_show (scale);
adj = gtk_adjustment_new (0, -1, 1, 1, 10, 0);
button = gtk_spin_button_new (adj, 1.0, 2);
button = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (button), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (button), SB_WIDTH);
gtk_widget_set_halign (button, GTK_ALIGN_START);
......
......@@ -201,8 +201,8 @@ gimp_colormap_editor_init (GimpColormapEditor *editor)
gtk_widget_show (grid);
editor->index_adjustment = gtk_adjustment_new (0, 0, 0, 1, 10, 0);
editor->index_spinbutton = gtk_spin_button_new (editor->index_adjustment,
1.0, 0);
editor->index_spinbutton = gimp_spin_button_new (editor->index_adjustment,
1.0, 0);
gtk_widget_set_halign (editor->index_spinbutton, GTK_ALIGN_START);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (editor->index_spinbutton),
TRUE);
......
......@@ -142,7 +142,7 @@ gimp_histogram_box_init (GimpHistogramBox *box)
/* low spinbutton */
box->low_adj = gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 16.0, 0.0);
box->low_spinbutton = gtk_spin_button_new (box->low_adj, 1.0, 0);
box->low_spinbutton = gimp_spin_button_new (box->low_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (box->low_spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), box->low_spinbutton, FALSE, FALSE, 0);
gtk_widget_show (box->low_spinbutton);
......@@ -155,7 +155,7 @@ gimp_histogram_box_init (GimpHistogramBox *box)
/* high spinbutton */
box->high_adj = gtk_adjustment_new (255.0, 0.0, 255.0, 1.0, 16.0, 0.0);
box->high_spinbutton = gtk_spin_button_new (box->high_adj, 1.0, 0);
box->high_spinbutton = gimp_spin_button_new (box->high_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (box->high_spinbutton), TRUE);
gtk_box_pack_end (GTK_BOX (hbox), box->high_spinbutton, FALSE, FALSE, 0);
gtk_widget_show (box->high_spinbutton);
......
......@@ -268,7 +268,7 @@ gimp_palette_editor_init (GimpPaletteEditor *editor)
gtk_widget_show (icon);
editor->columns_adj = gtk_adjustment_new (0, 0, 64, 1, 4, 0);
spinbutton = gtk_spin_button_new (editor->columns_adj, 1.0, 0);
spinbutton = gimp_spin_button_new (editor->columns_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......
......@@ -131,7 +131,7 @@ static void gimp_spin_scale_setup_mnemonic (GimpSpinScale *scale,
G_DEFINE_TYPE_WITH_PRIVATE (GimpSpinScale, gimp_spin_scale,
GTK_TYPE_SPIN_BUTTON)
GIMP_TYPE_SPIN_BUTTON)
#define parent_class gimp_spin_scale_parent_class
......
......@@ -35,12 +35,12 @@ typedef struct _GimpSpinScaleClass GimpSpinScaleClass;
struct _GimpSpinScale
{
GtkSpinButton parent_instance;
GimpSpinButton parent_instance;
};
struct _GimpSpinScaleClass
{
GtkSpinButtonClass parent_class;
GimpSpinButtonClass parent_class;
};
......
......@@ -180,12 +180,12 @@ gimp_template_editor_constructed (GObject *object)
gtk_widget_show (grid);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
width = gtk_spin_button_new (adjustment, 1.0, 2);
width = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (width), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (width), SB_WIDTH);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
height = gtk_spin_button_new (adjustment, 1.0, 2);
height = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (height), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (height), SB_WIDTH);
......@@ -303,12 +303,12 @@ gimp_template_editor_constructed (GObject *object)
gtk_widget_show (grid);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
xres = gtk_spin_button_new (adjustment, 1.0, 2);
xres = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xres), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (xres), SB_WIDTH);
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
yres = gtk_spin_button_new (adjustment, 1.0, 2);
yres = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (yres), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (yres), SB_WIDTH);
......
......@@ -265,8 +265,8 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
editor->kerning_adjustment = gtk_adjustment_new (0.0, -1000.0, 1000.0,
1.0, 10.0, 0.0);
editor->kerning_spinbutton = gtk_spin_button_new (editor->kerning_adjustment,
1.0, 1);
editor->kerning_spinbutton =
gimp_spin_button_new (editor->kerning_adjustment, 1.0, 1);
gtk_entry_set_width_chars (GTK_ENTRY (editor->kerning_spinbutton), 5);
gtk_box_pack_end (GTK_BOX (editor->lower_hbox), editor->kerning_spinbutton,
FALSE, FALSE, 0);
......@@ -281,8 +281,8 @@ gimp_text_style_editor_init (GimpTextStyleEditor *editor)
editor->baseline_adjustment = gtk_adjustment_new (0.0, -1000.0, 1000.0,
1.0, 10.0, 0.0);
editor->baseline_spinbutton = gtk_spin_button_new (editor->baseline_adjustment,
1.0, 1);
editor->baseline_spinbutton =
gimp_spin_button_new (editor->baseline_adjustment, 1.0, 1);
gtk_entry_set_width_chars (GTK_ENTRY (editor->baseline_spinbutton), 5);
gtk_box_pack_end (GTK_BOX (editor->lower_hbox), editor->baseline_spinbutton,
FALSE, FALSE, 0);
......
......@@ -200,7 +200,7 @@ gimp_memsize_entry_new (guint64 value,
CAST (upper >> shift),
1, 8, 0);
private->spinbutton = gtk_spin_button_new (private->adjustment, 1.0, 0);
private->spinbutton = gimp_spin_button_new (private->adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (private->spinbutton), TRUE);
#undef CAST
......
......@@ -1232,7 +1232,7 @@ gimp_prop_spin_button_new (GObject *config,
adjustment = gtk_adjustment_new (value, lower, upper,
step_increment, page_increment, 0);
spinbutton = gtk_spin_button_new (adjustment, step_increment, digits);
spinbutton = gimp_spin_button_new (adjustment, step_increment, digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
set_param_spec (G_OBJECT (adjustment), spinbutton, param_spec);
......
......@@ -26,11 +26,6 @@
#include "libgimpbase/gimpbase.h"
#include "gimpwidgetstypes.h"
#include "gimpdialog.h"
#include "gimpquerybox.h"
#include "gimpsizeentry.h"
#include "gimpwidgets.h"
#include "libgimp/libgimp-intl.h"
......@@ -338,7 +333,7 @@ gimp_query_int_box (const gchar *title,
return NULL;
adjustment = gtk_adjustment_new (initial, lower, upper, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0);
......@@ -401,7 +396,7 @@ gimp_query_double_box (const gchar *title,
return NULL;
adjustment = gtk_adjustment_new (initial, lower, upper, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (query_box->vbox), spinbutton, FALSE, FALSE, 0);
......
......@@ -156,7 +156,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
spinbutton = gtk_spin_button_new (spin_adjustment, step_increment, digits);
spinbutton = gimp_spin_button_new (spin_adjustment, step_increment, digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_widget_show (spinbutton);
......
......@@ -458,7 +458,7 @@ gimp_random_seed_new (guint *seed,
*seed = g_random_int ();
adj = gtk_adjustment_new (*seed, 0, (guint32) -1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......@@ -694,7 +694,7 @@ gimp_coordinates_new (GimpUnit unit,
GtkWidget *chainbutton;
adjustment = gtk_adjustment_new (1, 0, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 2);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
if (spinbutton_width > 0)
......
......@@ -1323,7 +1323,7 @@ bender_new_dialog (GimpDrawable *drawable)
cd->rotate_data = gtk_adjustment_new (0, 0.0, 360.0, 1, 45, 0);
gtk_adjustment_set_value (cd->rotate_data, cd->rotation);
spinbutton = gtk_spin_button_new (cd->rotate_data, 0.5, 1);
spinbutton = gimp_spin_button_new (cd->rotate_data, 0.5, 1);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......
......@@ -337,7 +337,7 @@ save_dialog (void)
info.description);
adj = gtk_adjustment_new (info.spacing, 1, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
......
......@@ -557,7 +557,7 @@ gih_save_dialog (gint32 image_ID)
* Spacing: __
*/
adjustment = gtk_adjustment_new (info.spacing, 1, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Spacing (percent):"), 0.0, 0.5,
......@@ -574,7 +574,7 @@ gih_save_dialog (gint32 image_ID)
adjustment = gtk_adjustment_new (gihparams.cellwidth,
2, gimp_image_width (image_ID), 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (box), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......@@ -597,7 +597,7 @@ gih_save_dialog (gint32 image_ID)
adjustment = gtk_adjustment_new (gihparams.cellheight,
2, gimp_image_height (image_ID), 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (box), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......@@ -627,7 +627,7 @@ gih_save_dialog (gint32 image_ID)
* Number of cells: ___
*/
adjustment = gtk_adjustment_new (gihparams.ncells, 1, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
_("Number of cells:"), 0.0, 0.5,
......@@ -688,7 +688,7 @@ gih_save_dialog (gint32 image_ID)
*/
adjustment = gtk_adjustment_new (gihparams.dim,
1, GIMP_PIXPIPE_MAXDIM, 1, 1, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 5,
_("Dimension:"), 0.0, 0.5,
......@@ -709,7 +709,7 @@ gih_save_dialog (gint32 image_ID)
gint j;
adjustment = gtk_adjustment_new (gihparams.rank[i], 1, 100, 1, 1, 0);
spinbutton = gtk_spin_button_new (adjustment, 1.0, 0);
spinbutton = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_grid_attach (GTK_GRID (dimgrid), spinbutton, 0, i, 1, 1);
......
......@@ -624,7 +624,7 @@ save_dialog (gint32 image_ID)
gtk_container_add (GTK_CONTAINER (frame), grid);
adj = gtk_adjustment_new (gtmvals.border, 0, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("_Border:"), 0.0, 0.5,
......@@ -671,7 +671,7 @@ save_dialog (gint32 image_ID)
gtmvals.clheight);
adj = gtk_adjustment_new (gtmvals.cellpadding, 0, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
_("Cell-_padding:"), 0.0, 0.5,
......@@ -685,7 +685,7 @@ save_dialog (gint32 image_ID)
&gtmvals.cellpadding);
adj = gtk_adjustment_new (gtmvals.cellspacing, 0, 1000, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 4,
_("Cell-_spacing:"), 0.0, 0.5,
......
......@@ -1528,7 +1528,7 @@ mng_save_dialog (gint32 image_id)
spinbutton_adj = gtk_adjustment_new (mng_data.default_delay,
0, 65000, 10, 100, 0);
spinbutton = gtk_spin_button_new (spinbutton_adj, 1.0, 0);
spinbutton = gimp_spin_button_new (spinbutton_adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
g_signal_connect (spinbutton_adj, "value-changed",
......
......@@ -1370,8 +1370,8 @@ gimp_resolution_entry_field_init (GimpResolutionEntry *gre,
gref->min_value,
gref->max_value,
1.0, 10.0, 0.0);
gref->spinbutton = gtk_spin_button_new (gref->adjustment,
1.0, digits);
gref->spinbutton = gimp_spin_button_new (gref->adjustment,
1.0, digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (gref->spinbutton), TRUE);
if (spinbutton_width > 0)
......
......@@ -3451,7 +3451,7 @@ load_dialog (const gchar *filename)
adj = gtk_adjustment_new (plvals.resolution,
MIN_RESOLUTION, MAX_RESOLUTION,
1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("Resolution:"), 0.0, 0.5,
......@@ -3467,7 +3467,7 @@ load_dialog (const gchar *filename)
adj = gtk_adjustment_new (plvals.width,
1, GIMP_MAX_IMAGE_SIZE,
1, 10, 0);
ps_width_spinbutton = gtk_spin_button_new (adj, 1.0, 0);
ps_width_spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("_Width:"), 0.0, 0.5,
......@@ -3480,7 +3480,7 @@ load_dialog (const gchar *filename)
adj = gtk_adjustment_new (plvals.height,
1, GIMP_MAX_IMAGE_SIZE,
1, 10, 0);
ps_height_spinbutton = gtk_spin_button_new (adj, 1.0, 0);
ps_height_spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
_("_Height:"), 0.0, 0.5,
......@@ -3670,7 +3670,7 @@ save_dialog (void)
vals->adjustment[0] = gtk_adjustment_new (psvals.width,
1e-5, GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (vals->adjustment[0], 1.0, 2);
spinbutton = gimp_spin_button_new (vals->adjustment[0], 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("_Width:"), 0.0, 0.5,
......@@ -3681,7 +3681,7 @@ save_dialog (void)
vals->adjustment[1] = gtk_adjustment_new (psvals.height,
1e-5, GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (vals->adjustment[1], 1.0, 2);
spinbutton = gimp_spin_button_new (vals->adjustment[1], 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("_Height:"), 0.0, 0.5,
......@@ -3692,7 +3692,7 @@ save_dialog (void)
vals->adjustment[2] = gtk_adjustment_new (psvals.x_offset,
0.0, GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (vals->adjustment[2], 1.0, 2);
spinbutton = gimp_spin_button_new (vals->adjustment[2], 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 2,
_("_X offset:"), 0.0, 0.5,
......@@ -3703,7 +3703,7 @@ save_dialog (void)
vals->adjustment[3] = gtk_adjustment_new (psvals.y_offset,
0.0, GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (vals->adjustment[3], 1.0, 2);
spinbutton = gimp_spin_button_new (vals->adjustment[3], 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 3,
_("_Y offset:"), 0.0, 0.5,
......@@ -3804,7 +3804,7 @@ save_dialog (void)
adj = gtk_adjustment_new (psvals.preview_size,
0, 1024, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("Preview _size:"), 1.0, 0.5,
......
......@@ -795,7 +795,7 @@ load_dialog (const gchar *filename,
gtk_widget_show (hbox);
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 2);
spinbutton = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
......@@ -845,7 +845,7 @@ load_dialog (const gchar *filename,
(gdouble) GIMP_MIN_IMAGE_SIZE / (gdouble) svg_width,
(gdouble) GIMP_MAX_IMAGE_SIZE / (gdouble) svg_width,
0.01, 0.1, 0);
spinbutton = gtk_spin_button_new (xadj, 0.01, 4);
spinbutton = gimp_spin_button_new (xadj, 0.01, 4);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_grid_attach (GTK_GRID (grid2), spinbutton, 0, 0, 1, 1);
......@@ -866,7 +866,7 @@ load_dialog (const gchar *filename,
(gdouble) GIMP_MIN_IMAGE_SIZE / (gdouble) svg_height,
(gdouble) GIMP_MAX_IMAGE_SIZE / (gdouble) svg_height,
0.01, 0.1, 0);
spinbutton = gtk_spin_button_new (yadj, 0.01, 4);
spinbutton = gimp_spin_button_new (yadj, 0.01, 4);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_grid_attach (GTK_GRID (grid2), spinbutton, 0, 1, 1, 1);
......
......@@ -586,7 +586,7 @@ load_dialog (const gchar *filename)
gtk_widget_show (hbox);
adj = gtk_adjustment_new (1, 1, 1, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 2);
spinbutton = gimp_spin_button_new (adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
......@@ -634,7 +634,7 @@ load_dialog (const gchar *filename)
(gdouble) GIMP_MIN_IMAGE_SIZE / (gdouble) wmf_width,
(gdouble) GIMP_MAX_IMAGE_SIZE / (gdouble) wmf_width,
0.01, 0.1, 0);
spinbutton = gtk_spin_button_new (xadj, 0.01, 4);
spinbutton = gimp_spin_button_new (xadj, 0.01, 4);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_grid_attach (GTK_GRID (grid2), spinbutton, 0, 0, 1, 1);
......@@ -654,7 +654,7 @@ load_dialog (const gchar *filename)
(gdouble) GIMP_MIN_IMAGE_SIZE / (gdouble) wmf_height,
(gdouble) GIMP_MAX_IMAGE_SIZE / (gdouble) wmf_height,
0.01, 0.1, 0);
spinbutton = gtk_spin_button_new (yadj, 0.01, 4);
spinbutton = gimp_spin_button_new (yadj, 0.01, 4);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_entry_set_width_chars (GTK_ENTRY (spinbutton), 10);
gtk_grid_attach (GTK_GRID (grid2), spinbutton, 0, 1, 1, 1);
......
......@@ -1324,7 +1324,7 @@ save_dialog (gint32 drawable_ID)
adj = gtk_adjustment_new (xsvals.x_hot, 0,
gimp_drawable_width (drawable_ID) - 1,
1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("Hot spot _X:"), 0.0, 0.5,
......@@ -1337,7 +1337,7 @@ save_dialog (gint32 drawable_ID)
adj = gtk_adjustment_new (xsvals.y_hot, 0,
gimp_drawable_height (drawable_ID) - 1,
1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1.0, 0);
spinbutton = gimp_spin_button_new (adj, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Hot spot _Y:"), 0.0, 0.5,
......
......@@ -1092,7 +1092,7 @@ save_dialog (const gint32 image_ID,
x2 = hotspotRange->width + hotspotRange->x - 1;
adjustment = gtk_adjustment_new (xmcparas.x, x1, x2, 1, 5, 0);
tmpwidget = gtk_spin_button_new (adjustment, 1.0, 0);
tmpwidget = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tmpwidget), TRUE);
g_value_set_double (&val, 1.0);
g_object_set_property (G_OBJECT (tmpwidget), "xalign", &val);/* align right*/
......@@ -1114,7 +1114,7 @@ save_dialog (const gint32 image_ID,
y2 = hotspotRange->height + hotspotRange->y - 1;
adjustment = gtk_adjustment_new (xmcparas.y, y1, y2, 1, 5, 0);
tmpwidget = gtk_spin_button_new (adjustment, 1.0, 0);
tmpwidget = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tmpwidget), TRUE);
g_value_set_double (&val, 1.0);
g_object_set_property (G_OBJECT (tmpwidget), "xalign", &val);/* align right*/
......@@ -1218,7 +1218,7 @@ save_dialog (const gint32 image_ID,
adjustment = gtk_adjustment_new (xmcvals.delay, CURSOR_MINIMUM_DELAY,
CURSOR_MAX_DELAY, 1, 5, 0);
tmpwidget = gtk_spin_button_new (adjustment, 1.0, 0);
tmpwidget = gimp_spin_button_new (adjustment, 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tmpwidget), TRUE);
g_value_set_double (&val, 1.0);
g_object_set_property (G_OBJECT (tmpwidget), "xalign", &val);/* align right*/
......
......@@ -1002,7 +1002,7 @@ create_selection_tab (GtkWidget *notebook,
/* Film height */
adj = gtk_adjustment_new (filmvals.film_height, 10,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1, 0);
spinbutton = gimp_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
......@@ -1061,7 +1061,7 @@ create_selection_tab (GtkWidget *notebook,
/* Startindex */
adj = gtk_adjustment_new (filmvals.number_start, 0,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0);
spinbutton = gtk_spin_button_new (adj, 1, 0);
spinbutton = gimp_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
label = gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
......
......@@ -1569,7 +1569,7 @@ smp_dialog (void)
data = gtk_adjustment_new ((gfloat)g_values.lvl_in_min, 0.0, 254.0, 1, 10, 0);
g_di.adj_lvl_in_min = data;
spinbutton = gtk_spin_button_new (g_di.adj_lvl_in_min, 0.5, 0);
spinbutton = gimp_spin_button_new (g_di.adj_lvl_in_min, 0.5, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
gtk_widget_show (spinbutton);
......@@ -1582,7 +1582,7 @@ smp_dialog (void)
data = gtk_adjustment_new ((gfloat)g_values.lvl_in_gamma, 0.1, 10.0, 0.02, 0.2, 0);
g_di.adj_lvl_in_gamma = data;
spinbutton = gtk_spin_button_new (g_di.adj_lvl_in_gamma, 0.5, 2);