Commit 24c4243f authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

General fix for bug #478657:

2007-09-21  Sven Neumann  <sven@gimp.org>

	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().

svn path=/trunk/; revision=23603
parent 24c7fc1e
2007-09-21 Sven Neumann <sven@gimp.org>
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 <sven@gimp.org>
* libgimpwidgets/gimppreview.c: formatting.
......@@ -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);
}
......@@ -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");
if (data_name)
{
GimpPreview *preview = GIMP_PREVIEW (object);
PreviewSettings settings;
settings.x = preview->xoff + preview->xmin;
settings.y = preview->yoff + preview->ymin;
settings.update = TRUE;
settings.x = preview->xoff + preview->xmin;
settings.y = preview->yoff + preview->ymin;
settings.update = gimp_preview_get_update (preview);
data_name = g_strconcat (g_get_prgname (), "-preview", NULL);
gimp_set_data (data_name, &settings, sizeof (PreviewSettings));
g_free (data_name);
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);
}
/**
......
......@@ -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,
......
......@@ -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);
......
......@@ -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",
......
......@@ -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",
......
......@@ -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);
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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",
......
......@@ -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);
......
......@@ -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, &gtvals.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",
......
......@@ -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 =