Commit bec4c725 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

app/tools/tools-types.h chain up unconditionally in control(),

2002-02-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/tools-types.h
	* app/tools/*.[ch]: chain up unconditionally in control(),
	s/ToolAction/GimpToolAction/g, s/ToolState/GimpToolState/g.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpinktool.c
	* app/tools/gimppainttool.c: don't touch tool->paused_count
	(setting it to 0 was a hack which should no longer be needed).

	* app/tools/gimpdrawtool.c: check if the draw tool has actually
	been started (draw_tool->gdisp != NULL) before calling it's
	draw() function.

	* app/tools/tool_manager.c: simplified tool_manager_control_active():
	simply call gimp_tool_control() if gdisp == tool->gdisp.

	* app/tools/gimptool.[ch]: gimp_tool_control(): do all the PAUSE,
	RESUME and HALT voodoo here.

	* app/tools/gimppainttool.c: implemented #9902 (Drawing straight
	lines does not work between different views). It's an evil hack,
	but clearly marked in the source.
parent fe2c9e8b
2002-02-18 Michael Natterer <mitch@gimp.org>
* app/tools/tools-types.h
* app/tools/*.[ch]: chain up unconditionally in control(),
s/ToolAction/GimpToolAction/g, s/ToolState/GimpToolState/g.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpinktool.c
* app/tools/gimppainttool.c: don't touch tool->paused_count
(setting it to 0 was a hack which should no longer be needed).
* app/tools/gimpdrawtool.c: check if the draw tool has actually
been started (draw_tool->gdisp != NULL) before calling it's
draw() function.
* app/tools/tool_manager.c: simplified tool_manager_control_active():
simply call gimp_tool_control() if gdisp == tool->gdisp.
* app/tools/gimptool.[ch]: gimp_tool_control(): do all the PAUSE,
RESUME and HALT voodoo here.
* app/tools/gimppainttool.c: implemented #9902 (Drawing straight
lines does not work between different views). It's an evil hack,
but clearly marked in the source.
2002-02-18 Sven Neumann <sven@gimp.org>
* app/app_procs.c
......
......@@ -55,11 +55,11 @@
static void gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass);
static void gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool);
static void gimp_color_balance_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static ColorBalanceDialog * color_balance_dialog_new (void);
......@@ -198,9 +198,9 @@ gimp_color_balance_tool_initialize (GimpTool *tool,
}
static void
gimp_color_balance_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_color_balance_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -218,8 +218,7 @@ gimp_color_balance_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
......
......@@ -97,7 +97,7 @@ static void gimp_curves_tool_init (GimpCurvesTool *bc_tool);
static void gimp_curves_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_curves_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_curves_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -336,9 +336,9 @@ gimp_curves_tool_initialize (GimpTool *tool,
}
static void
gimp_curves_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_curves_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -356,8 +356,7 @@ gimp_curves_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
......
......@@ -68,11 +68,11 @@
static void gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass);
static void gimp_hue_saturation_tool_init (GimpHueSaturationTool *bc_tool);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static HueSaturationDialog * hue_saturation_dialog_new (void);
......@@ -224,9 +224,9 @@ gimp_hue_saturation_tool_initialize (GimpTool *tool,
}
static void
gimp_hue_saturation_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_hue_saturation_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -244,8 +244,7 @@ gimp_hue_saturation_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
......
......@@ -61,11 +61,11 @@
static void gimp_threshold_tool_class_init (GimpThresholdToolClass *klass);
static void gimp_threshold_tool_init (GimpThresholdTool *threshold_tool);
static void gimp_threshold_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_threshold_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_threshold_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_threshold_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static ThresholdDialog * threshold_dialog_new (void);
......@@ -214,9 +214,9 @@ gimp_threshold_tool_initialize (GimpTool *tool,
}
static void
gimp_threshold_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_threshold_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -234,8 +234,7 @@ gimp_threshold_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
......
......@@ -123,7 +123,7 @@ static void gimp_ink_tool_init (GimpInkTool *tool);
static void gimp_ink_tool_finalize (GObject *object);
static void gimp_ink_tool_control (GimpTool *tool,
ToolAction tool_action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_ink_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -342,9 +342,9 @@ gimp_ink_tool_finalize (GObject *object)
}
static void
gimp_ink_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_ink_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
GimpInkTool *ink_tool;
......@@ -365,6 +365,8 @@ gimp_ink_tool_control (GimpTool *tool,
default:
break;
}
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
......@@ -387,9 +389,8 @@ gimp_ink_tool_button_press (GimpTool *tool,
ink_init (ink_tool, drawable, coords->x, coords->y);
tool->state = ACTIVE;
tool->gdisp = gdisp;
tool->paused_count = 0;
tool->state = ACTIVE;
tool->gdisp = gdisp;
/* pause the current selection */
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_PAUSE);
......
......@@ -135,7 +135,7 @@ static void gimp_bezier_select_tool_motion (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp);
static void gimp_bezier_select_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_bezier_select_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
......@@ -1915,9 +1915,9 @@ gimp_bezier_select_tool_cursor_update (GimpTool *tool,
}
static void
gimp_bezier_select_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_bezier_select_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
GimpBezierSelectTool * bezier_sel;
......@@ -1925,15 +1925,15 @@ gimp_bezier_select_tool_control (GimpTool *tool,
switch (action)
{
case PAUSE :
case PAUSE:
gimp_draw_tool_pause ((GimpDrawTool *) bezier_sel);
break;
case RESUME :
case RESUME:
gimp_draw_tool_resume ((GimpDrawTool *) bezier_sel);
break;
case HALT :
case HALT:
gimp_draw_tool_stop ((GimpDrawTool *) bezier_sel);
bezier_select_reset (bezier_sel);
break;
......@@ -2814,10 +2814,9 @@ bezier_paste_bezierselect_to_current (GimpDisplay *gdisp,
tool = tool_manager_get_active (gdisp->gimage->gimp);
tool->state = ACTIVE;
tool->gdisp = gdisp;
tool->drawable = gimp_image_active_drawable (gdisp->gimage);
tool->paused_count = 0;
tool->state = ACTIVE;
tool->gdisp = gdisp;
tool->drawable = gimp_image_active_drawable (gdisp->gimage);
bezier_select_reset (curSel);
......
......@@ -79,11 +79,11 @@ struct _BrightnessContrastDialog
static void gimp_brightness_contrast_tool_class_init (GimpBrightnessContrastToolClass *klass);
static void gimp_brightness_contrast_tool_init (GimpBrightnessContrastTool *bc_tool);
static void gimp_brightness_contrast_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_brightness_contrast_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_brightness_contrast_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_brightness_contrast_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static BrightnessContrastDialog * brightness_contrast_dialog_new (void);
......@@ -209,9 +209,9 @@ gimp_brightness_contrast_tool_initialize (GimpTool *tool,
}
static void
gimp_brightness_contrast_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_brightness_contrast_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -229,8 +229,7 @@ gimp_brightness_contrast_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
/********************************/
......
......@@ -62,8 +62,8 @@ static void gimp_paint_tool_init (GimpPaintTool *paint_tool);
static void gimp_paint_tool_finalize (GObject *object);
static void gimp_paint_tool_control (GimpTool *tool,
ToolAction action,
static void gimp_paint_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_paint_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -178,9 +178,9 @@ gimp_paint_tool_finalize (GObject *object)
}
static void
gimp_paint_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_paint_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
GimpPaintTool *paint_tool;
GimpDrawable *drawable;
......@@ -202,6 +202,31 @@ gimp_paint_tool_control (GimpTool *tool,
(PaintOptions *) tool->tool_info->tool_options,
FINISH_PAINT);
gimp_paint_core_cleanup (paint_tool->core);
#if 0
/* evil hack i'm thinking about... --mitch */
{
/* HALT means the current display is going to go away (TM),
* so try to find another display of the same image to make
* straight line drawing continue to work...
*/
GSList *list;
for (list = display_list; list; list = g_slist_next (list))
{
GimpDisplay *tmp_disp;
tmp_disp = (GimpDisplay *) list->data;
if (tmp_disp != gdisp && tmp_disp->gimage == gdisp->gimage)
{
tool->gdisp = tmp_disp;
break;
}
}
}
#endif
break;
default:
......@@ -223,9 +248,9 @@ gimp_paint_tool_button_press (GimpTool *tool,
GimpPaintCore *core;
PaintOptions *paint_options;
GimpBrush *current_brush;
gboolean draw_line;
GimpDrawable *drawable;
GimpCoords curr_coords;
gboolean draw_line = FALSE;
draw_tool = GIMP_DRAW_TOOL (tool);
paint_tool = GIMP_PAINT_TOOL (tool);
......@@ -250,11 +275,22 @@ gimp_paint_tool_button_press (GimpTool *tool,
if (draw_tool->gdisp)
gimp_draw_tool_stop (draw_tool);
if (tool->gdisp &&
tool->gdisp != gdisp &&
tool->gdisp->gimage == gdisp->gimage)
{
/* if this is a different display, but the same image, HACK around
* in tool internals AFTER stopping the current draw_tool, so
* straight line drawing works across different views of the
* same image.
*/
tool->gdisp = gdisp;
}
if (! gimp_paint_core_start (core, drawable, &curr_coords))
return;
draw_line = FALSE;
if ((gdisp != tool->gdisp) || ! (state & GDK_SHIFT_MASK))
{
/* if this is a new image, reinit the core vals */
......@@ -280,9 +316,8 @@ gimp_paint_tool_button_press (GimpTool *tool,
}
}
tool->state = ACTIVE;
tool->gdisp = gdisp;
tool->paused_count = 0;
tool->state = ACTIVE;
tool->gdisp = gdisp;
/* pause the current selection */
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_PAUSE);
......@@ -460,6 +495,19 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar),
g_type_name (G_TYPE_FROM_INSTANCE (tool)));
if (tool->gdisp &&
tool->gdisp != gdisp &&
tool->gdisp->gimage == gdisp->gimage)
{
/* if this is a different display, but the same image, HACK around
* in tool internals AFTER stopping the current draw_tool, so
* straight line drawing works across different views of the
* same image.
*/
tool->gdisp = gdisp;
}
if ((layer = gimp_image_get_active_layer (gdisp->gimage)))
{
if (gdisp == tool->gdisp && (state & GDK_SHIFT_MASK))
......
......@@ -97,7 +97,7 @@ static void by_color_select_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void by_color_select_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void by_color_select_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -246,9 +246,9 @@ gimp_by_color_select_tool_init (GimpByColorSelectTool *by_color_select)
}
static void
by_color_select_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
by_color_select_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -266,6 +266,8 @@ by_color_select_control (GimpTool *tool,
default:
break;
}
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
void
......
......@@ -55,11 +55,11 @@
static void gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass);
static void gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool);
static void gimp_color_balance_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_color_balance_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);
static ColorBalanceDialog * color_balance_dialog_new (void);
......@@ -198,9 +198,9 @@ gimp_color_balance_tool_initialize (GimpTool *tool,
}
static void
gimp_color_balance_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_color_balance_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -218,8 +218,7 @@ gimp_color_balance_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
......
......@@ -87,7 +87,7 @@ static void gimp_color_picker_tool_init (GimpColorPickerTool *co
static void gimp_color_picker_tool_finalize (GObject *object);
static void gimp_color_picker_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_color_picker_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -242,9 +242,9 @@ gimp_color_picker_tool_finalize (GObject *object)
}
static void
gimp_color_picker_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_color_picker_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -262,8 +262,7 @@ gimp_color_picker_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
......
......@@ -90,7 +90,7 @@ static void gimp_crop_tool_init (GimpCropTool *crop_tool);
static void gimp_crop_tool_finalize (GObject *object);
static void gimp_crop_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_crop_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -267,9 +267,9 @@ gimp_crop_tool_finalize (GObject *object)
}
static void
gimp_crop_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_crop_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
GimpCropTool *crop_tool;
......
......@@ -97,7 +97,7 @@ static void gimp_curves_tool_init (GimpCurvesTool *bc_tool);
static void gimp_curves_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_curves_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_curves_tool_button_press (GimpTool *tool,
GimpCoords *coords,
......@@ -336,9 +336,9 @@ gimp_curves_tool_initialize (GimpTool *tool,
}
static void
gimp_curves_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_curves_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -356,8 +356,7 @@ gimp_curves_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
......
......@@ -36,9 +36,11 @@ static void gimp_draw_tool_init (GimpDrawTool *draw_tool);
static void gimp_draw_tool_finalize (GObject *object);
static void gimp_draw_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_draw_tool_draw (GimpDrawTool *draw_tool);
static inline void gimp_draw_tool_shift_to_north_west
(gdouble x,
gdouble y,
......@@ -139,9 +141,9 @@ gimp_draw_tool_finalize (GObject *object)
}
static void
gimp_draw_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_draw_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
GimpDrawTool *draw_tool;
......@@ -168,6 +170,15 @@ gimp_draw_tool_control (GimpTool *tool,
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
static void
gimp_draw_tool_draw (GimpDrawTool *draw_tool)
{
if (draw_tool->gdisp)
{
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
}
}
void
gimp_draw_tool_start (GimpDrawTool *draw_tool,
GimpDisplay *gdisp)
......@@ -197,7 +208,7 @@ gimp_draw_tool_start (GimpDrawTool *draw_tool,
draw_tool->cap_style,
draw_tool->join_style);
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
gimp_draw_tool_draw (draw_tool);
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_VISIBLE;
}
......@@ -209,7 +220,7 @@ gimp_draw_tool_stop (GimpDrawTool *draw_tool)
if (draw_tool->draw_state == GIMP_DRAW_TOOL_STATE_VISIBLE)
{
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
gimp_draw_tool_draw (draw_tool);
}
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_INVISIBLE;
......@@ -234,7 +245,7 @@ gimp_draw_tool_pause (GimpDrawTool *draw_tool)
{
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_INVISIBLE;
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
gimp_draw_tool_draw (draw_tool);
}
draw_tool->paused_count++;
......@@ -253,7 +264,7 @@ gimp_draw_tool_resume (GimpDrawTool *draw_tool)
{
draw_tool->draw_state = GIMP_DRAW_TOOL_STATE_VISIBLE;
GIMP_DRAW_TOOL_GET_CLASS (draw_tool)->draw (draw_tool);
gimp_draw_tool_draw (draw_tool);
}
}
else
......
......@@ -101,7 +101,7 @@ static void gimp_edit_selection_tool_class_init (GimpEditSelectionToolClass *
static void gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool);
static void gimp_edit_selection_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static void gimp_edit_selection_tool_button_release (GimpTool *tool,
GimpCoords *coords,
......@@ -730,9 +730,9 @@ gimp_edit_selection_tool_draw (GimpDrawTool *draw_tool)
}
static void
gimp_edit_selection_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_edit_selection_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......
......@@ -86,7 +86,7 @@ static void gimp_histogram_tool_init (GimpHistogramTool *bc_tool);
static void gimp_histogram_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_histogram_tool_control (GimpTool *tool,
ToolAction action,
GimpToolAction action,
GimpDisplay *gdisp);
static HistogramToolDialog * histogram_tool_dialog_new (void);
......@@ -224,9 +224,9 @@ gimp_histogram_tool_initialize (GimpTool *tool,
}
static void
gimp_histogram_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp)
gimp_histogram_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp)
{
switch (action)
{
......@@ -245,8 +245,7 @@ gimp_histogram_tool_control (GimpTool *tool,
break;
}
if (GIMP_TOOL_CLASS (parent_class)->control)
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
GIMP_TOOL_CLASS (parent_class)->control (tool, action, gdisp);
}
......
......@@ -68,11 +68,11 @@
static void gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass);
static void gimp_hue_saturation_tool_init (GimpHueSaturationTool *bc_tool);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_control (GimpTool *tool,
ToolAction action,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
static void gimp_hue_saturation_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *gdisp);