Resizing image canvases should be less horrible to look at. I've removed

Sat Oct  3 21:01:34 BST 1998 Adam D. Moss <adam@gimp.org>

	* app/channel.c app/channel_ops.c app/disp_callbacks.c
	app/floating_sel.c app/gdisplay.c app/gdisplay.h
	app/gdisplay_ops.c app/gimpimage.c app/image_map.c
	app/interface.c app/layers_dialog.c app/plug_in.c app/undo.c
	app/xcf.c:

	Resizing image canvases should be less horrible to look at.
	I've removed the implicit clear of the whole area when a
	window is resized by the user, and clear the exposed area around
	the image manually when appropriate.

	Dialogs which want synchronous updates for previews and
	such use displays_update_now().

	Removed some old debugging nonsense which I don't want any more.
This commit is contained in:
BST 1998 Adam D. Moss 1998-10-03 20:14:00 +00:00 committed by Adam D. Moss
parent e99f37ab19
commit c3d66ee292
62 changed files with 266 additions and 230 deletions

View File

@ -1,3 +1,21 @@
Sat Oct 3 21:01:34 BST 1998 Adam D. Moss <adam@gimp.org>
* app/channel.c app/channel_ops.c app/disp_callbacks.c
app/floating_sel.c app/gdisplay.c app/gdisplay.h
app/gdisplay_ops.c app/gimpimage.c app/image_map.c
app/interface.c app/layers_dialog.c app/plug_in.c app/undo.c
app/xcf.c:
Resizing image canvases should be less horrible to look at.
I've removed the implicit clear of the whole area when a
window is resized by the user, and clear the exposed area around
the image manually when appropriate.
Dialogs which want synchronous updates for previews and
such use displays_update_now().
Removed some old debugging nonsense which I don't want any more.
Thu Oct 1 22:39:14 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>
* app/patterns.c app/pattern_select.c app/internal_procs.c

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -271,8 +271,6 @@ channel_scale (Channel *channel, int new_width, int new_height)
if (new_width == 0 || new_height == 0)
return;
printf(" channel_scale ");fflush(stdout);
/* Update the old channel position */
drawable_update (GIMP_DRAWABLE(channel), 0, 0, GIMP_DRAWABLE(channel)->width, GIMP_DRAWABLE(channel)->height);
@ -316,8 +314,6 @@ channel_resize (Channel *channel, int new_width, int new_height,
if (!new_width || !new_height)
return;
printf(" channel_resize ");fflush(stdout);
x1 = BOUNDS (offx, 0, new_width);
y1 = BOUNDS (offy, 0, new_height);
x2 = BOUNDS ((offx + GIMP_DRAWABLE(channel)->width), 0, new_width);

View File

@ -431,17 +431,17 @@ offset (GImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable),
drawable_apply_image (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable),
drawable_data (drawable), FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
printf(" offset ");fflush(stdout);
/* update the drawable */
drawable_update (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable));
drawable_update (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable));
}
/*

View File

@ -271,8 +271,6 @@ channel_scale (Channel *channel, int new_width, int new_height)
if (new_width == 0 || new_height == 0)
return;
printf(" channel_scale ");fflush(stdout);
/* Update the old channel position */
drawable_update (GIMP_DRAWABLE(channel), 0, 0, GIMP_DRAWABLE(channel)->width, GIMP_DRAWABLE(channel)->height);
@ -316,8 +314,6 @@ channel_resize (Channel *channel, int new_width, int new_height,
if (!new_width || !new_height)
return;
printf(" channel_resize ");fflush(stdout);
x1 = BOUNDS (offx, 0, new_width);
y1 = BOUNDS (offy, 0, new_height);
x2 = BOUNDS ((offx + GIMP_DRAWABLE(channel)->width), 0, new_width);

View File

@ -271,8 +271,6 @@ channel_scale (Channel *channel, int new_width, int new_height)
if (new_width == 0 || new_height == 0)
return;
printf(" channel_scale ");fflush(stdout);
/* Update the old channel position */
drawable_update (GIMP_DRAWABLE(channel), 0, 0, GIMP_DRAWABLE(channel)->width, GIMP_DRAWABLE(channel)->height);
@ -316,8 +314,6 @@ channel_resize (Channel *channel, int new_width, int new_height,
if (!new_width || !new_height)
return;
printf(" channel_resize ");fflush(stdout);
x1 = BOUNDS (offx, 0, new_width);
y1 = BOUNDS (offy, 0, new_height);
x2 = BOUNDS ((offx + GIMP_DRAWABLE(channel)->width), 0, new_width);

View File

@ -431,17 +431,17 @@ offset (GImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable),
drawable_apply_image (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable),
drawable_data (drawable), FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
printf(" offset ");fflush(stdout);
/* update the drawable */
drawable_update (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable));
drawable_update (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable));
}
/*

View File

@ -431,17 +431,17 @@ offset (GImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable),
drawable_apply_image (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable),
drawable_data (drawable), FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
printf(" offset ");fflush(stdout);
/* update the drawable */
drawable_update (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable));
drawable_update (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable));
}
/*

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -1133,9 +1133,9 @@ undo_pop_layer (GImage *gimage,
floating_sel_reset (lu->layer);
}
/*printf (" undo_pop1 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0,
GIMP_DRAWABLE(lu->layer)->width,
GIMP_DRAWABLE(lu->layer)->height);
}
/* restore layer */
else
@ -1152,13 +1152,14 @@ undo_pop_layer (GImage *gimage,
gimage->floating_sel = lu->layer;
/* add the new layer */
gimage->layers = g_slist_insert (gimage->layers, lu->layer, lu->prev_position);
gimage->layers = g_slist_insert (gimage->layers, lu->layer,
lu->prev_position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
/*printf (" undo_pop2 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0,
GIMP_DRAWABLE(lu->layer)->width,
GIMP_DRAWABLE(lu->layer)->height);
}
return TRUE;

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -85,7 +85,7 @@ image_map_do (gpointer data)
if (_image_map->gdisp)
{
drawable_update ( (_image_map->drawable), x, y, w, h);
gdisplay_flush (_image_map->gdisp);
gdisplay_flush_now (_image_map->gdisp);
}
_image_map->pr = pixel_regions_process (_image_map->pr);

View File

@ -211,8 +211,6 @@ floating_sel_to_layer (Layer *layer)
msw@gimp.org
*/
printf(" floating_sel_to_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -119,7 +119,7 @@ gdisplay_new (GimpImage *gimage,
gdisp->progressid = FALSE;
gdisp->idle_render.idleid = -1;
gdisp->idle_render.handlerid = -1;
/*gdisp->idle_render.handlerid = -1;*/
gdisp->idle_render.update_areas = NULL;
gdisp->idle_render.active = FALSE;
@ -337,6 +337,11 @@ idle_render_next_area (GDisplay *gdisp)
}
/* Unless specified otherwise, display re-rendering is organised
by IdleRender, which amalgamates areas to be re-rendered and
breaks them into bite-sized chunks which are chewed on in a low-
priority idle thread. This greatly improves responsiveness for
many GIMP operations. -- Adam */
static int
idlerender_callback (gpointer data)
{
@ -607,7 +612,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 8, 1);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 8, 1);
normal_hgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -624,7 +630,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 1, 8);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 1, 8);
normal_vgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -640,7 +647,9 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
gdisplay_transform_coords (gdisp,
gdisp->gimage->width, gdisp->gimage->height,
&x2, &y2, FALSE);
gdk_window_get_size (gdisp->canvas->window, &w, &h);
if (x1 < 0) x1 = 0;
@ -1002,36 +1011,53 @@ gdisplay_display_area (GDisplay *gdisp,
x2 = BOUNDS (x + w, 0, gdisp->disp_width);
y2 = BOUNDS (y + h, 0, gdisp->disp_height);
if (x1 < gdisp->disp_xoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, gdisp->disp_xoffset - x, h);
x1 = gdisp->disp_xoffset;
}
if (y1 < gdisp->disp_yoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, w, gdisp->disp_yoffset - y);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y, w, gdisp->disp_yoffset - y);
/* X X X
. # .
. . . */
y1 = gdisp->disp_yoffset;
}
if (x1 < gdisp->disp_xoffset)
{
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y1, gdisp->disp_xoffset - x, h);
/* . . .
X # .
X . . */
x1 = gdisp->disp_xoffset;
}
if (x2 > (gdisp->disp_xoffset + sx))
{
gdk_window_clear_area (gdisp->canvas->window,
gdisp->disp_xoffset + sx, y,
x2 - (gdisp->disp_xoffset + sx), h);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
gdisp->disp_xoffset + sx, y1,
x2 - (gdisp->disp_xoffset + sx), h - (y1-y));
/* . . .
. # X
. . X */
x2 = gdisp->disp_xoffset + sx;
}
if (y2 > (gdisp->disp_yoffset + sy))
{
gdk_window_clear_area (gdisp->canvas->window,
x, gdisp->disp_yoffset + sy,
w, y2 - (gdisp->disp_yoffset + sy));
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x1, gdisp->disp_yoffset + sy,
x2-x1,
y2 - (gdisp->disp_yoffset + sy));
/* . . .
. # .
. X . */
y2 = gdisp->disp_yoffset + sy;
}
@ -1040,9 +1066,10 @@ gdisplay_display_area (GDisplay *gdisp,
for (i = y1; i < y2; i += GXIMAGE_HEIGHT)
for (j = x1; j < x2; j += GXIMAGE_WIDTH)
{
dx = (x2 - j < GXIMAGE_WIDTH) ? x2 - j : GXIMAGE_WIDTH;
dy = (y2 - i < GXIMAGE_HEIGHT) ? y2 - i : GXIMAGE_HEIGHT;
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset, dx, dy);
dx = MIN (x2 - j, GXIMAGE_WIDTH);
dy = MIN (y2 - i, GXIMAGE_HEIGHT);
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset,
dx, dy);
gximage_put (gdisp->canvas->window,
j, i, dx, dy,
gdisp->offset_x,

View File

@ -49,7 +49,7 @@ typedef struct _IdleRenderStruct
int basex;
int basey;
guint idleid;
guint handlerid;
/*guint handlerid;*/
gboolean active;
GSList *update_areas; /* flushed update areas */
@ -135,6 +135,7 @@ void gdisplay_expose_area (GDisplay *, int, int, int, int);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, int);
Guide* gdisplay_find_guide (GDisplay *, int, int);

View File

@ -54,12 +54,10 @@ redraw (GDisplay *gdisp,
y1 = y;
x2 = (x+w);
y2 = (y+h);
x1 = BOUNDS (x1, 0, gdisp->disp_width);
y1 = BOUNDS (y1, 0, gdisp->disp_height);
x2 = BOUNDS (x2, 0, gdisp->disp_width);
y2 = BOUNDS (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
@ -150,11 +148,14 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case GDK_EXPOSE:
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
/*printf(" CNF ");fflush(stdout);*/
if ((gdisp->disp_width != gdisp->canvas->allocation.width) ||
(gdisp->disp_height != gdisp->canvas->allocation.height))
{

View File

@ -54,12 +54,10 @@ redraw (GDisplay *gdisp,
y1 = y;
x2 = (x+w);
y2 = (y+h);
x1 = BOUNDS (x1, 0, gdisp->disp_width);
y1 = BOUNDS (y1, 0, gdisp->disp_height);
x2 = BOUNDS (x2, 0, gdisp->disp_width);
y2 = BOUNDS (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
@ -150,11 +148,14 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case GDK_EXPOSE:
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
/*printf(" CNF ");fflush(stdout);*/
if ((gdisp->disp_width != gdisp->canvas->allocation.width) ||
(gdisp->disp_height != gdisp->canvas->allocation.height))
{

View File

@ -105,9 +105,12 @@ gdisplay_close_window (GDisplay *gdisp,
}
void
gdisplay_shrink_wrap (GDisplay *gdisp)
{
/* FIXME: There's something wrong here - ..set_usize() seems to not
be doing the right thing when it could... GTK problem? */
gint x, y;
gint disp_width, disp_height;
gint width, height;
@ -147,6 +150,12 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
gtk_widget_set_usize (gdisp->canvas,
width, height);
/*printf("1w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
width, height,
disp_width, disp_height,
shell_width, shell_height,
border_x, border_y);fflush(stdout);*/
gtk_widget_show (gdisp->canvas);
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
@ -176,6 +185,12 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
gtk_widget_set_usize (gdisp->canvas,
max_auto_width, max_auto_height);
/*printf("2w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
width, height,
disp_width, disp_height,
shell_width, shell_height,
border_x, border_y);fflush(stdout);*/
gtk_widget_show (gdisp->canvas);
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);

View File

@ -119,7 +119,7 @@ gdisplay_new (GimpImage *gimage,
gdisp->progressid = FALSE;
gdisp->idle_render.idleid = -1;
gdisp->idle_render.handlerid = -1;
/*gdisp->idle_render.handlerid = -1;*/
gdisp->idle_render.update_areas = NULL;
gdisp->idle_render.active = FALSE;
@ -337,6 +337,11 @@ idle_render_next_area (GDisplay *gdisp)
}
/* Unless specified otherwise, display re-rendering is organised
by IdleRender, which amalgamates areas to be re-rendered and
breaks them into bite-sized chunks which are chewed on in a low-
priority idle thread. This greatly improves responsiveness for
many GIMP operations. -- Adam */
static int
idlerender_callback (gpointer data)
{
@ -607,7 +612,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 8, 1);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 8, 1);
normal_hgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -624,7 +630,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 1, 8);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 1, 8);
normal_vgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -640,7 +647,9 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
gdisplay_transform_coords (gdisp,
gdisp->gimage->width, gdisp->gimage->height,
&x2, &y2, FALSE);
gdk_window_get_size (gdisp->canvas->window, &w, &h);
if (x1 < 0) x1 = 0;
@ -1002,36 +1011,53 @@ gdisplay_display_area (GDisplay *gdisp,
x2 = BOUNDS (x + w, 0, gdisp->disp_width);
y2 = BOUNDS (y + h, 0, gdisp->disp_height);
if (x1 < gdisp->disp_xoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, gdisp->disp_xoffset - x, h);
x1 = gdisp->disp_xoffset;
}
if (y1 < gdisp->disp_yoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, w, gdisp->disp_yoffset - y);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y, w, gdisp->disp_yoffset - y);
/* X X X
. # .
. . . */
y1 = gdisp->disp_yoffset;
}
if (x1 < gdisp->disp_xoffset)
{
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y1, gdisp->disp_xoffset - x, h);
/* . . .
X # .
X . . */
x1 = gdisp->disp_xoffset;
}
if (x2 > (gdisp->disp_xoffset + sx))
{
gdk_window_clear_area (gdisp->canvas->window,
gdisp->disp_xoffset + sx, y,
x2 - (gdisp->disp_xoffset + sx), h);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
gdisp->disp_xoffset + sx, y1,
x2 - (gdisp->disp_xoffset + sx), h - (y1-y));
/* . . .
. # X
. . X */
x2 = gdisp->disp_xoffset + sx;
}
if (y2 > (gdisp->disp_yoffset + sy))
{
gdk_window_clear_area (gdisp->canvas->window,
x, gdisp->disp_yoffset + sy,
w, y2 - (gdisp->disp_yoffset + sy));
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x1, gdisp->disp_yoffset + sy,
x2-x1,
y2 - (gdisp->disp_yoffset + sy));
/* . . .
. # .
. X . */
y2 = gdisp->disp_yoffset + sy;
}
@ -1040,9 +1066,10 @@ gdisplay_display_area (GDisplay *gdisp,
for (i = y1; i < y2; i += GXIMAGE_HEIGHT)
for (j = x1; j < x2; j += GXIMAGE_WIDTH)
{
dx = (x2 - j < GXIMAGE_WIDTH) ? x2 - j : GXIMAGE_WIDTH;
dy = (y2 - i < GXIMAGE_HEIGHT) ? y2 - i : GXIMAGE_HEIGHT;
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset, dx, dy);
dx = MIN (x2 - j, GXIMAGE_WIDTH);
dy = MIN (y2 - i, GXIMAGE_HEIGHT);
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset,
dx, dy);
gximage_put (gdisp->canvas->window,
j, i, dx, dy,
gdisp->offset_x,

View File

@ -49,7 +49,7 @@ typedef struct _IdleRenderStruct
int basex;
int basey;
guint idleid;
guint handlerid;
/*guint handlerid;*/
gboolean active;
GSList *update_areas; /* flushed update areas */
@ -135,6 +135,7 @@ void gdisplay_expose_area (GDisplay *, int, int, int, int);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, int);
Guide* gdisplay_find_guide (GDisplay *, int, int);

View File

@ -54,12 +54,10 @@ redraw (GDisplay *gdisp,
y1 = y;
x2 = (x+w);
y2 = (y+h);
x1 = BOUNDS (x1, 0, gdisp->disp_width);
y1 = BOUNDS (y1, 0, gdisp->disp_height);
x2 = BOUNDS (x2, 0, gdisp->disp_width);
y2 = BOUNDS (y2, 0, gdisp->disp_height);
if ((x2 - x1) && (y2 - y1))
{
gdisplay_expose_area (gdisp, x1, y1, (x2 - x1), (y2 - y1));
@ -150,11 +148,14 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case GDK_EXPOSE:
eevent = (GdkEventExpose *) event;
/*printf(" EXP:%d,%d(%dx%d) ",eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);fflush(stdout);*/
redraw (gdisp, eevent->area.x, eevent->area.y,
eevent->area.width, eevent->area.height);
break;
case GDK_CONFIGURE:
/*printf(" CNF ");fflush(stdout);*/
if ((gdisp->disp_width != gdisp->canvas->allocation.width) ||
(gdisp->disp_height != gdisp->canvas->allocation.height))
{

View File

@ -679,6 +679,7 @@ create_display_shell (GDisplay* gdisp,
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
/* pack all the widgets */
gtk_table_attach (GTK_TABLE (table), table_inner, 0, 1, 0, 1,
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
@ -764,6 +765,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);
#warning DODGY?
gtk_widget_realize (gdisp->canvas);
gdk_window_set_back_pixmap(gdisp->canvas->window, NULL, 0);
/* set the focus to the canvas area */
gtk_widget_grab_focus (gdisp->canvas);
}

View File

@ -679,6 +679,7 @@ create_display_shell (GDisplay* gdisp,
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
/* pack all the widgets */
gtk_table_attach (GTK_TABLE (table), table_inner, 0, 1, 0, 1,
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
@ -764,6 +765,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);
#warning DODGY?
gtk_widget_realize (gdisp->canvas);
gdk_window_set_back_pixmap(gdisp->canvas->window, NULL, 0);
/* set the focus to the canvas area */
gtk_widget_grab_focus (gdisp->canvas);
}

View File

@ -211,8 +211,6 @@ floating_sel_to_layer (Layer *layer)
msw@gimp.org
*/
printf(" floating_sel_to_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);

View File

@ -119,7 +119,7 @@ gdisplay_new (GimpImage *gimage,
gdisp->progressid = FALSE;
gdisp->idle_render.idleid = -1;
gdisp->idle_render.handlerid = -1;
/*gdisp->idle_render.handlerid = -1;*/
gdisp->idle_render.update_areas = NULL;
gdisp->idle_render.active = FALSE;
@ -337,6 +337,11 @@ idle_render_next_area (GDisplay *gdisp)
}
/* Unless specified otherwise, display re-rendering is organised
by IdleRender, which amalgamates areas to be re-rendered and
breaks them into bite-sized chunks which are chewed on in a low-
priority idle thread. This greatly improves responsiveness for
many GIMP operations. -- Adam */
static int
idlerender_callback (gpointer data)
{
@ -607,7 +612,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 8, 1);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 8, 1);
normal_hgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -624,7 +630,8 @@ gdisplay_draw_guide (GDisplay *gdisp,
values.foreground.pixel = gdisplay_black_pixel (gdisp);
values.background.pixel = g_normal_guide_pixel;
values.fill = GDK_OPAQUE_STIPPLED;
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window, (char*) stipple, 1, 8);
values.stipple = gdk_bitmap_create_from_data (gdisp->canvas->window,
(char*) stipple, 1, 8);
normal_vgc = gdk_gc_new_with_values (gdisp->canvas->window, &values,
GDK_GC_FOREGROUND |
GDK_GC_BACKGROUND |
@ -640,7 +647,9 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
gdisplay_transform_coords (gdisp,
gdisp->gimage->width, gdisp->gimage->height,
&x2, &y2, FALSE);
gdk_window_get_size (gdisp->canvas->window, &w, &h);
if (x1 < 0) x1 = 0;
@ -1002,36 +1011,53 @@ gdisplay_display_area (GDisplay *gdisp,
x2 = BOUNDS (x + w, 0, gdisp->disp_width);
y2 = BOUNDS (y + h, 0, gdisp->disp_height);
if (x1 < gdisp->disp_xoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, gdisp->disp_xoffset - x, h);
x1 = gdisp->disp_xoffset;
}
if (y1 < gdisp->disp_yoffset)
{
gdk_window_clear_area (gdisp->canvas->window,
x, y, w, gdisp->disp_yoffset - y);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y, w, gdisp->disp_yoffset - y);
/* X X X
. # .
. . . */
y1 = gdisp->disp_yoffset;
}
if (x1 < gdisp->disp_xoffset)
{
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x, y1, gdisp->disp_xoffset - x, h);
/* . . .
X # .
X . . */
x1 = gdisp->disp_xoffset;
}
if (x2 > (gdisp->disp_xoffset + sx))
{
gdk_window_clear_area (gdisp->canvas->window,
gdisp->disp_xoffset + sx, y,
x2 - (gdisp->disp_xoffset + sx), h);
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
gdisp->disp_xoffset + sx, y1,
x2 - (gdisp->disp_xoffset + sx), h - (y1-y));
/* . . .
. # X
. . X */
x2 = gdisp->disp_xoffset + sx;
}
if (y2 > (gdisp->disp_yoffset + sy))
{
gdk_window_clear_area (gdisp->canvas->window,
x, gdisp->disp_yoffset + sy,
w, y2 - (gdisp->disp_yoffset + sy));
gdk_draw_rectangle (gdisp->canvas->window,
gdisp->canvas->style->bg_gc[GTK_STATE_NORMAL], 1,
x1, gdisp->disp_yoffset + sy,
x2-x1,
y2 - (gdisp->disp_yoffset + sy));
/* . . .
. # .
. X . */
y2 = gdisp->disp_yoffset + sy;
}
@ -1040,9 +1066,10 @@ gdisplay_display_area (GDisplay *gdisp,
for (i = y1; i < y2; i += GXIMAGE_HEIGHT)
for (j = x1; j < x2; j += GXIMAGE_WIDTH)
{
dx = (x2 - j < GXIMAGE_WIDTH) ? x2 - j : GXIMAGE_WIDTH;
dy = (y2 - i < GXIMAGE_HEIGHT) ? y2 - i : GXIMAGE_HEIGHT;
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset, dx, dy);
dx = MIN (x2 - j, GXIMAGE_WIDTH);
dy = MIN (y2 - i, GXIMAGE_HEIGHT);
render_image (gdisp, j - gdisp->disp_xoffset, i - gdisp->disp_yoffset,
dx, dy);
gximage_put (gdisp->canvas->window,
j, i, dx, dy,
gdisp->offset_x,

View File

@ -49,7 +49,7 @@ typedef struct _IdleRenderStruct
int basex;
int basey;
guint idleid;
guint handlerid;
/*guint handlerid;*/
gboolean active;
GSList *update_areas; /* flushed update areas */
@ -135,6 +135,7 @@ void gdisplay_expose_area (GDisplay *, int, int, int, int);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, int);
Guide* gdisplay_find_guide (GDisplay *, int, int);

View File

@ -105,9 +105,12 @@ gdisplay_close_window (GDisplay *gdisp,
}
void
gdisplay_shrink_wrap (GDisplay *gdisp)
{
/* FIXME: There's something wrong here - ..set_usize() seems to not
be doing the right thing when it could... GTK problem? */
gint x, y;
gint disp_width, disp_height;
gint width, height;
@ -147,6 +150,12 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
gtk_widget_set_usize (gdisp->canvas,
width, height);
/*printf("1w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
width, height,
disp_width, disp_height,
shell_width, shell_height,
border_x, border_y);fflush(stdout);*/
gtk_widget_show (gdisp->canvas);
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);
@ -176,6 +185,12 @@ gdisplay_shrink_wrap (GDisplay *gdisp)
gtk_widget_set_usize (gdisp->canvas,
max_auto_width, max_auto_height);
/*printf("2w:%d/%d d:%d/%d s:%d/%d b:%d/%d\n",
width, height,
disp_width, disp_height,
shell_width, shell_height,
border_x, border_y);fflush(stdout);*/
gtk_widget_show (gdisp->canvas);
gdk_window_get_origin (gdisp->shell->window, &shell_x, &shell_y);

View File

@ -271,8 +271,6 @@ channel_scale (Channel *channel, int new_width, int new_height)
if (new_width == 0 || new_height == 0)
return;
printf(" channel_scale ");fflush(stdout);
/* Update the old channel position */
drawable_update (GIMP_DRAWABLE(channel), 0, 0, GIMP_DRAWABLE(channel)->width, GIMP_DRAWABLE(channel)->height);
@ -316,8 +314,6 @@ channel_resize (Channel *channel, int new_width, int new_height,
if (!new_width || !new_height)
return;
printf(" channel_resize ");fflush(stdout);
x1 = BOUNDS (offx, 0, new_width);
y1 = BOUNDS (offy, 0, new_height);
x2 = BOUNDS ((offx + GIMP_DRAWABLE(channel)->width), 0, new_width);

View File

@ -431,17 +431,17 @@ offset (GImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable),
drawable_apply_image (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable),
drawable_data (drawable), FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
printf(" offset ");fflush(stdout);
/* update the drawable */
drawable_update (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable));
drawable_update (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable));
}
/*

View File

@ -431,17 +431,17 @@ offset (GImage *gimage,
}
/* push an undo */
drawable_apply_image (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable),
drawable_apply_image (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable),
drawable_data (drawable), FALSE);
/* swap the tiles */
drawable->tiles = new_tiles;
printf(" offset ");fflush(stdout);
/* update the drawable */
drawable_update (drawable, 0, 0, drawable_width (drawable), drawable_height (drawable));
drawable_update (drawable, 0, 0,
drawable_width (drawable), drawable_height (drawable));
}
/*

View File

@ -2034,8 +2034,6 @@ gimp_image_merge_layers (GimpImage *gimage, GSList *merge_list, MergeType merge_
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[RESTRUCTURE]);
printf(" gimp_image_merge_layers ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(merge_layer), 0, 0, drawable_width (GIMP_DRAWABLE(merge_layer)), drawable_height (GIMP_DRAWABLE(merge_layer)));
/*reinit_layer_idlerender (gimage, merge_layer);*/

View File

@ -1447,8 +1447,6 @@ paint_mode_menu_callback (GtkWidget *w,
{
layer->mode = mode;
/* reinit_layer_idlerender(gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
@ -1488,7 +1486,6 @@ opacity_scale_update (GtkAdjustment *adjustment,
{
layer->opacity = opacity;
/*reinit_layer_idlerender (gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
@ -2215,9 +2212,7 @@ layer_widget_button_events (GtkWidget *widget,
{
if (exclusive)
{
/*printf("Case 1, kick-ass!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
/*reinit_gimage_idlerender (layer_widget->gimage);*/
gdisplays_update_area (layer_widget->gimage, 0, 0,
layer_widget->gimage->width,
layer_widget->gimage->height);
@ -2226,10 +2221,7 @@ layer_widget_button_events (GtkWidget *widget,
else if (old_state != GIMP_DRAWABLE(layer_widget->layer)->visible)
{
/* Invalidate the gimage preview */
/*printf("Case 2, what incredible irony!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
/*reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);*/
drawable_update (GIMP_DRAWABLE(layer_widget->layer), 0, 0,
GIMP_DRAWABLE(layer_widget->layer)->width,
GIMP_DRAWABLE(layer_widget->layer)->height);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -85,7 +85,7 @@ image_map_do (gpointer data)
if (_image_map->gdisp)
{
drawable_update ( (_image_map->drawable), x, y, w, h);
gdisplay_flush (_image_map->gdisp);
gdisplay_flush_now (_image_map->gdisp);
}
_image_map->pr = pixel_regions_process (_image_map->pr);

View File

@ -679,6 +679,7 @@ create_display_shell (GDisplay* gdisp,
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
/* pack all the widgets */
gtk_table_attach (GTK_TABLE (table), table_inner, 0, 1, 0, 1,
GTK_FILL | GTK_EXPAND | GTK_SHRINK,
@ -764,6 +765,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);
#warning DODGY?
gtk_widget_realize (gdisp->canvas);
gdk_window_set_back_pixmap(gdisp->canvas->window, NULL, 0);
/* set the focus to the canvas area */
gtk_widget_grab_focus (gdisp->canvas);
}

View File

@ -1447,8 +1447,6 @@ paint_mode_menu_callback (GtkWidget *w,
{
layer->mode = mode;
/* reinit_layer_idlerender(gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
@ -1488,7 +1486,6 @@ opacity_scale_update (GtkAdjustment *adjustment,
{
layer->opacity = opacity;
/*reinit_layer_idlerender (gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
@ -2215,9 +2212,7 @@ layer_widget_button_events (GtkWidget *widget,
{
if (exclusive)
{
/*printf("Case 1, kick-ass!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
/*reinit_gimage_idlerender (layer_widget->gimage);*/
gdisplays_update_area (layer_widget->gimage, 0, 0,
layer_widget->gimage->width,
layer_widget->gimage->height);
@ -2226,10 +2221,7 @@ layer_widget_button_events (GtkWidget *widget,
else if (old_state != GIMP_DRAWABLE(layer_widget->layer)->visible)
{
/* Invalidate the gimage preview */
/*printf("Case 2, what incredible irony!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
/*reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);*/
drawable_update (GIMP_DRAWABLE(layer_widget->layer), 0, 0,
GIMP_DRAWABLE(layer_widget->layer)->width,
GIMP_DRAWABLE(layer_widget->layer)->height);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -3026,8 +3026,6 @@ plug_in_disconnect_cancel (PlugIn *plug_in)
{
GDisplay *gdisp = NULL;
/*printf("\nplug_in_disconnect_cancel\n");fflush(stdout);*/
gdisp = gdisplay_get_ID (plug_in->progress_gdisp_ID);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
@ -3065,7 +3063,6 @@ plug_in_progress_init (PlugIn *plug_in,
context_id, message);
plug_in->progress_gdisp_ID = gdisp_ID;
/*printf("\nHERE\n");fflush(stdout);*/
gtk_signal_connect (GTK_OBJECT (gdisp->cancelbutton), "clicked",
(GtkSignalFunc) plug_in_progress_cancel,
plug_in);

View File

@ -1133,9 +1133,9 @@ undo_pop_layer (GImage *gimage,
floating_sel_reset (lu->layer);
}
/*printf (" undo_pop1 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0,
GIMP_DRAWABLE(lu->layer)->width,
GIMP_DRAWABLE(lu->layer)->height);
}
/* restore layer */
else
@ -1152,13 +1152,14 @@ undo_pop_layer (GImage *gimage,
gimage->floating_sel = lu->layer;
/* add the new layer */
gimage->layers = g_slist_insert (gimage->layers, lu->layer, lu->prev_position);
gimage->layers = g_slist_insert (gimage->layers, lu->layer,
lu->prev_position);
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
/*printf (" undo_pop2 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0,
GIMP_DRAWABLE(lu->layer)->width,
GIMP_DRAWABLE(lu->layer)->height);
}
return TRUE;

View File

@ -1990,8 +1990,6 @@ xcf_load_level (XcfInfo *info,
info->cp += xcf_read_int32 (info->fp, &offset, 1);
}
/* fflush(stdout);*/
if (offset != 0)
{
g_message ("encountered garbage after reading level: %d", offset);

View File

@ -1990,8 +1990,6 @@ xcf_load_level (XcfInfo *info,
info->cp += xcf_read_int32 (info->fp, &offset, 1);
}
/* fflush(stdout);*/
if (offset != 0)
{
g_message ("encountered garbage after reading level: %d", offset);