Commit bf0dbb20 authored by GMT 1999 Adam D. Moss's avatar GMT 1999 Adam D. Moss Committed by Adam D. Moss
Browse files

Most lengthy UI-blocking operations now put up an hourglass so the user

Sun Jan 10 23:31:45 GMT 1999 Adam D. Moss <adam@gimp.org>

	* app/blend.c app/bucket_fill.c app/convert.c app/crop.c
	app/cursorutil.c app/cursorutil.h app/fuzzy_select.c
	app/gdisplay.c app/gdisplay.h app/gimage_cmds.c
	app/gimpimage.c app/transform_core.c app/xcf.c:

	Most lengthy UI-blocking operations now put up an
	hourglass so the user can see that GIMP is working.
	Let me know if there are other vital cases.
parent 01d2a205
Sun Jan 10 23:31:45 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/blend.c app/bucket_fill.c app/convert.c app/crop.c
app/cursorutil.c app/cursorutil.h app/fuzzy_select.c
app/gdisplay.c app/gdisplay.h app/gimage_cmds.c
app/gimpimage.c app/transform_core.c app/xcf.c:
Most lengthy UI-blocking operations now put up an
hourglass so the user can see that GIMP is working.
Let me know if there are other vital cases.
Sun Jan 10 22:41:51 GMT 1999 Andy Thomas <alt@picnic.demon.co.uk>
New
......
......@@ -23,6 +23,7 @@
#include "blend.h"
#include "brush_select.h"
#include "buildmenu.h"
#include "cursorutil.h"
#include "draw_core.h"
#include "drawable.h"
#include "errors.h"
......@@ -788,6 +789,8 @@ blend (GImage *gimage,
int bytes;
int x1, y1, x2, y2;
gimp_add_busy_cursors();
has_selection = drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
has_alpha = drawable_has_alpha (drawable);
......@@ -819,6 +822,8 @@ blend (GImage *gimage,
/* free the temporary buffer */
tile_manager_destroy (buf_tiles);
gimp_remove_busy_cursors();
}
......
......@@ -19,6 +19,7 @@
#include "appenv.h"
#include "brush_select.h"
#include "bucket_fill.h"
#include "cursorutil.h"
#include "drawable.h"
#include "fuzzy_select.h"
#include "gdisplay.h"
......@@ -460,6 +461,8 @@ bucket_fill (gimage, drawable, fill_mode, paint_mode,
pat_buf = pattern->mask;
}
gimp_add_busy_cursors();
bytes = drawable_bytes (drawable);
has_alpha = drawable_has_alpha (drawable);
......@@ -533,6 +536,8 @@ bucket_fill (gimage, drawable, fill_mode, paint_mode,
if (new_buf)
temp_buf_free (pat_buf);
gimp_remove_busy_cursors();
}
......
......@@ -27,6 +27,8 @@
*/
/*
* 99/01/10 - Hourglass... [Adam]
*
* 98/07/25 - Convert-to-indexed now remembers the last invocation's
* settings. Also, GRAY->INDEXED more flexible. [Adam]
*
......@@ -70,6 +72,7 @@
#include "appenv.h"
#include "actionarea.h"
#include "convert.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "fsdither.h"
......@@ -734,6 +737,8 @@ convert_image (GImage *gimage,
new_layer_type = RGBA_GIMAGE;
new_layer_bytes = 4;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimage_floating_sel (gimage);
......@@ -913,6 +918,8 @@ convert_image (GImage *gimage,
gdisplays_update_full (gimage);
gimp_image_colormap_changed (gimage, -1);
gimp_remove_busy_cursors();
}
static void
......
......@@ -23,6 +23,7 @@
#include "blend.h"
#include "brush_select.h"
#include "buildmenu.h"
#include "cursorutil.h"
#include "draw_core.h"
#include "drawable.h"
#include "errors.h"
......@@ -788,6 +789,8 @@ blend (GImage *gimage,
int bytes;
int x1, y1, x2, y2;
gimp_add_busy_cursors();
has_selection = drawable_mask_bounds (drawable, &x1, &y1, &x2, &y2);
has_alpha = drawable_has_alpha (drawable);
......@@ -819,6 +822,8 @@ blend (GImage *gimage,
/* free the temporary buffer */
tile_manager_destroy (buf_tiles);
gimp_remove_busy_cursors();
}
......
......@@ -27,6 +27,8 @@
*/
/*
* 99/01/10 - Hourglass... [Adam]
*
* 98/07/25 - Convert-to-indexed now remembers the last invocation's
* settings. Also, GRAY->INDEXED more flexible. [Adam]
*
......@@ -70,6 +72,7 @@
#include "appenv.h"
#include "actionarea.h"
#include "convert.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "fsdither.h"
......@@ -734,6 +737,8 @@ convert_image (GImage *gimage,
new_layer_type = RGBA_GIMAGE;
new_layer_bytes = 4;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimage_floating_sel (gimage);
......@@ -913,6 +918,8 @@ convert_image (GImage *gimage,
gdisplays_update_full (gimage);
gimp_image_colormap_changed (gimage, -1);
gimp_remove_busy_cursors();
}
static void
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......
......@@ -18,6 +18,7 @@
#include <string.h>
#include "gimpimageP.h"
#include "cursorutil.h"
#include "drawable.h"
#include "floating_sel.h"
#include "gdisplay.h"
......@@ -347,6 +348,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
Layer *floating_layer;
GSList *list;
gimp_add_busy_cursors();
g_assert (new_width > 0 && new_height > 0);
/* Get the floating layer if one exists */
......@@ -395,6 +398,8 @@ gimp_image_resize (GimpImage *gimage, int new_width, int new_height,
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -408,6 +413,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
int old_width, old_height;
int layer_width, layer_height;
gimp_add_busy_cursors();
/* Get the floating layer if one exists */
floating_layer = gimp_image_floating_sel (gimage);
......@@ -459,6 +466,8 @@ gimp_image_scale (GimpImage *gimage, int new_width, int new_height)
floating_sel_rigor (floating_layer, TRUE);
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[RESIZE]);
gimp_remove_busy_cursors();
}
......@@ -1998,8 +2007,10 @@ gimp_image_merge_visible_layers (GimpImage *gimage, MergeType merge_type)
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......@@ -2018,6 +2029,8 @@ gimp_image_flatten (GimpImage *gimage)
GSList *merge_list = NULL;
Layer *layer;
gimp_add_busy_cursors();
layer_list = gimage->layers;
while (layer_list)
{
......@@ -2030,6 +2043,9 @@ gimp_image_flatten (GimpImage *gimage)
layer = gimp_image_merge_layers (gimage, merge_list, FlattenImage);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
......@@ -2069,8 +2085,10 @@ gimp_image_merge_down (GimpImage *gimage,
if (merge_list && merge_list->next)
{
gimp_add_busy_cursors();
layer = gimp_image_merge_layers (gimage, merge_list, merge_type);
g_slist_free (merge_list);
gimp_remove_busy_cursors();
return layer;
}
else
......