Commit fb6fe587 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

plug-ins/common/nlfilt.c plug-ins/common/noisify.c plug-ins/common/nova.c

2001-12-31  Michael Natterer  <mitch@gimp.org>

	* plug-ins/common/nlfilt.c
	* plug-ins/common/noisify.c
	* plug-ins/common/nova.c
	* plug-ins/common/oilify.c
	* plug-ins/common/papertile.c
	* plug-ins/common/pat.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/plasma.c
	* plug-ins/common/plugindetails.c
	* plug-ins/common/png.c
	* plug-ins/common/pnm.c
	* plug-ins/common/polar.c
	* plug-ins/common/ps.c
	* plug-ins/common/psp.c
	* 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/screenshot.c
	* plug-ins/common/sel_gauss.c
	* plug-ins/common/sharpen.c
	* plug-ins/common/shift.c: compile with GTK_DISABLE_DEPRECATED.
parent e1bf1424
2001-12-31 Michael Natterer <mitch@gimp.org>
* plug-ins/common/nlfilt.c
* plug-ins/common/noisify.c
* plug-ins/common/nova.c
* plug-ins/common/oilify.c
* plug-ins/common/papertile.c
* plug-ins/common/pat.c
* plug-ins/common/pixelize.c
* plug-ins/common/plasma.c
* plug-ins/common/plugindetails.c
* plug-ins/common/png.c
* plug-ins/common/pnm.c
* plug-ins/common/polar.c
* plug-ins/common/ps.c
* plug-ins/common/psp.c
* 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/screenshot.c
* plug-ins/common/sel_gauss.c
* plug-ins/common/sharpen.c
* plug-ins/common/shift.c: compile with GTK_DISABLE_DEPRECATED.
2001-12-30 Sven Neumann <sven@gimp.org>
* app/libgimp_glue.[ch]
......
......@@ -174,7 +174,7 @@ run (gchar *name,
struct piArgs args;
*nretvals = 1;
*retvals = rvals;
*retvals = rvals;
memset (&args, (int) 0, sizeof (struct piArgs));
......@@ -183,7 +183,7 @@ run (gchar *name,
args.img = param[1].data.d_image;
args.drw = param[2].data.d_drawable;
rvals[0].type = GIMP_PDB_STATUS;
rvals[0].type = GIMP_PDB_STATUS;
rvals[0].data.d_status = GIMP_PDB_SUCCESS;
switch (param[0].data.d_int32)
......@@ -371,9 +371,9 @@ pluginCoreIA (struct piArgs *argp)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dlg), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
......@@ -386,7 +386,7 @@ pluginCoreIA (struct piArgs *argp)
gtk_widget_show (hbox);
preview = mw_preview_new (hbox, thePreview);
gtk_object_set_data (GTK_OBJECT (preview), "piArgs", argp);
g_object_set_data (G_OBJECT (preview), "piArgs", argp);
nlfilt_do_preview (preview);
frame = gimp_radio_group_new2 (TRUE, _("Filter"),
......@@ -421,18 +421,18 @@ pluginCoreIA (struct piArgs *argp)
argp->alpha, 0.0, 1.0, 0.05, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (nlfilt_double_adjustment_update),
&argp->alpha);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (nlfilt_double_adjustment_update),
&argp->alpha);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("Radius:"), 0, 0,
argp->radius, 1.0 / 3.0, 1.0, 0.05, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (nlfilt_double_adjustment_update),
&argp->radius);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (nlfilt_double_adjustment_update),
&argp->radius);
gtk_widget_show (table);
......@@ -471,7 +471,7 @@ nlfilt_do_preview (GtkWidget *w)
theWidget = w;
}
ap = gtk_object_get_data (GTK_OBJECT (theWidget), "piArgs");
ap = g_object_get_data (G_OBJECT (theWidget), "piArgs");
rowsize = thePreview->width * thePreview->bpp;
filtno = nlfiltInit (ap->alpha, ap->radius, ap->filter);
......@@ -491,8 +491,7 @@ nlfilt_do_preview (GtkWidget *w)
src0 = src1; src1 = src2; src2 += rowsize;
}
gtk_widget_draw (theWidget, NULL);
gdk_flush ();
gtk_widget_queue_draw (theWidget);
g_free (dst);
}
......@@ -595,12 +594,13 @@ mw_preview_new (GtkWidget *parent,
button = gtk_check_button_new_with_label (_("Do Preview"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), do_preview);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (mw_preview_toggle_callback),
&do_preview);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (mw_preview_toggle_callback),
&do_preview);
return preview;
}
......
......@@ -67,16 +67,17 @@ typedef struct
/* Declare local functions.
*/
static void query (void);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void noisify (GimpDrawable *drawable, gboolean preview_mode);
static void run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals);
static void noisify (GimpDrawable *drawable,
gboolean preview_mode);
static gdouble gauss (void);
static void fill_preview (GtkWidget *preview_widget,
static void fill_preview (GtkWidget *preview_widget,
GimpDrawable *drawable);
static GtkWidget *preview_widget (GimpDrawable *drawable);
......@@ -145,23 +146,23 @@ query (void)
}
static void
run (gchar *name,
gint nparams,
run (gchar *name,
gint nparams,
GimpParam *param,
gint *nreturn_vals,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
run_mode = param[0].data.d_int32;
*nreturn_vals = 1;
*return_vals = values;
*return_vals = values;
values[0].type = GIMP_PDB_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
/* Get the specified drawable */
......@@ -492,9 +493,9 @@ noisify_dialog (GimpDrawable *drawable,
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dlg), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
main_vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 0);
......@@ -534,12 +535,13 @@ noisify_dialog (GimpDrawable *drawable,
toggle = gtk_check_button_new_with_label (_("Independent"));
gtk_table_attach (GTK_TABLE (table), toggle, 0, 3, 0, 1, GTK_FILL, 0, 0, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&nvals.independent);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), nvals.independent);
gtk_widget_show (toggle);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&nvals.independent);
noise_int.channels = channels;
if (channels == 1)
......@@ -550,10 +552,12 @@ noisify_dialog (GimpDrawable *drawable,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[0]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[0]);
noise_int.channel_adj[0] = adj;
}
else if (channels == 2)
......@@ -563,10 +567,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[0], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[0]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[0]);
noise_int.channel_adj[0] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
......@@ -574,10 +581,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[1], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[1]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[1]);
noise_int.channel_adj[1] = adj;
}
......@@ -588,10 +598,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[0], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[0]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[0]);
noise_int.channel_adj[0] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
......@@ -599,10 +612,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[1], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[1]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[1]);
noise_int.channel_adj[1] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
......@@ -610,10 +626,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[2], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[2]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[2]);
noise_int.channel_adj[2] = adj;
}
......@@ -624,10 +643,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[0], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[0]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[0]);
noise_int.channel_adj[0] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
......@@ -635,10 +657,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[1], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[1]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[1]);
noise_int.channel_adj[1] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
......@@ -646,10 +671,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[2], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[2]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[2]);
noise_int.channel_adj[2] = adj;
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
......@@ -657,10 +685,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[3], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[3]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[3]);
noise_int.channel_adj[3] = adj;
}
else
......@@ -674,10 +705,13 @@ noisify_dialog (GimpDrawable *drawable,
nvals.noise[i], 0.0, 1.0, 0.01, 0.1, 2,
TRUE, 0, 0,
NULL, NULL);
gtk_object_set_data (GTK_OBJECT (adj), "drawable", drawable);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (noisify_double_adjustment_update),
&nvals.noise[i]);
g_object_set_data (G_OBJECT (adj), "drawable", drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (noisify_double_adjustment_update),
&nvals.noise[i]);
noise_int.channel_adj[i] = adj;
g_free (buffer);
......@@ -731,7 +765,9 @@ noisify_double_adjustment_update (GtkAdjustment *adjustment,
GimpDrawable *drawable;
gimp_double_adjustment_update (adjustment, data);
drawable = gtk_object_get_data (GTK_OBJECT (adjustment), "drawable");
drawable = g_object_get_data (G_OBJECT (adjustment), "drawable");
noisify (drawable, TRUE);
if (! nvals.independent)
......
......@@ -241,7 +241,7 @@ run (gchar *name,
{
static GimpParam values[1];
GimpDrawable *drawable;
GimpRunMode run_mode;
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
INIT_I18N_UI();
......@@ -249,9 +249,9 @@ run (gchar *name,
run_mode = param[0].data.d_int32;
*nreturn_vals = 1;
*return_vals = values;
*return_vals = values;
values[0].type = GIMP_PDB_STATUS;
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
/* Get the specified drawable */
......@@ -487,9 +487,9 @@ nova_dialog (GimpDrawable *drawable)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dlg), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
/* parameter settings */
frame = gtk_frame_new (_("Parameter Settings"));
......@@ -510,51 +510,52 @@ nova_dialog (GimpDrawable *drawable)
button = gimp_color_button_new (_("SuperNova Color Picker"),
SCALE_WIDTH - 8, 16,
&pvals.color, GIMP_COLOR_AREA_FLAT);
gtk_signal_connect (GTK_OBJECT (button), "color_changed",
GTK_SIGNAL_FUNC (gimp_color_button_get_color),
&pvals.color);
gtk_signal_connect_object (GTK_OBJECT (button), "color_changed",
GTK_SIGNAL_FUNC (nova),
(gpointer)drawable);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Color:"), 1.0, 0.5,
button, 1, TRUE);
g_signal_connect (G_OBJECT (button), "color_changed",
G_CALLBACK (gimp_color_button_get_color),
&pvals.color);
g_signal_connect_swapped (G_OBJECT (button), "color_changed",
G_CALLBACK (nova),
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("Radius:"), SCALE_WIDTH, 0,
pvals.radius, 1, 100, 1, 10, 0,
FALSE, 1, GIMP_MAX_IMAGE_SIZE,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&pvals.radius);
gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (nova),
(gpointer)drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&pvals.radius);
g_signal_connect_swapped (G_OBJECT (adj), "value_changed",
G_CALLBACK (nova),
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 4,
_("Spokes:"), SCALE_WIDTH, 0,
pvals.nspoke, 1, 1024, 1, 16, 0,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&pvals.nspoke);
gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (nova),
(gpointer)drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&pvals.nspoke);
g_signal_connect_swapped (G_OBJECT (adj), "value_changed",
G_CALLBACK (nova),
drawable);
adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 5,
_("Random Hue:"), SCALE_WIDTH, 0,
pvals.randomhue, 0, 360, 1, 15, 0,
TRUE, 0, 0,
NULL, NULL);
gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&pvals.randomhue);
gtk_signal_connect_object (GTK_OBJECT (adj), "value_changed",
GTK_SIGNAL_FUNC (nova),
(gpointer)drawable);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&pvals.randomhue);
g_signal_connect_swapped (G_OBJECT (adj), "value_changed",
G_CALLBACK (nova),
drawable);
gtk_widget_show (frame);
gtk_widget_show (table);
......@@ -614,12 +615,13 @@ nova_center_create (GimpDrawable *drawable)
center->in_call = TRUE; /* to avoid side effects while initialization */
frame = gtk_frame_new (_("Center of SuperNova"));
gtk_signal_connect (GTK_OBJECT (frame), "destroy",
GTK_SIGNAL_FUNC (nova_center_destroy),
center);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
g_signal_connect (G_OBJECT (frame), "destroy",
G_CALLBACK (nova_center_destroy),
center);
table = gtk_table_new (3, 4, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
......@@ -637,14 +639,16 @@ nova_center_create (GimpDrawable *drawable)
gimp_spin_button_new (&center->xadj,
pvals.xcenter, G_MININT, G_MAXINT,
1, 10, 10, 0, 0);
gtk_object_set_user_data (GTK_OBJECT (center->xadj), center);
gtk_signal_connect (GTK_OBJECT (center->xadj), "value_changed",
GTK_SIGNAL_FUNC (nova_center_adjustment_update),
&pvals.xcenter);
gtk_table_attach (GTK_TABLE (table), spinbutton, 1, 2, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (spinbutton);
g_object_set_data (G_OBJECT (center->xadj), "center", center);
g_signal_connect (G_OBJECT (center->xadj), "value_changed",
G_CALLBACK (nova_center_adjustment_update),
&pvals.xcenter);
label = gtk_label_new (_("Y:"));
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1,
......@@ -655,14 +659,16 @@ nova_center_create (GimpDrawable *drawable)
gimp_spin_button_new (&center->yadj,
pvals.ycenter, G_MININT, G_MAXINT,
1, 10, 10, 0, 0);
gtk_object_set_user_data (GTK_OBJECT (center->yadj), center);
gtk_signal_connect (GTK_OBJECT (center->yadj), "value_changed",
GTK_SIGNAL_FUNC (nova_center_adjustment_update),
&pvals.ycenter);
gtk_table_attach (GTK_TABLE (table), spinbutton, 3, 4, 0, 1,
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (spinbutton);
g_object_set_data (G_OBJECT (center->yadj), "center", center);
g_signal_connect (G_OBJECT (center->yadj), "value_changed",
G_CALLBACK (nova_center_adjustment_update),
&pvals.ycenter);
/* frame that contains preview */
pframe = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (pframe), GTK_SHADOW_IN);
......@@ -672,31 +678,35 @@ nova_center_create (GimpDrawable *drawable)
/* PREVIEW */
preview = preview_widget (center->drawable);
gtk_widget_set_events (GTK_WIDGET (preview), PREVIEW_MASK);
gtk_signal_connect_after (GTK_OBJECT (preview), "expose_event",
GTK_SIGNAL_FUNC (nova_center_preview_expose),
center);
gtk_signal_connect (GTK_OBJECT (preview), "event",
GTK_SIGNAL_FUNC (nova_center_preview_events),
center);
gtk_container_add (GTK_CONTAINER (pframe), preview);
gtk_widget_show (preview);
g_signal_connect_after (G_OBJECT (preview), "expose_event",
G_CALLBACK (nova_center_preview_expose),
center);
g_signal_connect (G_OBJECT (preview), "event",
G_CALLBACK (nova_center_preview_events),
center);
gtk_widget_show (pframe);
gtk_widget_show (table);
gtk_object_set_user_data (GTK_OBJECT (frame), center);
g_object_set_data (G_OBJECT (frame), "center", center);
gtk_widget_show (frame);
check = gtk_check_button_new_with_label (_("Show Cursor"));