remember the last used GimpCursorFormat so changing the format in prefs

2004-06-14  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: remember the last used
	GimpCursorFormat so changing the format in prefs applies
	instantly, and not after the next tool change.

	* app/display/gimpdisplayshell-cursor.[ch]
	* app/tools/gimptool.[ch]
	* app/tools/gimptoolcontrol.[ch]
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
This commit is contained in:
Michael Natterer
2004-06-14 10:19:39 +00:00
committed by Michael Natterer
parent 71b4d89167
commit 1082ee6b94
18 changed files with 92 additions and 68 deletions

View File

@ -1,3 +1,21 @@
2004-06-14 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: remember the last used
GimpCursorFormat so changing the format in prefs applies
instantly, and not after the next tool change.
* app/display/gimpdisplayshell-cursor.[ch]
* app/tools/gimptool.[ch]
* app/tools/gimptoolcontrol.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
2004-06-14 Philip Lafleur <plafleur@cvs.gnome.org> 2004-06-14 Philip Lafleur <plafleur@cvs.gnome.org>
* app/tools/gimptransformtool.c (gimp_transform_tool_doit): Preview * app/tools/gimptransformtool.c (gimp_transform_tool_doit): Preview

View File

@ -44,7 +44,7 @@
static void gimp_display_shell_real_set_cursor (GimpDisplayShell *shell, static void gimp_display_shell_real_set_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type, GimpCursorType cursor_type,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier, GimpCursorModifier modifier,
gboolean always_install); gboolean always_install);
@ -52,7 +52,7 @@ static void gimp_display_shell_real_set_cursor (GimpDisplayShell *shell,
void void
gimp_display_shell_set_cursor (GimpDisplayShell *shell, gimp_display_shell_set_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type, GimpCursorType cursor_type,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier) GimpCursorModifier modifier)
{ {
@ -70,7 +70,7 @@ gimp_display_shell_set_cursor (GimpDisplayShell *shell,
void void
gimp_display_shell_set_override_cursor (GimpDisplayShell *shell, gimp_display_shell_set_override_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type) GimpCursorType cursor_type)
{ {
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -82,7 +82,7 @@ gimp_display_shell_set_override_cursor (GimpDisplayShell *shell,
shell->using_override_cursor = TRUE; shell->using_override_cursor = TRUE;
gimp_cursor_set (shell->canvas, gimp_cursor_set (shell->canvas,
GIMP_GUI_CONFIG (shell->gdisp->gimage->gimp->config)->cursor_format, shell->cursor_format,
cursor_type, cursor_type,
GIMP_TOOL_CURSOR_NONE, GIMP_TOOL_CURSOR_NONE,
GIMP_CURSOR_MODIFIER_NONE); GIMP_CURSOR_MODIFIER_NONE);
@ -181,12 +181,13 @@ gimp_display_shell_clear_cursor (GimpDisplayShell *shell)
static void static void
gimp_display_shell_real_set_cursor (GimpDisplayShell *shell, gimp_display_shell_real_set_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type, GimpCursorType cursor_type,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier, GimpCursorModifier modifier,
gboolean always_install) gboolean always_install)
{ {
GimpDisplayConfig *config; GimpDisplayConfig *config;
GimpCursorFormat cursor_format;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell)); g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -212,17 +213,20 @@ gimp_display_shell_real_set_cursor (GimpDisplayShell *shell,
} }
} }
if (shell->current_cursor != cursor_type || cursor_format = GIMP_GUI_CONFIG (config)->cursor_format;
shell->tool_cursor != tool_cursor ||
shell->cursor_modifier != modifier || if (shell->cursor_format != cursor_format ||
shell->current_cursor != cursor_type ||
shell->tool_cursor != tool_cursor ||
shell->cursor_modifier != modifier ||
always_install) always_install)
{ {
shell->cursor_format = cursor_format;
shell->current_cursor = cursor_type; shell->current_cursor = cursor_type;
shell->tool_cursor = tool_cursor; shell->tool_cursor = tool_cursor;
shell->cursor_modifier = modifier; shell->cursor_modifier = modifier;
gimp_cursor_set (shell->canvas, gimp_cursor_set (shell->canvas, cursor_format,
GIMP_GUI_CONFIG (config)->cursor_format,
cursor_type, tool_cursor, modifier); cursor_type, tool_cursor, modifier);
} }
} }

View File

@ -21,11 +21,11 @@
void gimp_display_shell_set_cursor (GimpDisplayShell *shell, void gimp_display_shell_set_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type, GimpCursorType cursor_type,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier); GimpCursorModifier modifier);
void gimp_display_shell_set_override_cursor (GimpDisplayShell *shell, void gimp_display_shell_set_override_cursor (GimpDisplayShell *shell,
GdkCursorType cursor_type); GimpCursorType cursor_type);
void gimp_display_shell_unset_override_cursor (GimpDisplayShell *shell); void gimp_display_shell_unset_override_cursor (GimpDisplayShell *shell);
void gimp_display_shell_update_cursor (GimpDisplayShell *shell, void gimp_display_shell_update_cursor (GimpDisplayShell *shell,

View File

@ -280,11 +280,12 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->icon_size = 32; shell->icon_size = 32;
shell->icon_idle_id = 0; shell->icon_idle_id = 0;
shell->current_cursor = (GdkCursorType) -1; shell->cursor_format = GIMP_CURSOR_FORMAT_BITMAP;
shell->current_cursor = (GimpCursorType) -1;
shell->tool_cursor = GIMP_TOOL_CURSOR_NONE; shell->tool_cursor = GIMP_TOOL_CURSOR_NONE;
shell->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE; shell->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
shell->override_cursor = (GdkCursorType) -1; shell->override_cursor = (GimpCursorType) -1;
shell->using_override_cursor = FALSE; shell->using_override_cursor = FALSE;
shell->draw_cursor = FALSE; shell->draw_cursor = FALSE;

View File

@ -118,11 +118,12 @@ struct _GimpDisplayShell
gint icon_size; /* size of the icon pixmap */ gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */ guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */ GimpCursorFormat cursor_format; /* Currently used cursor format */
GimpCursorType current_cursor; /* Currently installed main cursor */
GimpToolCursorType tool_cursor; /* Current Tool cursor */ GimpToolCursorType tool_cursor; /* Current Tool cursor */
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */ GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor */ GimpCursorType override_cursor; /* Overriding cursor */
gboolean using_override_cursor; /* is the cursor overridden? */ gboolean using_override_cursor; /* is the cursor overridden? */
gboolean draw_cursor; /* should we draw software cursor ? */ gboolean draw_cursor; /* should we draw software cursor ? */

View File

@ -224,7 +224,7 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
GimpDisplay *gdisp) GimpDisplay *gdisp)
{ {
GimpCloneOptions *options; GimpCloneOptions *options;
GdkCursorType ctype = GIMP_CURSOR_MOUSE; GimpCursorType ctype = GIMP_CURSOR_MOUSE;
options = (GimpCloneOptions *) tool->tool_info->tool_options; options = (GimpCloneOptions *) tool->tool_info->tool_options;

View File

@ -261,7 +261,7 @@ gimp_color_tool_cursor_update (GimpTool *tool,
if (color_tool->enabled) if (color_tool->enabled)
{ {
GdkCursorType cursor = GIMP_CURSOR_BAD; GimpCursorType cursor = GIMP_CURSOR_BAD;
GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
if (coords->x > 0 && coords->x < gdisp->gimage->width && if (coords->x > 0 && coords->x < gdisp->gimage->width &&

View File

@ -754,10 +754,10 @@ gimp_crop_tool_cursor_update (GimpTool *tool,
GdkModifierType state, GdkModifierType state,
GimpDisplay *gdisp) GimpDisplay *gdisp)
{ {
GimpCropTool *crop = GIMP_CROP_TOOL (tool); GimpCropTool *crop = GIMP_CROP_TOOL (tool);
GimpCropOptions *options; GimpCropOptions *options;
GdkCursorType ctype = GIMP_CURSOR_CROSSHAIR_SMALL; GimpCursorType cursor = GIMP_CURSOR_CROSSHAIR_SMALL;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
options = GIMP_CROP_OPTIONS (tool->tool_info->tool_options); options = GIMP_CROP_OPTIONS (tool->tool_info->tool_options);
@ -766,12 +766,12 @@ gimp_crop_tool_cursor_update (GimpTool *tool,
switch (crop->function) switch (crop->function)
{ {
case MOVING: case MOVING:
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
break; break;
case RESIZING_LEFT: case RESIZING_LEFT:
case RESIZING_RIGHT: case RESIZING_RIGHT:
cmodifier = GIMP_CURSOR_MODIFIER_RESIZE; modifier = GIMP_CURSOR_MODIFIER_RESIZE;
break; break;
default: default:
@ -779,13 +779,13 @@ gimp_crop_tool_cursor_update (GimpTool *tool,
} }
} }
gimp_tool_control_set_cursor (tool->control, ctype); gimp_tool_control_set_cursor (tool->control, cursor);
gimp_tool_control_set_tool_cursor (tool->control, gimp_tool_control_set_tool_cursor (tool->control,
options->crop_mode == options->crop_mode ==
GIMP_CROP_MODE_CROP ? GIMP_CROP_MODE_CROP ?
GIMP_TOOL_CURSOR_CROP : GIMP_TOOL_CURSOR_CROP :
GIMP_TOOL_CURSOR_RESIZE); GIMP_TOOL_CURSOR_RESIZE);
gimp_tool_control_set_cursor_modifier (tool->control, cmodifier); gimp_tool_control_set_cursor_modifier (tool->control, modifier);
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp); GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
} }

View File

@ -896,9 +896,9 @@ curves_graph_events (GtkWidget *widget,
GdkEvent *event, GdkEvent *event,
GimpCurvesTool *tool) GimpCurvesTool *tool)
{ {
static GdkCursorType cursor_type = GDK_TOP_LEFT_ARROW; static GimpCursorType cursor_type = GDK_TOP_LEFT_ARROW;
GdkCursorType new_cursor = GDK_X_CURSOR; GimpCursorType new_cursor = GDK_X_CURSOR;
GdkEventButton *bevent; GdkEventButton *bevent;
GdkEventMotion *mevent; GdkEventMotion *mevent;
gint i; gint i;

View File

@ -1005,8 +1005,8 @@ gimp_iscissors_tool_cursor_update (GimpTool *tool,
GimpDisplay *gdisp) GimpDisplay *gdisp)
{ {
GimpIscissorsTool *iscissors = GIMP_ISCISSORS_TOOL (tool); GimpIscissorsTool *iscissors = GIMP_ISCISSORS_TOOL (tool);
GdkCursorType cursor = GIMP_CURSOR_MOUSE; GimpCursorType cursor = GIMP_CURSOR_MOUSE;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
switch (iscissors->op) switch (iscissors->op)
{ {
@ -1014,10 +1014,10 @@ gimp_iscissors_tool_cursor_update (GimpTool *tool,
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp); GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
return; return;
case ISCISSORS_OP_MOVE_POINT: case ISCISSORS_OP_MOVE_POINT:
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
break; break;
case ISCISSORS_OP_ADD_POINT: case ISCISSORS_OP_ADD_POINT:
cmodifier = GIMP_CURSOR_MODIFIER_PLUS; modifier = GIMP_CURSOR_MODIFIER_PLUS;
break; break;
case ISCISSORS_OP_IMPOSSIBLE: case ISCISSORS_OP_IMPOSSIBLE:
cursor = GIMP_CURSOR_BAD; cursor = GIMP_CURSOR_BAD;
@ -1027,7 +1027,7 @@ gimp_iscissors_tool_cursor_update (GimpTool *tool,
} }
gimp_tool_set_cursor (tool, gdisp, gimp_tool_set_cursor (tool, gdisp,
cursor, GIMP_TOOL_CURSOR_ISCISSORS, cmodifier); cursor, GIMP_TOOL_CURSOR_ISCISSORS, modifier);
} }

View File

@ -508,8 +508,8 @@ gimp_measure_tool_cursor_update (GimpTool *tool,
{ {
GimpMeasureTool *mtool = GIMP_MEASURE_TOOL (tool); GimpMeasureTool *mtool = GIMP_MEASURE_TOOL (tool);
gboolean in_handle = FALSE; gboolean in_handle = FALSE;
GdkCursorType ctype = GIMP_CURSOR_CROSSHAIR_SMALL; GimpCursorType cursor = GIMP_CURSOR_CROSSHAIR_SMALL;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
gint i; gint i;
if (gimp_tool_control_is_active (tool->control) && tool->gdisp == gdisp) if (gimp_tool_control_is_active (tool->control) && tool->gdisp == gdisp)
@ -531,36 +531,36 @@ gimp_measure_tool_cursor_update (GimpTool *tool,
if (state & GDK_CONTROL_MASK) if (state & GDK_CONTROL_MASK)
{ {
if (state & GDK_MOD1_MASK) if (state & GDK_MOD1_MASK)
ctype = GDK_BOTTOM_RIGHT_CORNER; cursor = GDK_BOTTOM_RIGHT_CORNER;
else else
ctype = GDK_BOTTOM_SIDE; cursor = GDK_BOTTOM_SIDE;
break; break;
} }
if (state & GDK_MOD1_MASK) if (state & GDK_MOD1_MASK)
{ {
ctype = GDK_RIGHT_SIDE; cursor = GDK_RIGHT_SIDE;
break; break;
} }
if (state & GDK_SHIFT_MASK) if (state & GDK_SHIFT_MASK)
cmodifier = GIMP_CURSOR_MODIFIER_PLUS; modifier = GIMP_CURSOR_MODIFIER_PLUS;
else else
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
if (i == 0 && mtool->num_points == 3 && if (i == 0 && mtool->num_points == 3 &&
cmodifier == GIMP_CURSOR_MODIFIER_PLUS) modifier == GIMP_CURSOR_MODIFIER_PLUS)
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
break; break;
} }
} }
if (! in_handle && mtool->num_points > 1 && state & GDK_MOD1_MASK) if (! in_handle && mtool->num_points > 1 && state & GDK_MOD1_MASK)
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
} }
gimp_tool_control_set_cursor (tool->control, ctype); gimp_tool_control_set_cursor (tool->control, cursor);
gimp_tool_control_set_cursor_modifier (tool->control, cmodifier); gimp_tool_control_set_cursor_modifier (tool->control, modifier);
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp); GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
} }

View File

@ -586,7 +586,7 @@ gimp_move_tool_cursor_update (GimpTool *tool,
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (gdisp->shell); GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (gdisp->shell);
GimpMoveOptions *options = GIMP_MOVE_OPTIONS (tool->tool_info->tool_options); GimpMoveOptions *options = GIMP_MOVE_OPTIONS (tool->tool_info->tool_options);
GdkCursorType cursor = GIMP_CURSOR_BAD; GimpCursorType cursor = GIMP_CURSOR_BAD;
GimpToolCursorType tool_cursor = GIMP_TOOL_CURSOR_MOVE; GimpToolCursorType tool_cursor = GIMP_TOOL_CURSOR_MOVE;
GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;

View File

@ -224,7 +224,7 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
GimpDisplay *gdisp) GimpDisplay *gdisp)
{ {
GimpCloneOptions *options; GimpCloneOptions *options;
GdkCursorType ctype = GIMP_CURSOR_MOUSE; GimpCursorType ctype = GIMP_CURSOR_MOUSE;
options = (GimpCloneOptions *) tool->tool_info->tool_options; options = (GimpCloneOptions *) tool->tool_info->tool_options;

View File

@ -587,7 +587,7 @@ gimp_tool_pop_status (GimpTool *tool)
void void
gimp_tool_set_cursor (GimpTool *tool, gimp_tool_set_cursor (GimpTool *tool,
GimpDisplay *gdisp, GimpDisplay *gdisp,
GdkCursorType cursor, GimpCursorType cursor,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier) GimpCursorModifier modifier)
{ {

View File

@ -156,7 +156,7 @@ void gimp_tool_pop_status (GimpTool *tool);
void gimp_tool_set_cursor (GimpTool *tool, void gimp_tool_set_cursor (GimpTool *tool,
GimpDisplay *gdisp, GimpDisplay *gdisp,
GdkCursorType cursor, GimpCursorType cursor,
GimpToolCursorType tool_cursor, GimpToolCursorType tool_cursor,
GimpCursorModifier modifier); GimpCursorModifier modifier);

View File

@ -210,7 +210,7 @@ gimp_tool_control_set_preserve (GimpToolControl *control,
void void
gimp_tool_control_set_cursor (GimpToolControl *control, gimp_tool_control_set_cursor (GimpToolControl *control,
GdkCursorType cursor) GimpCursorType cursor)
{ {
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
@ -237,7 +237,7 @@ gimp_tool_control_set_cursor_modifier (GimpToolControl *control,
void void
gimp_tool_control_set_toggle_cursor (GimpToolControl *control, gimp_tool_control_set_toggle_cursor (GimpToolControl *control,
GdkCursorType cursor) GimpCursorType cursor)
{ {
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control)); g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
@ -335,7 +335,7 @@ gimp_tool_control_is_toggled (GimpToolControl *control)
return control->toggled; return control->toggled;
} }
GdkCursorType GimpCursorType
gimp_tool_control_get_cursor (GimpToolControl *control) gimp_tool_control_get_cursor (GimpToolControl *control)
{ {
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE); g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
@ -343,7 +343,7 @@ gimp_tool_control_get_cursor (GimpToolControl *control)
return control->cursor; return control->cursor;
} }
GdkCursorType GimpCursorType
gimp_tool_control_get_toggle_cursor (GimpToolControl *control) gimp_tool_control_get_toggle_cursor (GimpToolControl *control)
{ {
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE); g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);

View File

@ -53,11 +53,11 @@ struct _GimpToolControl
* active drawable */ * active drawable */
GimpMotionMode motion_mode; /* how to process motion events before * GimpMotionMode motion_mode; /* how to process motion events before *
* they are forwarded to the tool */ * they are forwarded to the tool */
GdkCursorType cursor; GimpCursorType cursor;
GimpToolCursorType tool_cursor; GimpToolCursorType tool_cursor;
GimpCursorModifier cursor_modifier; GimpCursorModifier cursor_modifier;
GdkCursorType toggle_cursor; GimpCursorType toggle_cursor;
GimpToolCursorType toggle_tool_cursor; GimpToolCursorType toggle_tool_cursor;
GimpCursorModifier toggle_cursor_modifier; GimpCursorModifier toggle_cursor_modifier;
@ -115,10 +115,10 @@ void gimp_tool_control_snap_offsets (GimpToolControl
gint *width, gint *width,
gint *height); gint *height);
GdkCursorType gimp_tool_control_get_cursor (GimpToolControl *control); GimpCursorType gimp_tool_control_get_cursor (GimpToolControl *control);
void gimp_tool_control_set_cursor (GimpToolControl *control, void gimp_tool_control_set_cursor (GimpToolControl *control,
GdkCursorType cursor); GimpCursorType cursor);
GimpToolCursorType gimp_tool_control_get_tool_cursor (GimpToolControl *control); GimpToolCursorType gimp_tool_control_get_tool_cursor (GimpToolControl *control);
void gimp_tool_control_set_tool_cursor (GimpToolControl *control, void gimp_tool_control_set_tool_cursor (GimpToolControl *control,
@ -127,10 +127,10 @@ GimpCursorModifier gimp_tool_control_get_cursor_modifier (GimpToolControl
void gimp_tool_control_set_cursor_modifier (GimpToolControl *control, void gimp_tool_control_set_cursor_modifier (GimpToolControl *control,
GimpCursorModifier cmodifier); GimpCursorModifier cmodifier);
GdkCursorType gimp_tool_control_get_toggle_cursor (GimpToolControl *control); GimpCursorType gimp_tool_control_get_toggle_cursor (GimpToolControl *control);
void gimp_tool_control_set_toggle_cursor (GimpToolControl *control, void gimp_tool_control_set_toggle_cursor (GimpToolControl *control,
GdkCursorType cursor); GimpCursorType cursor);
GimpToolCursorType gimp_tool_control_get_toggle_tool_cursor (GimpToolControl *control); GimpToolCursorType gimp_tool_control_get_toggle_tool_cursor (GimpToolControl *control);
void gimp_tool_control_set_toggle_tool_cursor (GimpToolControl *control, void gimp_tool_control_set_toggle_tool_cursor (GimpToolControl *control,

View File

@ -638,8 +638,8 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
if (tr_tool->use_grid) if (tr_tool->use_grid)
{ {
GimpChannel *selection = gimp_image_get_mask (gdisp->gimage); GimpChannel *selection = gimp_image_get_mask (gdisp->gimage);
GdkCursorType ctype = GDK_TOP_LEFT_ARROW; GimpCursorType cursor = GDK_TOP_LEFT_ARROW;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE; GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
switch (options->type) switch (options->type)
{ {
@ -652,14 +652,14 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
if (GIMP_IS_LAYER (drawable) && if (GIMP_IS_LAYER (drawable) &&
gimp_layer_get_mask (GIMP_LAYER (drawable))) gimp_layer_get_mask (GIMP_LAYER (drawable)))
{ {
ctype = GIMP_CURSOR_BAD; cursor = GIMP_CURSOR_BAD;
} }
else if (gimp_display_coords_in_active_drawable (gdisp, coords)) else if (gimp_display_coords_in_active_drawable (gdisp, coords))
{ {
if (gimp_channel_is_empty (selection) || if (gimp_channel_is_empty (selection) ||
gimp_channel_value (selection, coords->x, coords->y)) gimp_channel_value (selection, coords->x, coords->y))
{ {
ctype = GIMP_CURSOR_MOUSE; cursor = GIMP_CURSOR_MOUSE;
} }
} }
} }
@ -670,25 +670,25 @@ gimp_transform_tool_cursor_update (GimpTool *tool,
if (gimp_channel_is_empty (selection) || if (gimp_channel_is_empty (selection) ||
gimp_channel_value (selection, coords->x, coords->y)) gimp_channel_value (selection, coords->x, coords->y))
{ {
ctype = GIMP_CURSOR_MOUSE; cursor = GIMP_CURSOR_MOUSE;
} }
break; break;
case GIMP_TRANSFORM_TYPE_PATH: case GIMP_TRANSFORM_TYPE_PATH:
if (gimp_image_get_active_vectors (gdisp->gimage)) if (gimp_image_get_active_vectors (gdisp->gimage))
ctype = GIMP_CURSOR_MOUSE; cursor = GIMP_CURSOR_MOUSE;
else else
ctype = GIMP_CURSOR_BAD; cursor = GIMP_CURSOR_BAD;
break; break;
} }
if (tr_tool->use_center && tr_tool->function == TRANSFORM_HANDLE_CENTER) if (tr_tool->use_center && tr_tool->function == TRANSFORM_HANDLE_CENTER)
{ {
cmodifier = GIMP_CURSOR_MODIFIER_MOVE; modifier = GIMP_CURSOR_MODIFIER_MOVE;
} }
gimp_tool_control_set_cursor (tool->control, ctype); gimp_tool_control_set_cursor (tool->control, cursor);
gimp_tool_control_set_cursor_modifier (tool->control, cmodifier); gimp_tool_control_set_cursor_modifier (tool->control, modifier);
} }
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp); GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);