Commit 79cdbadc authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: replace some gimp_spin_button_new() by plain GTK+ calls

parent 201b11e2
......@@ -1163,21 +1163,20 @@ static BenderDialog *
bender_new_dialog (GimpDrawable *drawable)
{
BenderDialog *cd;
GtkWidget *main_hbox;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *vbox2;
GtkWidget *abox;
GtkWidget *frame;
GtkWidget *upper, *lower;
GtkWidget *smooth, *freew;
GtkWidget *toggle;
GtkWidget *button;
GtkWidget *spinbutton;
GtkWidget *label;
GtkObject *data;
GdkDisplay *display;
gint i, j;
GtkWidget *main_hbox;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *vbox2;
GtkWidget *abox;
GtkWidget *frame;
GtkWidget *upper, *lower;
GtkWidget *smooth, *freew;
GtkWidget *toggle;
GtkWidget *button;
GtkWidget *spinbutton;
GtkWidget *label;
GdkDisplay *display;
gint i, j;
cd = g_new (BenderDialog, 1);
......@@ -1324,11 +1323,11 @@ bender_new_dialog (GimpDrawable *drawable)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
spinbutton = gimp_spin_button_new (&data,
0, 0.0, 360.0, 1, 45, 90,
0.5, 1);
cd->rotate_data = GTK_ADJUSTMENT (data);
cd->rotate_data = GTK_ADJUSTMENT (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);
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);
......
......@@ -944,20 +944,20 @@ static void
create_selection_tab (GtkWidget *notebook,
gint32 image_ID)
{
GtkSizeGroup *group;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *frame;
GtkWidget *toggle;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *button;
GtkWidget *font_button;
gint32 *image_id_list;
gint nimages, j;
GtkSizeGroup *group;
GtkWidget *vbox;
GtkWidget *vbox2;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *label;
GtkWidget *frame;
GtkWidget *toggle;
GtkWidget *spinbutton;
GtkAdjustment *adj;
GtkWidget *button;
GtkWidget *font_button;
gint32 *image_id_list;
gint nimages, j;
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
......@@ -996,8 +996,11 @@ create_selection_tab (GtkWidget *notebook,
gtk_widget_show (table);
/* Film height */
spinbutton = gimp_spin_button_new (&adj, filmvals.film_height, 10,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0, 1, 0);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (filmvals.film_height, 10,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0));
spinbutton = gtk_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Height:"), 0.0, 0.5,
spinbutton, 1, TRUE);
......@@ -1049,8 +1052,11 @@ create_selection_tab (GtkWidget *notebook,
gtk_widget_show (table);
/* Startindex */
spinbutton = gimp_spin_button_new (&adj, filmvals.number_start, 0,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0, 1, 0);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (filmvals.number_start, 0,
GIMP_MAX_IMAGE_SIZE, 1, 10, 0));
spinbutton = gtk_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Start _index:"), 0.0, 0.5,
spinbutton, 1, TRUE);
......
......@@ -398,14 +398,14 @@ smooth_palette (GimpDrawable *drawable,
static gboolean
dialog (GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *sizeentry;
guint32 image_id;
GimpUnit unit;
gdouble xres, yres;
gboolean run;
GtkWidget *dlg;
GtkWidget *spinbutton;
GtkAdjustment *adj;
GtkWidget *sizeentry;
guint32 image_id;
GimpUnit unit;
gdouble xres, yres;
gboolean run;
gimp_ui_init (PLUG_IN_BINARY, FALSE);
......@@ -447,8 +447,11 @@ dialog (GimpDrawable *drawable)
sizeentry, FALSE, FALSE, 0);
gtk_widget_show (sizeentry);
spinbutton = gimp_spin_button_new (&adj, config.ntries,
1, 1024, 1, 10, 0, 1, 0);
adj = GTK_ADJUSTMENT (gtk_adjustment_new (config.ntries,
1, 1024, 1, 10, 0));
spinbutton = gtk_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gimp_table_attach_aligned (GTK_TABLE (sizeentry), 0, 2,
_("_Search depth:"), 0.0, 0.5,
spinbutton, 1, FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment