Commit dddbf282 authored by Sven Neumann's avatar Sven Neumann
Browse files

the never-ending previews story...


--Sven
parent c0a26459
2000-05-24 Sven Neumann <sven@gimp.org>
* plug-ins/common/grid.c: enabled preview in indexed
mode. Of course the colors do not reflect the result
exactly, but it's better than nothing.
* jigsaw.c
* plasma.c
* wind.c: forgot to set preview flag to TRUE in the
calls to gimp_ui_init().
2000-05-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/flarefx.c
......
......@@ -344,9 +344,6 @@ doit (gint32 image_ID,
if (preview_mode)
{
if (gimp_drawable_is_indexed (drawable->id))
return;
memcpy (hcolor, grid_cfg.hcolor, 4);
memcpy (vcolor, grid_cfg.vcolor, 4);
memcpy (icolor, grid_cfg.icolor, 4);
......@@ -486,7 +483,7 @@ doit (gint32 image_ID,
}
if (preview_mode)
{
memcpy (GTK_PREVIEW (preview)->buffer + GTK_PREVIEW (preview)->rowstride,
memcpy (GTK_PREVIEW (preview)->buffer + (GTK_PREVIEW (preview)->rowstride * y),
dest,
GTK_PREVIEW (preview)->rowstride);
}
......@@ -611,9 +608,6 @@ update_preview_callback (GtkWidget *widget,
drawable = gtk_object_get_data (GTK_OBJECT (widget), "drawable");
if (gimp_drawable_is_indexed (drawable->id))
return;
entry = gtk_object_get_data (GTK_OBJECT (widget), "width");
grid_cfg.hwidth = (int)(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (entry), 0) + 0.5);
grid_cfg.vwidth = (int)(gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (entry), 1) + 0.5);
......@@ -718,7 +712,6 @@ dialog (gint32 image_ID,
GTK_SIGNAL_FUNC (update_preview_callback),
NULL);
gtk_container_add (GTK_CONTAINER (abox), button);
gtk_widget_set_sensitive (button, !gimp_drawable_is_indexed (drawable->id));
gtk_widget_show (button);
/* left side of the UI is done */
......@@ -977,20 +970,11 @@ preview_widget (GDrawable *drawable)
gint size;
GtkWidget *preview;
if (gimp_drawable_indexed (drawable->id))
{
preview = gtk_label_new (_("Sorry, no preview\n"
"for indexed images."));
gtk_misc_set_padding (GTK_MISC (preview), 4, 4);
}
else
{
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview (preview, drawable);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
}
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
fill_preview (preview, drawable);
size = GTK_PREVIEW (preview)->rowstride * GTK_PREVIEW (preview)->buffer_height;
preview_bits = g_malloc (size);
memcpy (preview_bits, GTK_PREVIEW (preview)->buffer, size);
return preview;
}
......
......@@ -2475,7 +2475,7 @@ dialog_box (void)
GtkWidget *table;
GtkObject *adj;
gimp_ui_init ("jigsaw", FALSE);
gimp_ui_init ("jigsaw", TRUE);
dlg = gimp_dialog_new (_("Jigsaw"), "jigsaw",
gimp_standard_help_func, "filters/jigsaw.html",
......
......@@ -296,7 +296,7 @@ plasma_dialog (GDrawable *drawable)
GtkWidget *seed;
GtkObject *adj;
gimp_ui_init ("plasma", FALSE);
gimp_ui_init ("plasma", TRUE);
dlg = gimp_dialog_new (_("Plasma"), "plasma",
gimp_standard_help_func, "filters/plasma.html",
......
......@@ -839,7 +839,7 @@ dialog_box (GDrawable *drawable)
GtkWidget *edge2;
GtkWidget *edge3;
gimp_ui_init ("wind", FALSE);
gimp_ui_init ("wind", TRUE);
dlg = gimp_dialog_new ( _("Wind"), "wind",
gimp_standard_help_func, "filters/wind.html",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment