diff --git a/ChangeLog b/ChangeLog index 135095c491..71c9f56c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-09-21 Sven Neumann + + General fix for bug #478657: + + * libgimp/gimpaspectpreview.c + * libgimp/gimpdrawablepreview.c + * libgimp/gimpzoompreview.c: let all preview widgets store the + state of the Preview toggle. Declared "toggle" parameter as unused. + + * plug-ins/common/*.c: pass NULL for "toggle" to + gimp_drawable_preview_new() and gimp_aspect_preview_new(). + 2007-09-21 Sven Neumann * libgimpwidgets/gimppreview.c: formatting. diff --git a/libgimp/gimpaspectpreview.c b/libgimp/gimpaspectpreview.c index 2c944d0840..577b56d6be 100644 --- a/libgimp/gimpaspectpreview.c +++ b/libgimp/gimpaspectpreview.c @@ -40,6 +40,16 @@ enum PROP_DRAWABLE }; +typedef struct +{ + gboolean update; +} PreviewSettings; + + +static GObject * gimp_aspect_preview_constructor (GType type, + guint n_params, + GObjectConstructParam *params); + static void gimp_aspect_preview_get_property (GObject *object, guint property_id, @@ -49,6 +59,7 @@ static void gimp_aspect_preview_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); +static void gimp_aspect_preview_destroy (GtkObject *object); static void gimp_aspect_preview_style_set (GtkWidget *widget, GtkStyle *prev_style); static void gimp_aspect_preview_draw (GimpPreview *preview); @@ -74,17 +85,23 @@ G_DEFINE_TYPE (GimpAspectPreview, gimp_aspect_preview, GIMP_TYPE_PREVIEW) #define parent_class gimp_aspect_preview_parent_class +static gint gimp_aspect_preview_counter = 0; + static void gimp_aspect_preview_class_init (GimpAspectPreviewClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass); + object_class->constructor = gimp_aspect_preview_constructor; object_class->get_property = gimp_aspect_preview_get_property; object_class->set_property = gimp_aspect_preview_set_property; + gtk_object_class->destroy = gimp_aspect_preview_destroy; + widget_class->style_set = gimp_aspect_preview_style_set; preview_class->draw = gimp_aspect_preview_draw; @@ -112,6 +129,32 @@ gimp_aspect_preview_init (GimpAspectPreview *preview) NULL); } +static GObject * +gimp_aspect_preview_constructor (GType type, + guint n_params, + GObjectConstructParam *params) +{ + GObject *object; + gchar *data_name; + PreviewSettings settings; + + data_name = g_strdup_printf ("%s-aspect-preview-%d", + g_get_prgname (), + gimp_aspect_preview_counter++); + + object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params); + + if (gimp_get_data (data_name, &settings)) + { + gimp_preview_set_update (GIMP_PREVIEW (object), settings.update); + } + + g_object_set_data_full (object, "gimp-aspect-preview-data-name", + data_name, (GDestroyNotify) g_free); + + return object; +} + static void gimp_aspect_preview_get_property (GObject *object, guint property_id, @@ -153,6 +196,25 @@ gimp_aspect_preview_set_property (GObject *object, } } +static void +gimp_aspect_preview_destroy (GtkObject *object) +{ + const gchar *data_name = g_object_get_data (G_OBJECT (object), + "gimp-aspect-preview-data-name"); + + if (data_name) + { + GimpPreview *preview = GIMP_PREVIEW (object); + PreviewSettings settings; + + settings.update = gimp_preview_get_update (preview); + + gimp_set_data (data_name, &settings, sizeof (PreviewSettings)); + } + + GTK_OBJECT_CLASS (parent_class)->destroy (object); +} + static void gimp_aspect_preview_style_set (GtkWidget *widget, GtkStyle *prev_style) @@ -299,46 +361,28 @@ gimp_aspect_preview_set_drawable (GimpAspectPreview *preview, NULL); } -static void -gimp_aspect_preview_notify_update (GimpPreview *preview, - GParamSpec *pspec, - gboolean *toggle) -{ - *toggle = gimp_preview_get_update (preview); -} - /** * gimp_aspect_preview_new: * @drawable: a #GimpDrawable - * @toggle: pointer to a #gboolean variable to sync with the "Preview" - * check-button or %NULL + * @toggle: unused * * Creates a new #GimpAspectPreview widget for @drawable. See also * gimp_drawable_preview_new(). * + * In GIMP 2.2 the @toggle parameter was provided to conviently access + * the state of the "Preview" check-button. This is not any longer + * necessary as the preview itself now stores this state, as well as + * the scroll offset. + * * Since: GIMP 2.2 **/ GtkWidget * gimp_aspect_preview_new (GimpDrawable *drawable, gboolean *toggle) { - GtkWidget *preview; - g_return_val_if_fail (drawable != NULL, NULL); - preview = g_object_new (GIMP_TYPE_ASPECT_PREVIEW, - "drawable", drawable, - NULL); - - if (toggle) - { - gimp_preview_set_update (GIMP_PREVIEW (preview), *toggle); - - g_signal_connect (preview, "notify::update", - G_CALLBACK (gimp_aspect_preview_notify_update), - toggle); - } - - - return preview; + return g_object_new (GIMP_TYPE_ASPECT_PREVIEW, + "drawable", drawable, + NULL); } diff --git a/libgimp/gimpdrawablepreview.c b/libgimp/gimpdrawablepreview.c index 4a299c9cb8..8e71599e9a 100644 --- a/libgimp/gimpdrawablepreview.c +++ b/libgimp/gimpdrawablepreview.c @@ -42,8 +42,9 @@ enum typedef struct { - gint x, y; - gboolean update; + gint x; + gint y; + gboolean update; } PreviewSettings; @@ -82,6 +83,8 @@ G_DEFINE_TYPE (GimpDrawablePreview, gimp_drawable_preview, #define parent_class gimp_drawable_preview_parent_class +static gint gimp_drawable_preview_counter = 0; + static void gimp_drawable_preview_class_init (GimpDrawablePreviewClass *klass) @@ -129,16 +132,24 @@ gimp_drawable_preview_constructor (GType type, GObjectConstructParam *params) { GObject *object; + gchar *data_name; PreviewSettings settings; - gchar *data_name = g_strconcat (g_get_prgname (), "-preview", NULL); + + data_name = g_strdup_printf ("%s-drawable-preview-%d", + g_get_prgname (), + ++gimp_drawable_preview_counter); object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params); if (gimp_get_data (data_name, &settings)) - gimp_scrolled_preview_set_position (GIMP_SCROLLED_PREVIEW (object), - settings.x, settings.y); + { + gimp_preview_set_update (GIMP_PREVIEW (object), settings.update); + gimp_scrolled_preview_set_position (GIMP_SCROLLED_PREVIEW (object), + settings.x, settings.y); + } - g_free (data_name); + g_object_set_data_full (object, "gimp-drawable-preview-data-name", + data_name, (GDestroyNotify) g_free); return object; } @@ -188,17 +199,20 @@ gimp_drawable_preview_set_property (GObject *object, static void gimp_drawable_preview_destroy (GtkObject *object) { - GimpPreview *preview = GIMP_PREVIEW (object); - PreviewSettings settings; - gchar *data_name; + const gchar *data_name = g_object_get_data (G_OBJECT (object), + "gimp-drawable-preview-data-name"); - settings.x = preview->xoff + preview->xmin; - settings.y = preview->yoff + preview->ymin; - settings.update = TRUE; + if (data_name) + { + GimpPreview *preview = GIMP_PREVIEW (object); + PreviewSettings settings; - data_name = g_strconcat (g_get_prgname (), "-preview", NULL); - gimp_set_data (data_name, &settings, sizeof (PreviewSettings)); - g_free (data_name); + settings.x = preview->xoff + preview->xmin; + settings.y = preview->yoff + preview->ymin; + settings.update = gimp_preview_get_update (preview); + + gimp_set_data (data_name, &settings, sizeof (PreviewSettings)); + } GTK_OBJECT_CLASS (parent_class)->destroy (object); } @@ -521,26 +535,17 @@ _gimp_drawable_preview_get_bounds (GimpDrawable *drawable, } -static void -gimp_drawable_preview_notify_update (GimpPreview *preview, - GParamSpec *pspec, - gboolean *toggle) -{ - *toggle = gimp_preview_get_update (preview); -} - - /** * gimp_drawable_preview_new: * @drawable: a #GimpDrawable - * @toggle: pointer to a #gboolean variable to sync with the "Preview" - * check-button or %NULL + * @toggle: unused * - * Creates a new #GimpDrawablePreview widget for @drawable. If - * updating the preview takes considerable time, you will want to - * store the state of the "Preview" check-button in the plug-in - * data. For convenience you can pass a pointer to the #gboolean as - * @toggle. + * Creates a new #GimpDrawablePreview widget for @drawable. + * + * In GIMP 2.2 the @toggle parameter was provided to conviently access + * the state of the "Preview" check-button. This is not any longer + * necessary as the preview itself now stores this state, as well as + * the scroll offset. * * Returns: A pointer to the new #GimpDrawablePreview widget. * @@ -550,25 +555,11 @@ GtkWidget * gimp_drawable_preview_new (GimpDrawable *drawable, gboolean *toggle) { - GtkWidget *preview; - g_return_val_if_fail (drawable != NULL, NULL); - preview = g_object_new (GIMP_TYPE_DRAWABLE_PREVIEW, - "drawable", drawable, - NULL); - - if (toggle) - { - gimp_preview_set_update (GIMP_PREVIEW (preview), *toggle); - - g_signal_connect (preview, "notify::update", - G_CALLBACK (gimp_drawable_preview_notify_update), - toggle); - } - - - return preview; + return g_object_new (GIMP_TYPE_DRAWABLE_PREVIEW, + "drawable", drawable, + NULL); } /** diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c index 054cc33da6..ed7ca4999f 100644 --- a/libgimp/gimpzoompreview.c +++ b/libgimp/gimpzoompreview.c @@ -48,6 +48,11 @@ typedef struct GimpZoomPreviewPrivate GdkRectangle extents; } GimpZoomPreviewPrivate; +typedef struct +{ + gboolean update; +} PreviewSettings; + #define GIMP_ZOOM_PREVIEW_GET_PRIVATE(obj) \ ((GimpZoomPreviewPrivate *) ((GimpZoomPreview *) (obj))->priv) @@ -65,6 +70,7 @@ static void gimp_zoom_preview_set_property (GObject *object, const GValue *value, GParamSpec *pspec); static void gimp_zoom_preview_finalize (GObject *object); +static void gimp_zoom_preview_destroy (GtkObject *object); static void gimp_zoom_preview_set_adjustments (GimpZoomPreview *preview, gdouble old_factor, @@ -113,19 +119,24 @@ G_DEFINE_TYPE (GimpZoomPreview, gimp_zoom_preview, GIMP_TYPE_SCROLLED_PREVIEW) #define parent_class gimp_zoom_preview_parent_class +static gint gimp_zoom_preview_counter = 0; + static void gimp_zoom_preview_class_init (GimpZoomPreviewClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); - GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); - GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GimpPreviewClass *preview_class = GIMP_PREVIEW_CLASS (klass); object_class->constructor = gimp_zoom_preview_constructor; object_class->get_property = gimp_zoom_preview_get_property; object_class->set_property = gimp_zoom_preview_set_property; object_class->finalize = gimp_zoom_preview_finalize; + gtk_object_class->destroy = gimp_zoom_preview_destroy; + widget_class->style_set = gimp_zoom_preview_style_set; preview_class->draw = gimp_zoom_preview_draw; @@ -193,9 +204,23 @@ gimp_zoom_preview_constructor (GType type, { GimpZoomPreviewPrivate *priv; GObject *object; + gchar *data_name; + PreviewSettings settings; + + data_name = g_strdup_printf ("%s-zoom-preview-%d", + g_get_prgname (), + gimp_zoom_preview_counter++); object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params); + if (gimp_get_data (data_name, &settings)) + { + gimp_preview_set_update (GIMP_PREVIEW (object), settings.update); + } + + g_object_set_data_full (object, "gimp-zoom-preview-data-name", + data_name, (GDestroyNotify) g_free); + priv = GIMP_ZOOM_PREVIEW_GET_PRIVATE (object); if (! priv->model) @@ -275,6 +300,25 @@ gimp_zoom_preview_finalize (GObject *object) G_OBJECT_CLASS (parent_class)->finalize (object); } +static void +gimp_zoom_preview_destroy (GtkObject *object) +{ + const gchar *data_name = g_object_get_data (G_OBJECT (object), + "gimp-zoom-preview-data-name"); + + if (data_name) + { + GimpPreview *preview = GIMP_PREVIEW (object); + PreviewSettings settings; + + settings.update = gimp_preview_get_update (preview); + + gimp_set_data (data_name, &settings, sizeof (PreviewSettings)); + } + + GTK_OBJECT_CLASS (parent_class)->destroy (object); +} + static void gimp_zoom_preview_set_adjustments (GimpZoomPreview *preview, gdouble old_factor, diff --git a/plug-ins/common/cartoon.c b/plug-ins/common/cartoon.c index 8ca5c9d462..b27733b1f2 100644 --- a/plug-ins/common/cartoon.c +++ b/plug-ins/common/cartoon.c @@ -44,7 +44,6 @@ typedef struct gdouble mask_radius; gdouble threshold; gdouble pct_black; - gboolean update_preview; } CartoonVals; @@ -100,8 +99,7 @@ static CartoonVals cvals = { 7.0, /* mask_radius */ 1.0, /* threshold */ - 0.2, /* pct_black */ - TRUE /* update_preview */ + 0.2 /* pct_black */ }; @@ -829,7 +827,7 @@ cartoon_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &cvals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/colortoalpha.c b/plug-ins/common/colortoalpha.c index b6059ffecc..c88c4c3505 100644 --- a/plug-ins/common/colortoalpha.c +++ b/plug-ins/common/colortoalpha.c @@ -38,7 +38,6 @@ typedef struct { GimpRGB color; - gboolean preview; } C2AValues; @@ -74,8 +73,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static C2AValues pvals = { - { 1.0, 1.0, 1.0, 1.0 }, /* white default */ - TRUE /* preview */ + { 1.0, 1.0, 1.0, 1.0 } /* white default */ }; @@ -397,7 +395,7 @@ color_to_alpha_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &pvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect (preview, "invalidated", diff --git a/plug-ins/common/deinterlace.c b/plug-ins/common/deinterlace.c index c8cf5a3dad..549fe72645 100644 --- a/plug-ins/common/deinterlace.c +++ b/plug-ins/common/deinterlace.c @@ -42,7 +42,6 @@ enum typedef struct { gint evenness; - gboolean preview; } DeinterlaceValues; @@ -72,8 +71,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static DeinterlaceValues devals = { - EVEN_FIELDS, /* evenness */ - TRUE /* preview */ + EVEN_FIELDS /* evenness */ }; MAIN () @@ -345,7 +343,7 @@ deinterlace_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &devals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/despeckle.c b/plug-ins/common/despeckle.c index 5f0b47ef35..1c7261eadc 100644 --- a/plug-ins/common/despeckle.c +++ b/plug-ins/common/despeckle.c @@ -48,7 +48,6 @@ #define filter_type (despeckle_vals[1]) /* filter type */ #define black_level (despeckle_vals[2]) /* Black level */ #define white_level (despeckle_vals[3]) /* White level */ -#define update_toggle (despeckle_vals[4]) /* Update the preview? */ #define VALUE_SWAP(a,b) \ { register gdouble t = (a); (a) = (b); (b) = t; } @@ -111,13 +110,12 @@ static GtkWidget *preview; /* Preview widget */ static GimpDrawable *drawable = NULL; /* Current drawable */ -static gint despeckle_vals[7] = +static gint despeckle_vals[4] = { 3, /* Default value for the diameter */ FILTER_ADAPTIVE, /* Default value for the filter type */ 7, /* Default value for the black level */ - 248, /* Default value for the white level */ - TRUE /* Default value for the update toggle */ + 248 /* Default value for the white level */ }; @@ -414,7 +412,7 @@ despeckle_dialog (void) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &update_toggle); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/displace.c b/plug-ins/common/displace.c index 7d60d33629..b48d24117a 100644 --- a/plug-ins/common/displace.c +++ b/plug-ins/common/displace.c @@ -77,7 +77,6 @@ typedef struct gint displace_map_y; gint displace_type; DisplaceMode mode; - gboolean preview; } DisplaceVals; @@ -128,8 +127,7 @@ static DisplaceVals dvals = -1, /* displace_map_x */ -1, /* displace_map_y */ GIMP_PIXEL_FETCHER_EDGE_WRAP, /* displace_type */ - CARTESIAN_MODE, /* mode */ - TRUE + CARTESIAN_MODE /* mode */ }; @@ -346,7 +344,7 @@ displace_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &dvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/dog.c b/plug-ins/common/dog.c index 781280eb13..e92139b89c 100755 --- a/plug-ins/common/dog.c +++ b/plug-ins/common/dog.c @@ -45,7 +45,6 @@ typedef struct gdouble outer; gboolean normalize; gboolean invert; - gboolean preview; } DoGValues; @@ -111,8 +110,7 @@ static DoGValues dogvals = 3.0, /* inner radius */ 1.0, /* outer radius */ TRUE, /* normalize */ - TRUE, /* invert */ - TRUE, /* preview */ + TRUE /* invert */ }; MAIN () @@ -298,7 +296,7 @@ dog_dialog (gint32 image_ID, gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &dogvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect (preview, "invalidated", diff --git a/plug-ins/common/edge.c b/plug-ins/common/edge.c index 9146c8479c..e6adab7048 100644 --- a/plug-ins/common/edge.c +++ b/plug-ins/common/edge.c @@ -81,7 +81,6 @@ typedef struct gdouble amount; gint edgemode; gint wrapmode; - gboolean update_preview; } EdgeVals; /* @@ -122,8 +121,7 @@ static EdgeVals evals = { 2.0, /* amount */ SOBEL, /* Edge detection algorithm */ - GIMP_PIXEL_FETCHER_EDGE_SMEAR, /* wrapmode */ - TRUE /* update_preview */ + GIMP_PIXEL_FETCHER_EDGE_SMEAR /* wrapmode */ }; /***** Functions *****/ @@ -653,7 +651,7 @@ edge_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &evals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect (preview, "invalidated", diff --git a/plug-ins/common/emboss.c b/plug-ins/common/emboss.c index fcda7c4237..9a6a2b2376 100644 --- a/plug-ins/common/emboss.c +++ b/plug-ins/common/emboss.c @@ -50,7 +50,6 @@ typedef struct gdouble elevation; gint32 depth; gint32 embossp; - gboolean preview; } piArgs; static piArgs evals = @@ -58,8 +57,7 @@ static piArgs evals = 30.0, /* azimuth */ 45.0, /* elevation */ 20, /* depth */ - 1, /* emboss */ - TRUE /* preview */ + 1 /* emboss */ }; struct embossFilter @@ -466,7 +464,7 @@ emboss_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &evals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/engrave.c b/plug-ins/common/engrave.c index 3d0f022400..aede6a9b89 100644 --- a/plug-ins/common/engrave.c +++ b/plug-ins/common/engrave.c @@ -37,7 +37,6 @@ typedef struct { gint height; gboolean limit; - gboolean preview; } EngraveValues; static void query (void); @@ -81,8 +80,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static EngraveValues pvals = { 10, /* height */ - FALSE, /* limit */ - TRUE /* preview */ + FALSE /* limit */ }; MAIN () @@ -229,7 +227,7 @@ engrave_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &pvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/exchange.c b/plug-ins/common/exchange.c index 81e053e667..daaae66bc8 100644 --- a/plug-ins/common/exchange.c +++ b/plug-ins/common/exchange.c @@ -55,7 +55,6 @@ typedef struct GimpRGB from; GimpRGB to; GimpRGB threshold; - gboolean preview; } myParams; /* lets prototype */ @@ -81,8 +80,7 @@ static myParams xargs = { { 0.0, 0.0, 0.0, 1.0 }, /* from */ { 0.0, 0.0, 0.0, 1.0 }, /* to */ - { 0.0, 0.0, 0.0, 1.0 }, /* threshold */ - TRUE /* preview */ + { 0.0, 0.0, 0.0, 1.0 } /* threshold */ }; static GtkWidget *from_colorbutton; @@ -312,7 +310,7 @@ exchange_dialog (GimpDrawable *drawable) gtk_box_pack_start_defaults (GTK_BOX (main_vbox), frame); gtk_widget_show (frame); - preview = gimp_drawable_preview_new (drawable, &xargs.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_container_add (GTK_CONTAINER (frame), preview); gtk_widget_show (preview); diff --git a/plug-ins/common/glasstile.c b/plug-ins/common/glasstile.c index 99ddafda6e..014fa3f9b6 100644 --- a/plug-ins/common/glasstile.c +++ b/plug-ins/common/glasstile.c @@ -57,7 +57,6 @@ typedef struct { gint xblock; gint yblock; - gboolean preview; /* interface only */ gint constrain; } GlassValues; @@ -101,7 +100,6 @@ static GlassValues gtvals = { 20, /* tile width */ 20, /* tile height */ - TRUE, /* preview */ /* interface only */ TRUE /* constrained */ }; @@ -270,7 +268,7 @@ glasstile_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, >vals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/mblur.c b/plug-ins/common/mblur.c index 3db556387f..f19ef1393a 100644 --- a/plug-ins/common/mblur.c +++ b/plug-ins/common/mblur.c @@ -65,9 +65,9 @@ typedef struct gdouble center_x; gdouble center_y; gboolean blur_outward; - gboolean preview; } mblur_vals_t; + /***** Prototypes *****/ static void query (void); @@ -113,13 +113,12 @@ const GimpPlugInInfo PLUG_IN_INFO = static mblur_vals_t mbvals = { - MBLUR_LINEAR, /* mblur_type */ - 5, /* length */ - 10, /* radius */ - 100000.0, /* center_x */ - 100000.0, /* center_y */ - TRUE, /* blur_outward */ - TRUE /* preview */ + MBLUR_LINEAR, /* mblur_type */ + 5, /* length */ + 10, /* radius */ + 100000.0, /* center_x */ + 100000.0, /* center_y */ + TRUE /* blur_outward */ }; @@ -1018,7 +1017,7 @@ mblur_dialog (gint32 image_ID, gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &mbvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/mosaic.c b/plug-ins/common/mosaic.c index a556bac260..21408ed88a 100644 --- a/plug-ins/common/mosaic.c +++ b/plug-ins/common/mosaic.c @@ -92,7 +92,6 @@ typedef struct TileType tile_type; gint tile_surface; gint grout_color; - gboolean update_preview; } MosaicVals; @@ -320,8 +319,7 @@ static MosaicVals mvals = 1, /* color_averaging */ HEXAGONS, /* tile_type */ SMOOTH, /* tile_surface */ - BW, /* grout_color */ - TRUE /* preview */ + BW /* grout_color */ }; const GimpPlugInInfo PLUG_IN_INFO = @@ -611,7 +609,7 @@ mosaic_dialog (GimpDrawable *drawable) gtk_widget_show (main_vbox); /* A preview */ - preview = gimp_drawable_preview_new (drawable, &mvals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/newsprint.c b/plug-ins/common/newsprint.c index df4572901b..a55ff68cac 100644 --- a/plug-ins/common/newsprint.c +++ b/plug-ins/common/newsprint.c @@ -222,7 +222,6 @@ typedef struct gdouble input_spi; /* input samples per inch */ gdouble output_lpi; /* desired output lines per inch */ gboolean lock_channels; /* changes to one channel affect all */ - gboolean preview; } NewsprintUIValues; @@ -306,8 +305,7 @@ static const NewsprintUIValues factory_defaults_ui = { 72, /* input spi */ 7.2, /* output lpi */ - FALSE, /* lock channels */ - TRUE /* preview */ + FALSE /* lock channels */ }; /* Mutable copy for normal use. Initialised in run(). */ @@ -1217,7 +1215,7 @@ newsprint_dialog (GimpDrawable *drawable) gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); gtk_widget_show (vbox); - preview = gimp_drawable_preview_new (drawable, &pvals_ui.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (hbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/nlfilt.c b/plug-ins/common/nlfilt.c index bb560e849c..440da8fb5b 100644 --- a/plug-ins/common/nlfilt.c +++ b/plug-ins/common/nlfilt.c @@ -47,7 +47,6 @@ typedef struct gdouble alpha; gdouble radius; gint filter; - gboolean preview; } NLFilterValues; typedef enum @@ -61,8 +60,7 @@ static NLFilterValues nlfvals = { 0.3, 0.3, - 0, - TRUE + 0 }; /* function protos */ @@ -1035,7 +1033,7 @@ nlfilter_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &nlfvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/oilify.c b/plug-ins/common/oilify.c index 2ef0b2a580..5eb238c5e8 100644 --- a/plug-ins/common/oilify.c +++ b/plug-ins/common/oilify.c @@ -51,7 +51,6 @@ typedef struct gboolean use_exponent_map; gint exponent_map; gint mode; - gboolean preview; } OilifyVals; @@ -86,8 +85,7 @@ static OilifyVals ovals = 8.0, /* exponent */ FALSE, /* use exponent map? */ -1, /* exponent map */ - MODE_INTEN, /* mode */ - TRUE /* preview */ + MODE_INTEN /* mode */ }; @@ -794,7 +792,7 @@ oilify_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &ovals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/photocopy.c b/plug-ins/common/photocopy.c index 2c4a719ae7..354f072028 100644 --- a/plug-ins/common/photocopy.c +++ b/plug-ins/common/photocopy.c @@ -50,7 +50,6 @@ typedef struct gdouble threshold; gdouble pct_black; gdouble pct_white; - gboolean update_preview; } PhotocopyVals; @@ -107,8 +106,7 @@ static PhotocopyVals pvals = 0.8, /* sharpness */ 0.75, /* threshold */ 0.2, /* pct_black */ - 0.2, /* pct_white */ - TRUE /* update_preview */ + 0.2 /* pct_white */ }; @@ -857,7 +855,7 @@ photocopy_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &pvals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/plasma.c b/plug-ins/common/plasma.c index 419835a7aa..54b005a203 100644 --- a/plug-ins/common/plasma.c +++ b/plug-ins/common/plasma.c @@ -78,7 +78,6 @@ typedef struct guint32 seed; gdouble turbulence; gboolean random_seed; - gboolean preview; } PlasmaValues; @@ -142,8 +141,7 @@ static PlasmaValues pvals = { 0, /* seed */ 1.0, /* turbulence */ - FALSE, /* Use random seed */ - TRUE /* preview */ + FALSE /* Use random seed */ }; /* @@ -320,7 +318,7 @@ plasma_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_aspect_preview_new (drawable, &pvals.preview); + preview = gimp_aspect_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/ripple.c b/plug-ins/common/ripple.c index b0b3bbc9e9..0d15c41c80 100644 --- a/plug-ins/common/ripple.c +++ b/plug-ins/common/ripple.c @@ -57,7 +57,6 @@ typedef struct gint waveform; gboolean antialias; gboolean tile; - gboolean preview; } RippleValues; @@ -100,8 +99,7 @@ static RippleValues rvals = WRAP, /* edges */ SINE, /* waveform */ TRUE, /* antialias */ - FALSE, /* tile */ - TRUE /* preview */ + FALSE /* tile */ }; /***** Functions *****/ @@ -487,7 +485,7 @@ ripple_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &rvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/scatter_hsv.c b/plug-ins/common/scatter_hsv.c index 997e4ddb6c..8cf39e6f6a 100644 --- a/plug-ins/common/scatter_hsv.c +++ b/plug-ins/common/scatter_hsv.c @@ -73,7 +73,6 @@ typedef struct gint hue_distance; gint saturation_distance; gint value_distance; - gboolean preview; } ValueType; static ValueType VALS = @@ -81,8 +80,7 @@ static ValueType VALS = 2, 3, 10, - 10, - TRUE + 10 }; MAIN () @@ -381,7 +379,7 @@ scatter_hsv_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &VALS.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); diff --git a/plug-ins/common/sel_gauss.c b/plug-ins/common/sel_gauss.c index 5f3e5d3f84..f79a8372d8 100644 --- a/plug-ins/common/sel_gauss.c +++ b/plug-ins/common/sel_gauss.c @@ -53,7 +53,6 @@ typedef struct { gdouble radius; gint maxdelta; - gboolean update_preview; } BlurValues; @@ -84,8 +83,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static BlurValues bvals = { 5.0, /* radius */ - 50, /* maxdelta */ - TRUE /* update_preview */ + 50 /* maxdelta */ }; MAIN () @@ -252,7 +250,7 @@ sel_gauss_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &bvals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/sharpen.c b/plug-ins/common/sharpen.c index 08bec0a2c8..7f77d12908 100644 --- a/plug-ins/common/sharpen.c +++ b/plug-ins/common/sharpen.c @@ -84,14 +84,12 @@ const GimpPlugInInfo PLUG_IN_INFO = typedef struct { - gint sharpen_percent; - gboolean update_preview; + gint sharpen_percent; } SharpenParams; static SharpenParams sharpen_params = { - 10, - TRUE + 10 }; static intneg neg_lut[256]; /* Negative coefficient LUT */ @@ -496,8 +494,7 @@ sharpen_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, - &sharpen_params.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/shift.c b/plug-ins/common/shift.c index 71ad241021..641519c3fc 100644 --- a/plug-ins/common/shift.c +++ b/plug-ins/common/shift.c @@ -41,9 +41,8 @@ typedef struct { - gint shift_amount; - gint orientation; - gboolean preview; + gint shift_amount; + gint orientation; } ShiftValues; @@ -78,8 +77,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static ShiftValues shvals = { 5, /* shift amount */ - HORIZONTAL, /* orientation */ - TRUE /* preview */ + HORIZONTAL /* orientation */ }; @@ -375,7 +373,7 @@ shift_dialog (gint32 image_ID, gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &shvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/snoise.c b/plug-ins/common/snoise.c index 4ee5d08a2e..972b6fbfeb 100644 --- a/plug-ins/common/snoise.c +++ b/plug-ins/common/snoise.c @@ -94,7 +94,6 @@ typedef struct gdouble xsize; gdouble ysize; gboolean random_seed; - gboolean preview; } SolidNoiseValues; @@ -144,8 +143,7 @@ static SolidNoiseValues snvals = 1, /* detail */ 4.0, /* xsize */ 4.0, /* ysize */ - FALSE, /* random seed */ - TRUE /* preview */ + FALSE /* random seed */ }; static gint xclip, yclip; @@ -583,7 +581,7 @@ solid_noise_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_aspect_preview_new (drawable, &snvals.preview); + preview = gimp_aspect_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/sparkle.c b/plug-ins/common/sparkle.c index 81a4e639c9..76cb4cbc9a 100644 --- a/plug-ins/common/sparkle.c +++ b/plug-ins/common/sparkle.c @@ -67,7 +67,6 @@ typedef struct gboolean inverse; gboolean border; gint colortype; - gboolean update_preview; } SparkleVals; @@ -144,8 +143,7 @@ static SparkleVals svals = FALSE, /* preserve_luminosity */ FALSE, /* inverse */ FALSE, /* border */ - NATURAL, /* colortype */ - FALSE /* update_preview */ + NATURAL /* colortype */ }; static gint num_sparkles; @@ -357,7 +355,7 @@ sparkle_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &svals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/spread.c b/plug-ins/common/spread.c index 9a1206244a..bf603669bd 100644 --- a/plug-ins/common/spread.c +++ b/plug-ins/common/spread.c @@ -33,7 +33,6 @@ typedef struct { gdouble spread_amount_x; gdouble spread_amount_y; - gboolean preview; } SpreadValues; /* Declare local functions. @@ -65,8 +64,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static SpreadValues spvals = { 5, /* horizontal spread amount */ - 5, /* vertical spread amount */ - TRUE /* preview */ + 5 /* vertical spread amount */ }; /***** Functions *****/ @@ -364,7 +362,7 @@ spread_dialog (gint32 image_ID, gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &spvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/struc.c b/plug-ins/common/struc.c index 18a07eb041..5b4b6c55be 100644 --- a/plug-ins/common/struc.c +++ b/plug-ins/common/struc.c @@ -1085,9 +1085,8 @@ enum typedef struct { - gint direction; - gint depth; - gboolean update_preview; + gint direction; + gint depth; } StrucValues; @@ -1117,8 +1116,7 @@ const GimpPlugInInfo PLUG_IN_INFO = static StrucValues svals = { 0, /* direction */ - 4, /* depth */ - TRUE + 4 /* depth */ }; @@ -1283,7 +1281,7 @@ struc_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &svals.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/unsharp.c b/plug-ins/common/unsharp.c index b9a343c671..2d51cd39a2 100644 --- a/plug-ins/common/unsharp.c +++ b/plug-ins/common/unsharp.c @@ -46,7 +46,6 @@ typedef struct gdouble radius; gdouble amount; gint threshold; - gboolean update_preview; } UnsharpMaskParams; typedef struct @@ -94,12 +93,11 @@ static void preview_update (GimpPreview *preview); /* create a few globals, set default values */ static UnsharpMaskParams unsharp_params = - { - 5.0, /* default radius = 5 */ - 0.5, /* default amount = .5 */ - 0, /* default threshold = 0 */ - TRUE /* default is to update the preview */ - }; +{ + 5.0, /* default radius */ + 0.5, /* default amount */ + 0 /* default threshold */ +}; /* Setting PLUG_IN_INFO */ const GimpPlugInInfo PLUG_IN_INFO = @@ -662,8 +660,7 @@ unsharp_mask_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, - &unsharp_params.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start (GTK_BOX (main_vbox), preview, TRUE, TRUE, 0); gtk_widget_show (preview); diff --git a/plug-ins/common/vpropagate.c b/plug-ins/common/vpropagate.c index 58efb194e5..7a04c59a46 100644 --- a/plug-ins/common/vpropagate.c +++ b/plug-ins/common/vpropagate.c @@ -27,8 +27,8 @@ In other word, pixel itself is not a neighbor of it. */ /* - in response to bug #156545, after lengthy discussion, the meanings of "dilate" - and "erode" are being swapped -- 19 May 2006. + in response to bug #156545, after lengthy discussion, the meanings + of "dilate" and "erode" are being swapped -- 19 May 2006. */ #include "config.h" @@ -150,7 +150,6 @@ typedef struct gint direction_mask; gint lower_limit; gint upper_limit; - gboolean preview; } VPValueType; static VPValueType vpvals = @@ -160,8 +159,7 @@ static VPValueType vpvals = 1.0, /* [0.0:1.0] */ 15, /* propagate to all 4 directions */ 0, /* lower_limit */ - 255, /* upper_limit */ - TRUE /* preview */ + 255 /* upper_limit */ }; /* dialog variables */ @@ -1083,7 +1081,7 @@ vpropagate_dialog (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &vpvals.preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated", diff --git a/plug-ins/common/wind.c b/plug-ins/common/wind.c index 88bdf7d160..a31d2c783d 100644 --- a/plug-ins/common/wind.c +++ b/plug-ins/common/wind.c @@ -137,12 +137,11 @@ const GimpPlugInInfo PLUG_IN_INFO = struct config_tag { - gint threshold; /* derivative comparison for edge detection */ - direction_t direction; /* of wind, LEFT or RIGHT */ - gint strength; /* how many pixels to bleed */ - algorithm_t alg; /* which algorithm */ - edge_t edge; /* controls abs, negation of derivative */ - gboolean update_preview; /* should the preview be active? */ + gint threshold; /* derivative comparison for edge detection */ + direction_t direction; /* of wind, LEFT or RIGHT */ + gint strength; /* how many pixels to bleed */ + algorithm_t alg; /* which algorithm */ + edge_t edge; /* controls abs, negation of derivative */ }; typedef struct config_tag config_t; @@ -152,8 +151,7 @@ config_t config = LEFT, /* bleed to the right */ 10, /* how many pixels to bleed */ RENDER_WIND, /* default algorithm */ - LEADING, /* abs(derivative); */ - TRUE /* update_preview */ + LEADING /* abs(derivative) */ }; MAIN () @@ -890,7 +888,7 @@ dialog_box (GimpDrawable *drawable) gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox); gtk_widget_show (main_vbox); - preview = gimp_drawable_preview_new (drawable, &config.update_preview); + preview = gimp_drawable_preview_new (drawable, NULL); gtk_box_pack_start_defaults (GTK_BOX (main_vbox), preview); gtk_widget_show (preview); g_signal_connect_swapped (preview, "invalidated",