Commit 7dcd8e85 authored by EST 1998 Matthew Wilson's avatar EST 1998 Matthew Wilson Committed by Matt Wilson

app/gimage.c app/tools.c Added a field in the Tools struct, preserve.

Tue Mar 31 02:21:15 EST 1998 Matthew Wilson <msw@gimp.org>

	* app/gimage.c
	* app/tools.c
	* app/tools.h: Added a field in the Tools struct, preserve.
	During gimage_dirty, if this flag is not set the tool will be
	reset.  This is good for tools that keep a copy of the image
	in cache for local manipulation like transform_core.

	* app/bezier_select.c
	* app/blend.c
	* app/brightness_contrast.c
	* app/bucket_fill.c
	* app/color_balance.c
	* app/color_picker.c
	* app/crop.c
	* app/curves.c
	* app/ellipse_select.c
	* app/free_select.c
	* app/histogram_tool.c
	* app/hue_saturation.c
	* app/levels.c
	* app/move.c
	* app/paint_core.c
	* app/posterize.c
	* app/rect_select.c
	* app/text_tool.c
	* app/transform_core.c: Set the preserve flag to the correct
	values in the new functions and wrapped calls to functions that
	dirty the gimage to prevent tool restarts.

	* app/disp_callbacks.c
	* app/menus.c: Removed Nether's tool patch.

--phew.  Matt
parent bd6b3ae4
Tue Mar 31 02:21:15 EST 1998 Matthew Wilson <msw@gimp.org>
* app/gimage.c
* app/tools.c
* app/tools.h: Added a field in the Tools struct, preserve.
During gimage_dirty, if this flag is not set the tool will be
reset. This is good for tools that keep a copy of the image
in cache for local manipulation like transform_core.
* app/bezier_select.c
* app/blend.c
* app/brightness_contrast.c
* app/bucket_fill.c
* app/color_balance.c
* app/color_picker.c
* app/crop.c
* app/curves.c
* app/ellipse_select.c
* app/free_select.c
* app/histogram_tool.c
* app/hue_saturation.c
* app/levels.c
* app/move.c
* app/paint_core.c
* app/posterize.c
* app/rect_select.c
* app/text_tool.c
* app/transform_core.c: Set the preserve flag to the correct
values in the new functions and wrapped calls to functions that
dirty the gimage to prevent tool restarts.
* app/disp_callbacks.c
* app/menus.c: Removed Nether's tool patch.
Mon Mar 30 21:58:34 PST 1998 Manish Singh <yosh@gimp.org>
* app/brush_select.c
......
......@@ -251,7 +251,9 @@ color_balance_control (Tool *tool,
case HALT :
if (color_balance_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (color_balance_dialog->image_map);
active_tool->preserve = FALSE;
color_balance_dialog->image_map = NULL;
color_balance_cancel_callback (NULL, (gpointer) color_balance_dialog);
}
......@@ -283,6 +285,7 @@ tools_new_color_balance ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = color_balance_cursor_update;
tool->control_func = color_balance_control;
tool->preserve = FALSE;
return tool;
}
......@@ -613,7 +616,9 @@ color_balance_preview (ColorBalanceDialog *cbd)
{
if (!cbd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE;
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
active_tool->preserve = FALSE;
}
static void
......@@ -626,6 +631,8 @@ color_balance_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (cbd->shell))
gtk_widget_hide (cbd->shell);
active_tool->preserve = TRUE;
if (!cbd->preview)
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
......@@ -633,6 +640,8 @@ color_balance_ok_callback (GtkWidget *widget,
if (cbd->image_map)
image_map_commit (cbd->image_map);
active_tool->preserve = FALSE;
cbd->image_map = NULL;
}
......@@ -658,7 +667,9 @@ color_balance_cancel_callback (GtkWidget *widget,
if (cbd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (cbd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......
......@@ -252,7 +252,9 @@ curves_control (Tool *tool,
case HALT :
if (curves_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (curves_dialog->image_map);
active_tool->preserve = FALSE;
curves_dialog->image_map = NULL;
curves_cancel_callback (NULL, (gpointer) curves_dialog);
}
......@@ -284,6 +286,7 @@ tools_new_curves ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = curves_cursor_update;
tool->control_func = curves_control;
tool->preserve = TRUE;
return tool;
}
......@@ -400,7 +403,9 @@ curves_free ()
{
if (curves_dialog->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (curves_dialog->image_map);
active_tool->preserve = FALSE;
curves_dialog->image_map = NULL;
}
if (curves_dialog->pixmap)
......@@ -804,7 +809,12 @@ curves_preview (CurvesDialog *cd)
{
if (!cd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE; /* Going to dirty the display... */
image_map_apply (cd->image_map, curves, (void *) cd);
active_tool->preserve = FALSE; /* All done */
}
static void
......@@ -966,12 +976,16 @@ curves_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (cd->shell))
gtk_widget_hide (cd->shell);
active_tool->preserve = TRUE; /* We're about to dirty... */
if (!cd->preview)
image_map_apply (cd->image_map, curves, (void *) cd);
if (cd->image_map)
image_map_commit (cd->image_map);
active_tool->preserve = FALSE;
cd->image_map = NULL;
}
......@@ -987,7 +1001,9 @@ curves_cancel_callback (GtkWidget *widget,
if (cd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (cd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......@@ -1010,7 +1026,7 @@ curves_preview_update (GtkWidget *w,
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (GTK_TOGGLE_BUTTON (w)->active)
{
cd->preview = TRUE;
......
......@@ -295,7 +295,9 @@ hue_saturation_control (Tool *tool,
case HALT :
if (hue_saturation_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (hue_saturation_dialog->image_map);
active_tool->preserve = FALSE;
hue_saturation_dialog->image_map = NULL;
hue_saturation_cancel_callback (NULL, (gpointer) hue_saturation_dialog);
}
......@@ -327,6 +329,7 @@ tools_new_hue_saturation ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = hue_saturation_cursor_update;
tool->control_func = hue_saturation_control;
tool->preserve = FALSE;
return tool;
}
......@@ -385,7 +388,9 @@ hue_saturation_free ()
{
if (hue_saturation_dialog->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (hue_saturation_dialog->image_map);
active_tool->preserve = FALSE;
hue_saturation_dialog->image_map = NULL;
}
gtk_widget_destroy (hue_saturation_dialog->shell);
......@@ -724,7 +729,9 @@ hue_saturation_preview (HueSaturationDialog *hsd)
{
if (!hsd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE;
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
active_tool->preserve = FALSE;
}
static void
......@@ -738,12 +745,16 @@ hue_saturation_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (hsd->shell))
gtk_widget_hide (hsd->shell);
active_tool->preserve = TRUE;
if (!hsd->preview)
image_map_apply (hsd->image_map, hue_saturation, (void *) hsd);
if (hsd->image_map)
image_map_commit (hsd->image_map);
active_tool->preserve = FALSE;
hsd->image_map = NULL;
}
......@@ -769,7 +780,9 @@ hue_saturation_cancel_callback (GtkWidget *widget,
if (hsd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (hsd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......
......@@ -139,6 +139,7 @@ tools_new_bezier_select ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = rect_select_cursor_update;
tool->control_func = bezier_select_control;
tool->preserve = TRUE;
return tool;
}
......@@ -246,9 +247,10 @@ bezier_select_button_press (Tool *tool,
grab_pointer = 0;
/* If the tool was being used in another image...reset it */
if (tool->state == ACTIVE && gdisp_ptr != tool->gdisp_ptr)
if (tool->state == ACTIVE && gdisp_ptr != tool->gdisp_ptr) {
printf("Reset!\n");
bezier_select_reset (bezier_sel);
}
gdisplay_untransform_coords (gdisp, bevent->x, bevent->y, &x, &y, TRUE, 0);
/* get halfwidth in image coord */
......
......@@ -1657,6 +1657,7 @@ tools_new_blend ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = blend_cursor_update;
tool->control_func = blend_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -217,7 +217,9 @@ brightness_contrast_control (Tool *tool,
case HALT :
if (brightness_contrast_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (brightness_contrast_dialog->image_map);
active_tool->preserve = TRUE;
brightness_contrast_dialog->image_map = NULL;
brightness_contrast_cancel_callback (NULL, (gpointer) brightness_contrast_dialog);
}
......@@ -250,6 +252,7 @@ tools_new_brightness_contrast ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = brightness_contrast_cursor_update;
tool->control_func = brightness_contrast_control;
tool->preserve = FALSE;
return tool;
}
......@@ -475,7 +478,9 @@ brightness_contrast_preview (BrightnessContrastDialog *bcd)
{
if (!bcd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE;
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
active_tool->preserve = FALSE;
}
static void
......@@ -489,12 +494,16 @@ brightness_contrast_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (bcd->shell))
gtk_widget_hide (bcd->shell);
active_tool->preserve = TRUE;
if (!bcd->preview)
image_map_apply (bcd->image_map, brightness_contrast, (void *) bcd);
if (bcd->image_map)
image_map_commit (bcd->image_map);
active_tool->preserve = FALSE;
bcd->image_map = NULL;
}
......@@ -520,7 +529,9 @@ brightness_contrast_cancel_callback (GtkWidget *widget,
if (bcd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (bcd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......
......@@ -673,6 +673,7 @@ tools_new_bucket_fill ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = bucket_fill_cursor_update;
tool->control_func = bucket_fill_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -251,7 +251,9 @@ color_balance_control (Tool *tool,
case HALT :
if (color_balance_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (color_balance_dialog->image_map);
active_tool->preserve = FALSE;
color_balance_dialog->image_map = NULL;
color_balance_cancel_callback (NULL, (gpointer) color_balance_dialog);
}
......@@ -283,6 +285,7 @@ tools_new_color_balance ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = color_balance_cursor_update;
tool->control_func = color_balance_control;
tool->preserve = FALSE;
return tool;
}
......@@ -613,7 +616,9 @@ color_balance_preview (ColorBalanceDialog *cbd)
{
if (!cbd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE;
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
active_tool->preserve = FALSE;
}
static void
......@@ -626,6 +631,8 @@ color_balance_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (cbd->shell))
gtk_widget_hide (cbd->shell);
active_tool->preserve = TRUE;
if (!cbd->preview)
image_map_apply (cbd->image_map, color_balance, (void *) cbd);
......@@ -633,6 +640,8 @@ color_balance_ok_callback (GtkWidget *widget,
if (cbd->image_map)
image_map_commit (cbd->image_map);
active_tool->preserve = FALSE;
cbd->image_map = NULL;
}
......@@ -658,7 +667,9 @@ color_balance_cancel_callback (GtkWidget *widget,
if (cbd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (cbd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......
......@@ -456,6 +456,7 @@ tools_new_color_picker ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = color_picker_cursor_update;
tool->control_func = color_picker_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -1657,6 +1657,7 @@ tools_new_blend ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = blend_cursor_update;
tool->control_func = blend_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -524,6 +524,7 @@ tools_new_crop ()
tool->arrow_keys_func = crop_arrow_keys_func;
tool->cursor_update_func = crop_cursor_update;
tool->control_func = crop_control;
tool->preserve = TRUE; /* XXX Check me */
return tool;
}
......
......@@ -252,7 +252,9 @@ curves_control (Tool *tool,
case HALT :
if (curves_dialog)
{
active_tool->preserve = TRUE;
image_map_abort (curves_dialog->image_map);
active_tool->preserve = FALSE;
curves_dialog->image_map = NULL;
curves_cancel_callback (NULL, (gpointer) curves_dialog);
}
......@@ -284,6 +286,7 @@ tools_new_curves ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = curves_cursor_update;
tool->control_func = curves_control;
tool->preserve = TRUE;
return tool;
}
......@@ -400,7 +403,9 @@ curves_free ()
{
if (curves_dialog->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (curves_dialog->image_map);
active_tool->preserve = FALSE;
curves_dialog->image_map = NULL;
}
if (curves_dialog->pixmap)
......@@ -804,7 +809,12 @@ curves_preview (CurvesDialog *cd)
{
if (!cd->image_map)
g_warning ("No image map");
active_tool->preserve = TRUE; /* Going to dirty the display... */
image_map_apply (cd->image_map, curves, (void *) cd);
active_tool->preserve = FALSE; /* All done */
}
static void
......@@ -966,12 +976,16 @@ curves_ok_callback (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (cd->shell))
gtk_widget_hide (cd->shell);
active_tool->preserve = TRUE; /* We're about to dirty... */
if (!cd->preview)
image_map_apply (cd->image_map, curves, (void *) cd);
if (cd->image_map)
image_map_commit (cd->image_map);
active_tool->preserve = FALSE;
cd->image_map = NULL;
}
......@@ -987,7 +1001,9 @@ curves_cancel_callback (GtkWidget *widget,
if (cd->image_map)
{
active_tool->preserve = TRUE;
image_map_abort (cd->image_map);
active_tool->preserve = FALSE;
gdisplays_flush ();
}
......@@ -1010,7 +1026,7 @@ curves_preview_update (GtkWidget *w,
CurvesDialog *cd;
cd = (CurvesDialog *) data;
if (GTK_TOGGLE_BUTTON (w)->active)
{
cd->preview = TRUE;
......
......@@ -138,8 +138,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case 1:
gtk_grab_add (canvas);
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)))
{
......@@ -149,12 +147,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
if (gimage_get_active_layer (gdisp->gimage) != active_tool_layer)
{
active_tool_control (RECREATE, gdisp);
active_tool_layer = gimage_get_active_layer (gdisp->gimage);
}
(* active_tool->button_press_func) (active_tool, bevent, gdisp);
}
break;
......@@ -344,9 +336,6 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......@@ -366,9 +355,6 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......
......@@ -138,8 +138,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case 1:
gtk_grab_add (canvas);
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)))
{
......@@ -149,12 +147,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
if (gimage_get_active_layer (gdisp->gimage) != active_tool_layer)
{
active_tool_control (RECREATE, gdisp);
active_tool_layer = gimage_get_active_layer (gdisp->gimage);
}
(* active_tool->button_press_func) (active_tool, bevent, gdisp);
}
break;
......@@ -344,9 +336,6 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......@@ -366,9 +355,6 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......
......@@ -138,8 +138,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
{
case 1:
gtk_grab_add (canvas);
if (!active_tool)
active_tool_control (RECREATE, gdisp);
if (active_tool && ((active_tool->type == MOVE) ||
!gimage_is_empty (gdisp->gimage)))
{
......@@ -149,12 +147,6 @@ gdisplay_canvas_events (GtkWidget *canvas,
bevent->x = tx;
bevent->y = ty;
}
if (gimage_get_active_layer (gdisp->gimage) != active_tool_layer)
{
active_tool_control (RECREATE, gdisp);
active_tool_layer = gimage_get_active_layer (gdisp->gimage);
}
(* active_tool->button_press_func) (active_tool, bevent, gdisp);
}
break;
......@@ -344,9 +336,6 @@ gdisplay_hruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_hguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......@@ -366,9 +355,6 @@ gdisplay_vruler_button_press (GtkWidget *widget,
{
gdisp = data;
if (!active_tool)
active_tool_control (RECREATE, gdisp);
gtk_widget_activate (tool_widgets[tool_info[(int) MOVE].toolbar_position]);
move_tool_start_vguide (active_tool, gdisp);
gtk_grab_add (gdisp->canvas);
......
......@@ -129,6 +129,7 @@ tools_new_ellipse_select ()
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = rect_select_cursor_update;
tool->control_func = rect_select_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -468,6 +468,7 @@ tools_new_free_select (void)
tool->arrow_keys_func = standard_arrow_keys_func;
tool->cursor_update_func = rect_select_cursor_update;
tool->control_func = free_select_control;
tool->preserve = TRUE;
return tool;
}
......
......@@ -35,6 +35,7 @@
#include "paint_funcs.h"
#include "palette.h"
#include "plug_in.h"
#include "tools.h"
#include "undo.h"
#include "tile_manager_pvt.h" /* ick. */
......@@ -2623,10 +2624,18 @@ gimage_disable_undo (GImage *gimage)
int
gimage_dirty (GImage *gimage)
{
GDisplay *gdisp;
if (gimage->dirty < 0)
gimage->dirty = 2;
else
gimage->dirty ++;
if (active_tool) {
gdisp = active_tool->gdisp_ptr;
if (gdisp)
if ((gdisp->gimage == gimage) && (!active_tool->preserve))
tools_select (active_tool->type);
}
return gimage->dirty;
}
......
......@@ -43,8 +43,6 @@ static gint menus_install_accel (GtkWidget *widget,
static void menus_remove_accel (GtkWidget *widget,
gchar *signal_name,
gchar *path);
static void menus_activate_callback (GtkWidget *widget,
GtkMenuEntry *entry);
static GtkMenuEntry menu_items[] =
{
......@@ -299,9 +297,6 @@ menus_create (GtkMenuEntry *entries,
gtk_signal_connect (GTK_OBJECT (entries[i].widget), "remove_accelerator",
(GtkSignalFunc) menus_remove_accel,
entries[i].path);
gtk_signal_connect (GTK_OBJECT (entries[i].widget), "activate",
(GtkSignalFunc) menus_activate_callback,
&entries[i]);
}
}
......@@ -491,72 +486,3 @@ menus_remove_accel (GtkWidget *widget,
}
}
static void
menus_activate_callback (GtkWidget *widget,
GtkMenuEntry *entry)
{
/* These are the functions upon which we won't destroy the
tool... "safe", so to say. All the others are expected to alter
the image, so the tool must be destroyed */
const GtkMenuCallback ignore[]={
image_posterize_cmd_callback,
image_threshold_cmd_callback,
image_color_balance_cmd_callback,
image_brightness_contrast_cmd_callback,
image_hue_saturation_cmd_callback,
image_curves_cmd_callback,
image_levels_cmd_callback,
image_histogram_cmd_callback,
tools_select_cmd_callback,
about_dialog_cmd_callback,
tips_dialog_cmd_callback,
file_new_cmd_callback,
file_open_cmd_callback,
file_save_cmd_callback,
file_save_as_cmd_callback,
file_pref_cmd_callback,
file_close_cmd_callback,
file_quit_cmd_callback,
view_zoomin_cmd_callback,
view_zoomout_cmd_callback,
view_zoom_16_1_callback,
view_zoom_8_1_callback,
view_zoom_4_1_callback,
view_zoom_2_1_callback,
view_zoom_1_1_callback,
view_zoom_1_2_callback,
view_zoom_1_4_callback,
view_zoom_1_8_callback,
view_zoom_1_16_callback,
view_window_info_cmd_callback,
view_toggle_rulers_cmd_callback,
view_toggle_guides_cmd_callback,
view_snap_to_guides_cmd_callback,
channel_ops_duplicate_cmd_callback,
dialogs_lc_cmd_callback,
dialogs_brushes_cmd_callback,
dialogs_patterns_cmd_callback,
dialogs_palette_cmd_callback,
dialogs_gradient_editor_cmd_callback,
dialogs_lc_cmd_callback,
dialogs_indexed_palette_cmd_callback,
dialogs_tools_options_cmd_callback,
file_load_by_extension_callback,
file_save_by_extension_callback
};
int i;
if (active_tool){
for (i=0; i<sizeof(ignore)/sizeof(*ignore); i++)
if (entry->callback == ignore[i])
return;
if (active_tool->gdisp_ptr == NULL)
active_tool_control (RECREATE, active_tool->gdisp_ptr);
else {
GDisplay *gdisp;
gdisp = gdisplay_active ();
if (gdisp == NULL || ((GDisplay*)active_tool->gdisp_ptr)->gimage == gdisp->gimage)