diff --git a/plug-ins/common/edge-neon.c b/plug-ins/common/edge-neon.c index 007e67586a..f5aeab40bf 100644 --- a/plug-ins/common/edge-neon.c +++ b/plug-ins/common/edge-neon.c @@ -65,7 +65,8 @@ static void neon (GimpDrawable *drawable, GimpPreview *preview); static gboolean neon_dialog (GimpDrawable *drawable); -static void neon_preview_update (GimpPreview *preview); +static void neon_preview_update (GimpPreview *preview, + GimpDrawable *drawable); /* * Gaussian operator helper functions @@ -722,7 +723,7 @@ neon_dialog (GimpDrawable *drawable) g_signal_connect (preview, "invalidated", G_CALLBACK (neon_preview_update), - NULL); + drawable); table = gtk_table_new (2, 3, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 6); @@ -769,9 +770,10 @@ neon_dialog (GimpDrawable *drawable) } static void -neon_preview_update (GimpPreview *preview) +neon_preview_update (GimpPreview *preview, + GimpDrawable *drawable) { - neon (GIMP_DRAWABLE_PREVIEW (preview)->drawable, + neon (drawable, evals.radius, evals.amount, preview); diff --git a/plug-ins/common/sharpen.c b/plug-ins/common/sharpen.c index dbeac7c9f8..9a08e35391 100644 --- a/plug-ins/common/sharpen.c +++ b/plug-ins/common/sharpen.c @@ -53,7 +53,8 @@ static void sharpen (GimpDrawable *drawable); static gboolean sharpen_dialog (GimpDrawable *drawable); -static void preview_update (GimpPreview *preview); +static void preview_update (GimpPreview *preview, + GimpDrawable *drawable); typedef gint32 intneg; typedef gint32 intpos; @@ -496,7 +497,7 @@ sharpen_dialog (GimpDrawable *drawable) g_signal_connect (preview, "invalidated", G_CALLBACK (preview_update), - NULL); + drawable); table = gtk_table_new (1, 3, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 6); @@ -526,9 +527,9 @@ sharpen_dialog (GimpDrawable *drawable) } static void -preview_update (GimpPreview *preview) +preview_update (GimpPreview *preview, + GimpDrawable *drawable) { - GimpDrawable *drawable; GimpPixelRgn src_rgn; /* Source image region */ guchar *src_ptr; /* Current source pixel */ guchar *dst_ptr; /* Current destination pixel */ @@ -551,9 +552,6 @@ preview_update (GimpPreview *preview) gimp_preview_get_position (preview, &x1, &y1); gimp_preview_get_size (preview, &preview_width, &preview_height); - drawable = - gimp_drawable_preview_get_drawable (GIMP_DRAWABLE_PREVIEW (preview)); - img_bpp = gimp_drawable_bpp (drawable->drawable_id); diff --git a/plug-ins/common/unsharp-mask.c b/plug-ins/common/unsharp-mask.c index ee83e27cf2..9620735c94 100644 --- a/plug-ins/common/unsharp-mask.c +++ b/plug-ins/common/unsharp-mask.c @@ -91,7 +91,8 @@ static void unsharp_mask (GimpDrawable *drawable, gdouble amount); static gboolean unsharp_mask_dialog (GimpDrawable *drawable); -static void preview_update (GimpPreview *preview); +static void preview_update (GimpPreview *preview, + GimpDrawable *drawable); /* create a few globals, set default values */ @@ -859,7 +860,7 @@ unsharp_mask_dialog (GimpDrawable *drawable) g_signal_connect (preview, "invalidated", G_CALLBACK (preview_update), - NULL); + drawable); table = gtk_table_new (3, 3, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 6); @@ -917,9 +918,9 @@ unsharp_mask_dialog (GimpDrawable *drawable) } static void -preview_update (GimpPreview *preview) +preview_update (GimpPreview *preview, + GimpDrawable *drawable) { - GimpDrawable *drawable; gint x1, x2; gint y1, y2; gint x, y; @@ -928,9 +929,6 @@ preview_update (GimpPreview *preview) GimpPixelRgn srcPR; GimpPixelRgn destPR; - drawable = - gimp_drawable_preview_get_drawable (GIMP_DRAWABLE_PREVIEW (preview)); - gimp_pixel_rgn_init (&srcPR, drawable, 0, 0, drawable->width, drawable->height, FALSE, FALSE); gimp_pixel_rgn_init (&destPR, drawable,