Commit 810b9831 authored by Nate Summers's avatar Nate Summers
Browse files

app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor


 	* app/tools/gimptoolcontrol.[ch]
 	* libgimptool/gimptool.c: resurrected the motion hints and cursor
 	changing code.

 	app/tools/gimpairbrushtool.c
	app/tools/gimpbezierselecttool.c
 	app/tools/gimpblendtool.c
 	app/tools/gimpbucketfilltool.c
 	app/tools/gimpbycolorselecttool.c
 	app/tools/gimpclonetool.c
 	app/tools/gimpcolorbalancetool.c
 	app/tools/gimpcolorpickertool.c
 	app/tools/gimpconvolvetool.c
 	app/tools/gimpcroptool.c
 	app/tools/gimpcurvestool.c
 	app/tools/gimpdodgeburntool.c
 	app/tools/gimpeditselectiontool.c
 	app/tools/gimpellipseselecttool.c
 	app/tools/gimperasertool.c
 	app/tools/gimpfliptool.c
 	app/tools/gimpfuzzyselecttool.c
 	app/tools/gimphistogramtool.c
 	app/tools/gimphuesaturationtool.c
 	app/tools/gimpimagemaptool.c
 	app/tools/gimpinktool.c
 	app/tools/gimpiscissorstool.c
 	app/tools/gimplevelstool.c
 	app/tools/gimpmagnifytool.c
 	app/tools/gimpmeasuretool.c
 	app/tools/gimpmovetool.c
 	app/tools/gimppaintbrushtool.c
 	app/tools/gimppainttool.c
 	app/tools/gimppathtool.c
 	app/tools/gimppenciltool.c
 	app/tools/gimpperspectivetool.c
 	app/tools/gimprectselecttool.c
 	app/tools/gimprotatetool.c
 	app/tools/gimpscaletool.c
 	app/tools/gimpselectiontool.c
 	app/tools/gimpsheartool.c
 	app/tools/gimpsmudgetool.c
 	app/tools/gimptexttool.c
 	app/tools/gimptransformtool.c
 	app/tools/gimpvectortool.c: set the motion mode; fix a few parameters

 	* app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented
 	some code I had temporarily commented out and didn't uncomment before
 	committing

 	* libgimptool/gimptoolcontrol.h
 	* app/tools/gimptoolcontrol-displayshell.[ch]: merged with
 	gimptoolcontrol.[ch].  The distinction was fairly arbitrary.

 	* plug-ins/tools/gimptoolcontrol.c: added some stubs

        * app/tools/Makefile.am
 	* app/tools/tool_manager.c
 	* app/display/gimpdisplayshell-callbacks.c: changed accordingly

 	* libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct
 	documentation on the undo operations
parent 095314f0
......@@ -160,11 +160,11 @@ gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
static void
gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool)
{
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (FALSE, /* scroll_lock */
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (TRUE, /* scroll_lock */
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -269,11 +269,11 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
static void
gimp_curves_tool_init (GimpCurvesTool *bc_tool)
{
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (FALSE, /* scroll_lock */
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (TRUE, /* scroll_lock */
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -184,11 +184,11 @@ gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
static void
gimp_hue_saturation_tool_init (GimpHueSaturationTool *tool)
{
GIMP_TOOL(tool)->control = gimp_tool_control_new (FALSE, /* scroll_lock */
GIMP_TOOL(tool)->control = gimp_tool_control_new (TRUE, /* scroll_lock */
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -37,7 +37,7 @@
#include "core/gimptoolinfo.h"
#include "libgimptool/gimptooltypes.h"
#include "tools/gimptoolcontrol-displayshell.h"
#include "libgimptool/gimptoolcontrol.h"
#include "tools/gimpmovetool.h"
#include "tools/tool_manager.h"
......@@ -431,10 +431,7 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case 1:
state |= GDK_BUTTON1_MASK;
if (gimp_tool_control_wants_perfect_mouse(active_tool->control) && gimprc.perfectmouse)
/* FIXME */
#if 0
if (((active_tool->motion_mode == GIMP_MOTION_MODE_EXACT) &&
if (((gimp_tool_control_motion_mode(active_tool->control) == GIMP_MOTION_MODE_EXACT) &&
gimprc.perfectmouse) ||
/* don't request motion hins for XInput devices because
......@@ -443,8 +440,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
*/
(gimp_devices_get_current (gimage->gimp) !=
gdk_device_get_core_pointer ()))
#endif
{
gdk_pointer_grab (canvas->window, FALSE,
GDK_BUTTON1_MOTION_MASK |
......@@ -694,9 +689,8 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
return TRUE;
active_tool = tool_manager_get_active (gimage->gimp);
/* FIXME */
#if 0
switch (active_tool->motion_mode)
switch (gimp_tool_control_motion_mode (active_tool->control))
{
case GIMP_MOTION_MODE_EXACT:
case GIMP_MOTION_MODE_HINT:
......@@ -706,7 +700,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
compressed_motion = gimp_display_shell_compress_motion (shell);
break;
}
#endif
if (compressed_motion)
{
g_print ("gimp_display_shell_compress_motion() returned an event\n");
......
......@@ -326,7 +326,7 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
TRUE, /* perfectmouse */
GIMP_MOTION_MODE_EXACT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_INK_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......@@ -334,7 +334,6 @@ gimp_ink_tool_init (GimpInkTool *ink_tool)
GIMP_TOOL_CURSOR_NONE, /* toggle_tool_cursor */
GIMP_CURSOR_MODIFIER_NONE /* toggle_cursor_modifier */);
/* FIXME tool->motion_mode = GIMP_MOTION_MODE_EXACT; */
}
static void
......@@ -404,7 +403,7 @@ gimp_ink_tool_button_press (GimpTool *tool,
ink_init (ink_tool, drawable, coords->x, coords->y);
gimp_tool_control_activate(tool->control);
/* EEEEEEEK! FIXME! Should we really be setting the gdisp like this? tool->gdisp = gdisp; */
tool->gdisp = gdisp;
/* pause the current selection */
gimp_image_selection_control (gdisp->gimage, GIMP_SELECTION_PAUSE);
......
......@@ -100,8 +100,6 @@ libapptools_a_SOURCES = @STRIP_BEGIN@ \
gimptool.h \
gimptoolcontrol.c \
gimptoolcontrol.h \
gimptoolcontrol-displayshell.c \
gimptoolcontrol-displayshell.h \
gimptoolmodule.c \
gimptoolmodule.h \
gimptransformtool.c \
......
......@@ -121,7 +121,7 @@ gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_EXACT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_AIRBRUSH_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -362,7 +362,7 @@ gimp_bezier_select_tool_init (GimpBezierSelectTool *bezier_select)
TRUE, /* auto_snap_to */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_BEZIER_SELECT_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -222,7 +222,7 @@ gimp_blend_tool_init (GimpBlendTool *blend_tool)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_BLEND_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -158,9 +158,6 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool)
tool = GIMP_TOOL (paint_tool);
/* tool->perfectmouse = TRUE; */
/* FIXME tool->motion_mode = GIMP_MOTION_MODE_EXACT; */
paint_tool->pick_colors = FALSE;
paint_tool->pick_state = FALSE;
}
......
......@@ -181,7 +181,7 @@ gimp_bucket_fill_tool_init (GimpBucketFillTool *bucket_fill_tool)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_BUCKET_FILL_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -246,7 +246,7 @@ gimp_by_color_select_tool_init (GimpByColorSelectTool *by_color_select)
TRUE, /* auto_snap_to */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_RECT_SELECT_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -163,7 +163,7 @@ gimp_clone_tool_init (GimpCloneTool *clone)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_EXACT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_CLONE_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -160,11 +160,11 @@ gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
static void
gimp_color_balance_tool_init (GimpColorBalanceTool *bc_tool)
{
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (FALSE, /* scroll_lock */
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (TRUE, /* scroll_lock */
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -201,7 +201,7 @@ gimp_color_picker_tool_init (GimpColorPickerTool *color_picker_tool)
TRUE, /* auto_snap_to */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_COLOR_PICKER_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -149,7 +149,7 @@ gimp_convolve_tool_init (GimpConvolveTool *convolve)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_EXACT, /* motion_mode */
GIMP_BLUR_TOOL_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -257,7 +257,7 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
TRUE, /* auto_snap_to */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_CROP_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -269,11 +269,11 @@ gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
static void
gimp_curves_tool_init (GimpCurvesTool *bc_tool)
{
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (FALSE, /* scroll_lock */
GIMP_TOOL(bc_tool)->control = gimp_tool_control_new (TRUE, /* scroll_lock */
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_HINT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -127,7 +127,7 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn)
TRUE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_EXACT, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_DODGE_TOOL_CURSOR, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......
......@@ -182,7 +182,7 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
FALSE, /* auto_snap_to */
TRUE, /* preserve */
FALSE, /* handle_empty_image */
FALSE, /* perfectmouse */
GIMP_MOTION_MODE_COMPRESS, /* motion_mode */
GIMP_MOUSE_CURSOR, /* cursor */
GIMP_TOOL_CURSOR_NONE, /* tool_cursor */
GIMP_CURSOR_MODIFIER_NONE, /* cursor_modifier */
......@@ -190,7 +190,6 @@ gimp_edit_selection_tool_init (GimpEditSelectionTool *edit_selection_tool)
GIMP_TOOL_CURSOR_NONE, /* toggle_tool_cursor */
GIMP_CURSOR_MODIFIER_NONE /* toggle_cursor_modifier */);
/* FIXME! tool->motion_mode = GIMP_MOTION_MODE_COMPRESS; */
edit_selection_tool->origx = 0;
edit_selection_tool->origy = 0;
......
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