Commit aa7be287 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

Fix for #85201:

2002-06-16  Michael Natterer  <mitch@gimp.org>

	Fix for #85201:

	* app/tools/gimpfliptool.c: set the toggle_cursor correctly.

	* app/tools/gimptransformtool.c: if "use_grid" is FALSE, skip the
	cursor update stuff and chain up directly.

	Misc tool->control options fixes:

	* app/tools/gimppainttool.c: set "motion_mode" to
	GIMP_MOTION_MODE_EXACT.

	* app/tools/gimpairbrushtool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimpsmudgetool.c: don't touch "motion_mode" here.

	* app/tools/gimpimagemaptool.c
	* app/tools/gimptransformtool.c: set "scroll_lock" to TRUE and
	"preserve" to FALSE.

	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c: don't touch them here.

	* app/tools/gimphistogramtool.[ch]: derive it from GimpImageMapTool
	so it inherits it's control settings.

	* app/tools/gimpellipseselecttool.c: don't set "preserve" to TRUE.

	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmovetool.c: code formating paranoia.

	* app/tools/gimptoolcontrol.c: fixed indentation.
parent 6fe42e36
2002-06-16 Michael Natterer <mitch@gimp.org>
Fix for #85201:
* app/tools/gimpfliptool.c: set the toggle_cursor correctly.
* app/tools/gimptransformtool.c: if "use_grid" is FALSE, skip the
cursor update stuff and chain up directly.
Misc tool->control options fixes:
* app/tools/gimppainttool.c: set "motion_mode" to
GIMP_MOTION_MODE_EXACT.
* app/tools/gimpairbrushtool.c
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimppaintbrushtool.c
* app/tools/gimpsmudgetool.c: don't touch "motion_mode" here.
* app/tools/gimpimagemaptool.c
* app/tools/gimptransformtool.c: set "scroll_lock" to TRUE and
"preserve" to FALSE.
* app/tools/gimpcurvestool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpfliptool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c: don't touch them here.
* app/tools/gimphistogramtool.[ch]: derive it from GimpImageMapTool
so it inherits it's control settings.
* app/tools/gimpellipseselecttool.c: don't set "preserve" to TRUE.
* app/tools/gimpmagnifytool.c
* app/tools/gimpmovetool.c: code formating paranoia.
* app/tools/gimptoolcontrol.c: fixed indentation.
2002-06-16 Michael Natterer <mitch@gimp.org>
 
* app/tools/gimpblendtool.c: set the witdh of the gradient preview
......
......@@ -93,7 +93,7 @@ typedef gdouble CRMatrix[4][4];
/* local function prototypes */
static void gimp_curves_tool_class_init (GimpCurvesToolClass *klass);
static void gimp_curves_tool_init (GimpTool *tool);
static void gimp_curves_tool_init (GimpCurvesTool *tool);
static void gimp_curves_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -265,10 +265,8 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
}
static void
gimp_curves_tool_init (GimpTool *tool)
gimp_curves_tool_init (GimpCurvesTool *tool)
{
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -65,7 +65,7 @@
/* local function prototypes */
static void gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass);
static void gimp_hue_saturation_tool_init (GimpTool *tool);
static void gimp_hue_saturation_tool_init (GimpHueSaturationTool *tool);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -179,10 +179,8 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
}
static void
gimp_hue_saturation_tool_init (GimpTool *tool)
gimp_hue_saturation_tool_init (GimpHueSaturationTool *tool)
{
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -115,7 +115,6 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
tool = GIMP_TOOL (airbrush);
paint_tool = GIMP_PAINT_TOOL (airbrush);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_AIRBRUSH_TOOL_CURSOR);
paint_tool->pick_colors = TRUE;
......
......@@ -156,6 +156,8 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool)
tool = GIMP_TOOL (paint_tool);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
paint_tool->pick_colors = FALSE;
paint_tool->pick_state = FALSE;
}
......
......@@ -158,7 +158,6 @@ gimp_clone_tool_init (GimpCloneTool *clone)
tool = GIMP_TOOL (clone);
paint_tool = GIMP_PAINT_TOOL (clone);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_CLONE_TOOL_CURSOR);
clone_core = g_object_new (GIMP_TYPE_CLONE, NULL);
......
......@@ -144,10 +144,12 @@ gimp_convolve_tool_init (GimpConvolveTool *convolve)
tool = GIMP_TOOL (convolve);
paint_tool = GIMP_PAINT_TOOL (convolve);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_BLUR_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control, GIMP_BLUR_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control, GIMP_CURSOR_MODIFIER_MINUS);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_BLUR_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_BLUR_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control,
GIMP_CURSOR_MODIFIER_MINUS);
paint_tool->core = g_object_new (GIMP_TYPE_CONVOLVE, NULL);
......
......@@ -93,7 +93,7 @@ typedef gdouble CRMatrix[4][4];
/* local function prototypes */
static void gimp_curves_tool_class_init (GimpCurvesToolClass *klass);
static void gimp_curves_tool_init (GimpTool *tool);
static void gimp_curves_tool_init (GimpCurvesTool *tool);
static void gimp_curves_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -265,10 +265,8 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
}
static void
gimp_curves_tool_init (GimpTool *tool)
gimp_curves_tool_init (GimpCurvesTool *tool)
{
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -122,9 +122,10 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn)
tool = GIMP_TOOL (dodgeburn);
paint_tool = GIMP_PAINT_TOOL (dodgeburn);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_DODGE_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control, GIMP_BURN_TOOL_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_DODGE_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_BURN_TOOL_CURSOR);
paint_tool->core = g_object_new (GIMP_TYPE_DODGEBURN, NULL);
}
......
......@@ -123,14 +123,12 @@ gimp_ellipse_select_tool_class_init (GimpEllipseSelectToolClass *klass)
static void
gimp_ellipse_select_tool_init (GimpEllipseSelectTool *ellipse_select)
{
GimpTool *tool;
GimpSelectionTool *select_tool;
GimpTool *tool;
tool = GIMP_TOOL (ellipse_select);
select_tool = GIMP_SELECTION_TOOL (ellipse_select);
tool = GIMP_TOOL (ellipse_select);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_ELLIPSE_SELECT_TOOL_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_ELLIPSE_SELECT_TOOL_CURSOR);
}
static void
......
......@@ -120,10 +120,12 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
tool = GIMP_TOOL (eraser);
paint_tool = GIMP_PAINT_TOOL (eraser);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_ERASER_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control, GIMP_ERASER_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control, GIMP_CURSOR_MODIFIER_MINUS);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_ERASER_TOOL_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_ERASER_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control,
GIMP_CURSOR_MODIFIER_MINUS);
paint_tool->core = g_object_new (GIMP_TYPE_ERASER, NULL);
}
......
......@@ -156,13 +156,15 @@ gimp_flip_tool_init (GimpFlipTool *flip_tool)
tool = GIMP_TOOL (flip_tool);
transform_tool = GIMP_TRANSFORM_TOOL (flip_tool);
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_snap_to (tool->control, FALSE);
gimp_tool_control_set_preserve (tool->control, FALSE);
gimp_tool_control_set_cursor (tool->control, GDK_SB_H_DOUBLE_ARROW);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_FLIP_HORIZONTAL_TOOL_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control, GDK_SB_V_DOUBLE_ARROW);
gimp_tool_control_set_toggle_tool_cursor (tool->control, GIMP_FLIP_VERTICAL_TOOL_CURSOR);
gimp_tool_control_set_cursor (tool->control,
GDK_SB_H_DOUBLE_ARROW);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_FLIP_HORIZONTAL_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor (tool->control,
GDK_SB_V_DOUBLE_ARROW);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_FLIP_VERTICAL_TOOL_CURSOR);
transform_tool->use_grid = FALSE;
}
......@@ -239,7 +241,8 @@ gimp_flip_tool_cursor_update (GimpTool *tool,
gimp_tool_control_set_toggle_cursor (tool->control, GDK_SB_V_DOUBLE_ARROW);
}
gimp_tool_control_set_toggle (tool->control, (options->type == ORIENTATION_VERTICAL));
gimp_tool_control_set_toggle (tool->control,
(options->type == ORIENTATION_VERTICAL));
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
}
......
......@@ -82,7 +82,7 @@ struct _HistogramToolDialog
/* local function prototypes */
static void gimp_histogram_tool_class_init (GimpHistogramToolClass *klass);
static void gimp_histogram_tool_init (GimpHistogramTool *bc_tool);
static void gimp_histogram_tool_init (GimpHistogramTool *hist_tool);
static void gimp_histogram_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -155,7 +155,7 @@ gimp_histogram_tool_get_type (void)
(GInstanceInitFunc) gimp_histogram_tool_init,
};
tool_type = g_type_register_static (GIMP_TYPE_TOOL,
tool_type = g_type_register_static (GIMP_TYPE_IMAGE_MAP_TOOL,
"GimpHistogramTool",
&tool_info, 0);
}
......@@ -177,14 +177,8 @@ gimp_histogram_tool_class_init (GimpHistogramToolClass *klass)
}
static void
gimp_histogram_tool_init (GimpHistogramTool *bc_tool)
gimp_histogram_tool_init (GimpHistogramTool *hist_tool)
{
GimpTool *tool;
tool = GIMP_TOOL (bc_tool);
gimp_tool_control_set_scroll_lock (tool->control, TRUE); /* why? */
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -20,7 +20,7 @@
#define __GIMP_HISTOGRAM_TOOL_H__
#include "libgimptool/gimptool.h"
#include "gimpimagemaptool.h"
#define HISTOGRAM_WIDTH 256
......@@ -40,12 +40,12 @@ typedef struct _GimpHistogramToolClass GimpHistogramToolClass;
struct _GimpHistogramTool
{
GimpTool parent_instance;
GimpImageMapTool parent_instance;
};
struct _GimpHistogramToolClass
{
GimpToolClass parent_class;
GimpImageMapToolClass parent_class;
};
......
......@@ -65,7 +65,7 @@
/* local function prototypes */
static void gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass);
static void gimp_hue_saturation_tool_init (GimpTool *tool);
static void gimp_hue_saturation_tool_init (GimpHueSaturationTool *tool);
static void gimp_hue_saturation_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -179,10 +179,8 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
}
static void
gimp_hue_saturation_tool_init (GimpTool *tool)
gimp_hue_saturation_tool_init (GimpHueSaturationTool *tool)
{
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -77,5 +77,6 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
tool = GIMP_TOOL (image_map_tool);
/* child must create control. */
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
......@@ -129,7 +129,7 @@ struct _LevelsDialog
/* local function prototypes */
static void gimp_levels_tool_class_init (GimpLevelsToolClass *klass);
static void gimp_levels_tool_init (GimpTool *tool);
static void gimp_levels_tool_init (GimpLevelsTool *tool);
static void gimp_levels_tool_initialize (GimpTool *tool,
GimpDisplay *gdisp);
......@@ -258,10 +258,8 @@ gimp_levels_tool_class_init (GimpLevelsToolClass *klass)
}
static void
gimp_levels_tool_init (GimpTool *tool)
gimp_levels_tool_init (GimpLevelsTool *tool)
{
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_preserve (tool->control, FALSE);
}
static void
......
......@@ -191,13 +191,18 @@ gimp_magnify_tool_init (GimpMagnifyTool *magnify_tool)
gimp_tool_control_set_scroll_lock (tool->control, TRUE);
gimp_tool_control_set_snap_to (tool->control, FALSE);
gimp_tool_control_set_cursor (tool->control, GIMP_ZOOM_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_ZOOM_TOOL_CURSOR);
gimp_tool_control_set_cursor_modifier (tool->control, GIMP_CURSOR_MODIFIER_PLUS);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_ZOOM_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control, GIMP_ZOOM_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control, GIMP_CURSOR_MODIFIER_MINUS);
gimp_tool_control_set_cursor (tool->control,
GIMP_ZOOM_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_ZOOM_TOOL_CURSOR);
gimp_tool_control_set_cursor_modifier (tool->control,
GIMP_CURSOR_MODIFIER_PLUS);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_ZOOM_CURSOR);
gimp_tool_control_set_toggle_tool_cursor (tool->control,
GIMP_ZOOM_TOOL_CURSOR);
gimp_tool_control_set_toggle_cursor_modifier (tool->control,
GIMP_CURSOR_MODIFIER_MINUS);
}
static void
......
......@@ -187,8 +187,8 @@ gimp_move_tool_init (GimpMoveTool *move_tool)
gimp_tool_control_set_snap_to (tool->control, FALSE);
gimp_tool_control_set_handles_empty_image (tool->control, TRUE);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_MOVE_TOOL_CURSOR);
gimp_tool_control_set_tool_cursor (tool->control,
GIMP_MOVE_TOOL_CURSOR);
}
static void
......
......@@ -107,10 +107,8 @@ gimp_paintbrush_tool_init (GimpPaintbrushTool *paintbrush)
tool = GIMP_TOOL (paintbrush);
paint_tool = GIMP_PAINT_TOOL (paintbrush);
gimp_tool_control_set_motion_mode (tool->control, GIMP_MOTION_MODE_EXACT);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_PAINTBRUSH_TOOL_CURSOR);
paint_tool->pick_colors = TRUE;
paint_tool->core = g_object_new (GIMP_TYPE_PAINTBRUSH, NULL);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment