Commit 0c19a57f authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/common/randomize.c plug-ins/common/ripple.c

2004-05-20  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/randomize.c
	* plug-ins/common/ripple.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/scatter_hsv.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c
	* plug-ins/common/smooth_palette.c
	* plug-ins/common/snoise.c
	* plug-ins/common/sobel.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/spread.c
	* plug-ins/common/struc.c
	* plug-ins/common/sunras.c
	* plug-ins/common/svg.c: HIG-ified.
parent 2849cf23
2004-05-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/randomize.c
* plug-ins/common/ripple.c
* plug-ins/common/sample_colorize.c
* plug-ins/common/scatter_hsv.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/sharpen.c
* plug-ins/common/shift.c
* plug-ins/common/smooth_palette.c
* plug-ins/common/snoise.c
* plug-ins/common/sobel.c
* plug-ins/common/sparkle.c
* plug-ins/common/spread.c
* plug-ins/common/struc.c
* plug-ins/common/sunras.c
* plug-ins/common/svg.c: HIG-ified.
2004-05-19 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
......
......@@ -172,7 +172,7 @@ static inline void randomize_prepare_row (GimpPixelRgn *pixel_rgn,
gint y,
gint w);
static gint randomize_dialog (void);
static gboolean randomize_dialog (void);
/************************************ Guts ***********************************/
......@@ -707,11 +707,10 @@ randomize (GimpDrawable *drawable,
*
********************************/
static gint
static gboolean
randomize_dialog (void)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *label;
GtkWidget *seed_hbox;
......@@ -729,27 +728,17 @@ randomize_dialog (void)
NULL);
/*
* Parameter settings
*
* First set up the basic containers, label them, etc.
*/
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (3, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), table, TRUE, TRUE, 0);
gtk_widget_show(table);
/* Random Seed */
seed_hbox = gimp_random_seed_new (&pivals.seed, &pivals.randomize);
label = gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Random Seed:"), 1.0, 0.5,
_("_Random Seed:"), 0.0, 0.5,
seed_hbox, 1, TRUE);
gtk_label_set_mnemonic_widget (GTK_LABEL (label),
GIMP_RANDOM_SEED_SPINBUTTON (seed_hbox));
......
......@@ -68,21 +68,21 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static void ripple (GimpDrawable *drawable);
static gint ripple_dialog (void);
static gdouble displace_amount (gint location);
static void average_two_pixels (guchar *dest,
guchar pixels[4][4],
gdouble x,
gint bpp,
gboolean has_alpha);
static void average_four_pixels (guchar *dest,
guchar pixels[4][4],
gdouble x,
gint bpp,
gboolean has_alpha);
static void ripple (GimpDrawable *drawable);
static gboolean ripple_dialog (void);
static gdouble displace_amount (gint location);
static void average_two_pixels (guchar *dest,
guchar pixels[4][4],
gdouble x,
gint bpp,
gboolean has_alpha);
static void average_four_pixels (guchar *dest,
guchar pixels[4][4],
gdouble x,
gint bpp,
gboolean has_alpha);
/***** Local vars *****/
......@@ -407,7 +407,7 @@ ripple (GimpDrawable *drawable)
gimp_pixel_fetcher_destroy (param.pft);
}
static gint
static gboolean
ripple_dialog (void)
{
GtkWidget *dlg;
......@@ -431,25 +431,26 @@ ripple_dialog (void)
NULL);
/* The main vbox */
main_vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox,
FALSE, FALSE, 0);
/* The table to hold the four frames of options */
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 12);
gtk_table_set_row_spacings (GTK_TABLE (table), 12);
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
/* Options section */
frame = gtk_frame_new ( _("Options"));
frame = gimp_frame_new ( _("Options"));
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (frame);
toggle_vbox = gtk_vbox_new (FALSE, 1);
gtk_container_set_border_width (GTK_CONTAINER (toggle_vbox), 2);
toggle_vbox = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (frame), toggle_vbox);
gtk_widget_show (toggle_vbox);
toggle = gtk_check_button_new_with_mnemonic (_("_Antialiasing"));
gtk_box_pack_start (GTK_BOX (toggle_vbox), toggle, FALSE, FALSE, 0);
......@@ -469,9 +470,6 @@ ripple_dialog (void)
G_CALLBACK (gimp_toggle_button_update),
&rvals.tile);
gtk_widget_show (toggle_vbox);
gtk_widget_show (frame);
/* Orientation toggle box */
frame = gimp_int_radio_group_new (TRUE, _("Orientation"),
G_CALLBACK (gimp_radio_button_update),
......@@ -515,15 +513,10 @@ ripple_dialog (void)
gtk_widget_show (table);
/* Parameter Settings */
frame = gtk_frame_new ( _("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
table = gtk_table_new (2, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
/* Period */
scale_data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......
......@@ -1336,13 +1336,11 @@ p_smp_dialog (void)
GtkWidget *hbox;
GtkWidget *vbox2;
GtkWidget *frame;
GtkWidget *pframe;
GtkWidget *table;
GtkWidget *check_button;
GtkWidget *label;
GtkWidget *combo;
GtkWidget *spinbutton;
GtkWidget *sep;
GtkObject *data;
gint l_ty;
......@@ -1377,23 +1375,13 @@ p_smp_dialog (void)
G_CALLBACK (p_smp_response_callback),
dialog);
/* parameter settings */
frame = gtk_frame_new (_("Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
frame, TRUE, TRUE, 0);
/* table for values */
table = gtk_table_new (7, 5, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
/* separator */
sep = gtk_vseparator_new ();
gtk_table_attach_defaults (GTK_TABLE (table), sep, 2, 3, 0, 7);
gtk_widget_show (sep);
gtk_table_set_row_spacings (GTK_TABLE (table), 12);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
table, TRUE, TRUE, 0);
l_ty = 0;
/* layer combo_box (Dst) */
......@@ -1443,7 +1431,7 @@ p_smp_dialog (void)
l_ty++;
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 6);
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, l_ty, l_ty + 1,
GTK_FILL, 0, 0, 0);
gtk_widget_show (hbox);
......@@ -1470,7 +1458,7 @@ p_smp_dialog (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
g_di.dst_show_color);
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 6);
gtk_table_attach (GTK_TABLE (table), hbox, 3, 5, l_ty, l_ty + 1,
GTK_FILL, 0, 0, 0);
gtk_widget_show (hbox);
......@@ -1501,41 +1489,41 @@ p_smp_dialog (void)
/* Preview (Dst) */
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_table_attach (GTK_TABLE (table),
pframe, 0, 2, l_ty, l_ty + 1, 0, 0, 0, 0);
gtk_widget_show (pframe);
frame, 0, 2, l_ty, l_ty + 1, 0, 0, 0, 0);
gtk_widget_show (frame);
g_di.dst_preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (g_di.dst_preview),
PREVIEW_SIZE_X, PREVIEW_SIZE_Y);
gtk_container_add (GTK_CONTAINER (pframe), g_di.dst_preview);
gtk_container_add (GTK_CONTAINER (frame), g_di.dst_preview);
gtk_widget_show (g_di.dst_preview);
/* Preview (Sample)*/
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_table_attach (GTK_TABLE (table),
pframe, 3, 5, l_ty, l_ty + 1, 0, 0, 0, 0);
gtk_widget_show (pframe);
frame, 3, 5, l_ty, l_ty + 1, 0, 0, 0, 0);
gtk_widget_show (frame);
g_di.sample_preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (g_di.sample_preview),
PREVIEW_SIZE_X, PREVIEW_SIZE_Y);
gtk_container_add (GTK_CONTAINER (pframe), g_di.sample_preview);
gtk_container_add (GTK_CONTAINER (frame), g_di.sample_preview);
gtk_widget_show (g_di.sample_preview);
l_ty++;
/* The levels graylevel prevev */
pframe = gtk_frame_new (NULL);
frame = gtk_frame_new (NULL);
vbox2 = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (pframe), vbox2);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
gtk_table_attach (GTK_TABLE (table),
pframe, 0, 2, l_ty, l_ty + 1, 0, 0, 0, 0);
frame, 0, 2, l_ty, l_ty + 1, 0, 0, 0, 0);
g_di.in_lvl_gray_preview = gtk_preview_new (GTK_PREVIEW_GRAYSCALE);
gtk_preview_size (GTK_PREVIEW (g_di.in_lvl_gray_preview),
......@@ -1561,15 +1549,15 @@ p_smp_dialog (void)
&g_di);
gtk_widget_show(vbox2);
gtk_widget_show(pframe);
gtk_widget_show(frame);
/* The sample_colortable prevev */
pframe = gtk_frame_new (NULL);
frame = gtk_frame_new (NULL);
vbox2 = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (pframe), vbox2);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
gtk_table_attach (GTK_TABLE (table),
pframe, 3, 5, l_ty, l_ty + 1, 0, 0, 0, 0);
frame, 3, 5, l_ty, l_ty + 1, 0, 0, 0, 0);
g_di.sample_colortab_preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (g_di.sample_colortab_preview),
......@@ -1590,13 +1578,13 @@ p_smp_dialog (void)
&g_di);
gtk_widget_show(vbox2);
gtk_widget_show(pframe);
gtk_widget_show(frame);
l_ty++;
/* Horizontal box for INPUT levels text widget */
hbox = gtk_hbox_new (TRUE, 4);
hbox = gtk_hbox_new (TRUE, 6);
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, l_ty, l_ty+1,
GTK_FILL, 0, 0, 0);
......@@ -1684,7 +1672,7 @@ p_smp_dialog (void)
l_ty++;
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 6);
gtk_table_attach (GTK_TABLE (table), hbox, 0, 2, l_ty, l_ty+1,
GTK_FILL, 0, 0, 0);
gtk_widget_show (hbox);
......
......@@ -59,8 +59,8 @@ static gint randomize_value (gint now,
gint mod_p,
gint rand_max);
static gint scatter_hsv_dialog (void);
static gint preview_event_handler (GtkWidget *widget,
static gboolean scatter_hsv_dialog (void);
static gboolean preview_event_handler (GtkWidget *widget,
GdkEvent *event);
static void scatter_hsv_preview_update (void);
static void scatter_hsv_iscale_update (GtkAdjustment *adjustment,
......@@ -323,7 +323,7 @@ static void scatter_hsv_scatter (guchar *r,
}
/* dialog stuff */
static gint
static gboolean
scatter_hsv_dialog (void)
{
GtkWidget *dlg;
......@@ -346,21 +346,21 @@ scatter_hsv_dialog (void)
NULL);
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), vbox);
gtk_widget_show (vbox);
frame = gtk_frame_new (_("Preview (1:4) - Right Click to Jump"));
frame = gimp_frame_new (_("Right-Click Preview to Jump"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_container_add (GTK_CONTAINER (frame), abox);
gtk_widget_show (abox);
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
gtk_container_set_border_width (GTK_CONTAINER (pframe), 4);
gtk_container_add (GTK_CONTAINER (abox), pframe);
gtk_widget_show (pframe);
......@@ -388,15 +388,10 @@ scatter_hsv_dialog (void)
gtk_widget_show (frame);
frame = gtk_frame_new (_("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......@@ -435,10 +430,6 @@ scatter_hsv_dialog (void)
G_CALLBACK (scatter_hsv_iscale_update),
&VALS.value_distance);
gtk_widget_show (table);
gtk_widget_show (frame);
gtk_widget_show (vbox);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......@@ -448,7 +439,7 @@ scatter_hsv_dialog (void)
return run;
}
static gint
static gboolean
preview_event_handler (GtkWidget *widget,
GdkEvent *event)
{
......
......@@ -238,7 +238,7 @@ sel_gauss_dialog (void)
bvals.radius, 0.0, G_MAXINT, 1.0, 5.0,
0, 1, 2);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("_Blur Radius:"), 1.0, 0.5,
_("_Blur Radius:"), 0.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_double_adjustment_update),
......
......@@ -64,7 +64,7 @@ static void run (const gchar *name,
static void compute_luts (void);
static void sharpen (void);
static gint sharpen_dialog (void);
static gboolean sharpen_dialog (void);
static void dialog_iscale_update (GtkAdjustment *, gint *);
......@@ -487,7 +487,7 @@ sharpen (void)
* 'sharpen_dialog()' - Popup a dialog window for the filter box size...
*/
static gint
static gboolean
sharpen_dialog (void)
{
GtkWidget *dialog;
......@@ -511,27 +511,14 @@ sharpen_dialog (void)
NULL);
/*
* Top-level table for dialog...
*/
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
FALSE, FALSE, 0);
gtk_widget_show (vbox);
/*
* Preview window...
*/
frame = gtk_frame_new (_("Preview"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (abox), 4);
gtk_container_add (GTK_CONTAINER (frame), abox);
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
gtk_widget_show (abox);
ptable = gtk_table_new (2, 2, FALSE);
......@@ -581,17 +568,9 @@ sharpen_dialog (void)
preview_init ();
/*
* Sharpness control...
*/
frame = gtk_frame_new (_("Parameter Settings"));
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (1, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_container_set_border_width (GTK_CONTAINER (table), 4);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
......
......@@ -51,18 +51,18 @@ typedef struct
/* Declare local functions.
*/
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void query (void);
static void run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void shift (GimpDrawable *drawable);
static void shift (GimpDrawable *drawable);
static gint shift_dialog (gint32 image_ID);
static void shift_amount_update_callback (GtkWidget *widget,
gpointer data);
static gboolean shift_dialog (gint32 image_ID);
static void shift_amount_callback (GtkWidget *widget,
gpointer data);
/***** Local vars *****/
......@@ -304,13 +304,12 @@ shift (GimpDrawable *drawable)
}
static gint
static gboolean
shift_dialog (gint32 image_ID)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *radio_vbox;
GtkWidget *sep;
GtkWidget *vbox;
GtkWidget *size_entry;
GimpUnit unit;
gdouble xres;
......@@ -328,8 +327,12 @@ shift_dialog (gint32 image_ID)
NULL);
/* parameter settings */
frame = gimp_int_radio_group_new (TRUE, _("Parameter Settings"),
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
frame = gimp_int_radio_group_new (FALSE, NULL,
G_CALLBACK (gimp_radio_button_update),
&shvals.orientation, shvals.orientation,
......@@ -337,16 +340,8 @@ shift_dialog (gint32 image_ID)
_("Shift _Vertically"), VERTICAL, NULL,
NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, TRUE, TRUE, 0);
radio_vbox = GTK_BIN (frame)->child;
gtk_container_set_border_width (GTK_CONTAINER (radio_vbox), 4);
sep = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (radio_vbox), sep, FALSE, FALSE, 3);
gtk_widget_show (sep);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
/* Get the image resolution and unit */
gimp_image_get_resolution (image_ID, &xres, &yres);
......@@ -368,13 +363,11 @@ shift_dialog (gint32 image_ID)
_("Shift _Amount:"), 1, 0, 0.0);
g_signal_connect (size_entry, "value_changed",
G_CALLBACK (shift_amount_update_callback),
G_CALLBACK (shift_amount_callback),
&shvals.shift_amount);
gtk_box_pack_start (GTK_BOX (radio_vbox), size_entry, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), size_entry, FALSE, FALSE, 0);
gtk_widget_show (size_entry);
gtk_widget_show (frame);
gtk_widget_show (dlg);
run = (gimp_dialog_run (GIMP_DIALOG (dlg)) == GTK_RESPONSE_OK);
......@@ -385,8 +378,8 @@ shift_dialog (gint32 image_ID)
}
static void
shift_amount_update_callback (GtkWidget *widget,
gpointer data)
shift_amount_callback (GtkWidget *widget,
gpointer data)
{
shvals.shift_amount = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget),
0);
......
......@@ -398,7 +398,6 @@ static gboolean
dialog (GimpDrawable *drawable)
{
GtkWidget *dlg;
GtkWidget *frame;
GtkWidget *spinbutton;
GtkObject *adj;
GtkWidget *sizeentry;
......@@ -418,11 +417,6 @@ dialog (GimpDrawable *drawable)
NULL);
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
image_id = gimp_drawable_get_image (drawable->drawable_id);
unit = gimp_image_get_unit (image_id);
gimp_image_get_resolution (image_id, &xres, &yres);
......@@ -440,13 +434,14 @@ dialog (GimpDrawable *drawable)
config.height, yres,
1, GIMP_MAX_IMAGE_SIZE,
1, GIMP_MAX_IMAGE_SIZE);
gtk_container_add (GTK_CONTAINER (frame), sizeentry);
gtk_widget_show (sizeentry);
gtk_container_set_border_width (GTK_CONTAINER (sizeentry), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), sizeentry,
FALSE, FALSE, 0); gtk_widget_show (sizeentry);
spinbutton = gimp_spin_button_new (&adj, config.ntries,
1, 1024, 1, 10, 0, 1, 0);
gimp_table_attach_aligned (GTK_TABLE (sizeentry), 0, 2,
_("_Search Depth:"), 1.0, 0.5,
_("_Search Depth:"), 0.0, 0.5,
spinbutton, 1, FALSE);
g_signal_connect (adj, "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
......
......@@ -105,15 +105,15 @@ static void run (const gchar *name,
gint *nreturn_vals,
GimpParam **return_vals);
static void solid_noise (GimpDrawable *drawable);
static void solid_noise_init (void);
static gdouble plain_noise (gdouble x,
gdouble y,
guint s);
static gdouble noise (gdouble x,
gdouble y);
static void solid_noise (GimpDrawable *drawable);
static void solid_noise_init (void);
static gdouble plain_noise (gdouble x,
gdouble y,
guint s);
static gdouble noise (gdouble x,
gdouble y);
static gint solid_noise_dialog (void);
static gboolean solid_noise_dialog (void);
/*---- Variables ----*/
......@@ -488,11 +488,10 @@ noise (gdouble x,
}