app: gimp_tool_widget_get_cursor(): rename "cursor_modifier" to just "modifier"

The same in all subclasses.
This commit is contained in:
Michael Natterer 2017-06-26 22:13:00 +02:00
parent e4ec9e89f4
commit 3a0aab71b6
9 changed files with 62 additions and 62 deletions

View File

@ -142,7 +142,7 @@ static gboolean gimp_tool_compass_get_cursor (GimpToolWidget *widget
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static void gimp_tool_compass_update_hilight (GimpToolCompass *compass);
@ -933,7 +933,7 @@ gimp_tool_compass_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolCompass *compass = GIMP_TOOL_COMPASS (widget);
GimpToolCompassPrivate *private = compass->private;
@ -965,12 +965,12 @@ gimp_tool_compass_get_cursor (GimpToolWidget *widget,
! ((private->point == 0) &&
(private->n_points == 3)))
{
*cursor_modifier = GIMP_CURSOR_MODIFIER_PLUS;
*modifier = GIMP_CURSOR_MODIFIER_PLUS;
return TRUE;
}
else
{
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
return TRUE;
}
}
@ -978,7 +978,7 @@ gimp_tool_compass_get_cursor (GimpToolWidget *widget,
{
if ((private->n_points > 1) && (state & GDK_MOD1_MASK))
{
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
return TRUE;
}
}

View File

@ -123,7 +123,7 @@ static gboolean gimp_tool_handle_grid_get_cursor (GimpToolWidget *widge
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static void gimp_tool_handle_grid_update_hilight (GimpToolHandleGrid *grid);
static void gimp_tool_handle_grid_update_matrix (GimpToolHandleGrid *grid);
@ -894,14 +894,14 @@ gimp_tool_handle_grid_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolHandleGrid *grid = GIMP_TOOL_HANDLE_GRID (widget);
GimpToolHandleGridPrivate *private = grid->private;
*cursor = GIMP_CURSOR_CROSSHAIR_SMALL;
*tool_cursor = GIMP_TOOL_CURSOR_NONE;
*cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
*cursor = GIMP_CURSOR_CROSSHAIR_SMALL;
*tool_cursor = GIMP_TOOL_CURSOR_NONE;
*modifier = GIMP_CURSOR_MODIFIER_NONE;
switch (private->handle_mode)
{
@ -927,24 +927,24 @@ gimp_tool_handle_grid_get_cursor (GimpToolWidget *widget,
else
{
if (private->n_handles < 4)
*cursor_modifier = GIMP_CURSOR_MODIFIER_PLUS;
*modifier = GIMP_CURSOR_MODIFIER_PLUS;
else
*cursor_modifier = GIMP_CURSOR_MODIFIER_BAD;
*modifier = GIMP_CURSOR_MODIFIER_BAD;
}
break;
case GIMP_HANDLE_MODE_MOVE:
if (private->handle > 0)
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
else
*cursor_modifier = GIMP_CURSOR_MODIFIER_BAD;
*modifier = GIMP_CURSOR_MODIFIER_BAD;
break;
case GIMP_HANDLE_MODE_REMOVE:
if (private->handle > 0)
*cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
*modifier = GIMP_CURSOR_MODIFIER_MINUS;
else
*cursor_modifier = GIMP_CURSOR_MODIFIER_BAD;
*modifier = GIMP_CURSOR_MODIFIER_BAD;
break;
}

View File

@ -129,7 +129,7 @@ static gboolean gimp_tool_line_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static gboolean gimp_tool_line_point_motion (GimpToolLine *line,
gboolean constrain_angle);
@ -496,14 +496,14 @@ gimp_tool_line_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolLine *line = GIMP_TOOL_LINE (widget);
GimpToolLinePrivate *private = line->private;
if (private->point == POINT_BOTH)
{
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
return TRUE;
}

View File

@ -162,7 +162,7 @@ static gboolean gimp_tool_path_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static void gimp_tool_path_update_status (GimpToolPath *path,
GdkModifierType state,
@ -1339,13 +1339,13 @@ gimp_tool_path_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolPath *path = GIMP_TOOL_PATH (widget);
GimpToolPathPrivate *private = path->private;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS;
*cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS;
*modifier = GIMP_CURSOR_MODIFIER_NONE;
switch (private->function)
{
@ -1355,62 +1355,62 @@ gimp_tool_path_get_cursor (GimpToolWidget *widget,
case VECTORS_CREATE_VECTOR:
case VECTORS_CREATE_STROKE:
*cursor_modifier = GIMP_CURSOR_MODIFIER_CONTROL;
*modifier = GIMP_CURSOR_MODIFIER_CONTROL;
break;
case VECTORS_ADD_ANCHOR:
case VECTORS_INSERT_ANCHOR:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*cursor_modifier = GIMP_CURSOR_MODIFIER_PLUS;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*modifier = GIMP_CURSOR_MODIFIER_PLUS;
break;
case VECTORS_DELETE_ANCHOR:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*modifier = GIMP_CURSOR_MODIFIER_MINUS;
break;
case VECTORS_DELETE_SEGMENT:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*modifier = GIMP_CURSOR_MODIFIER_MINUS;
break;
case VECTORS_MOVE_HANDLE:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_CONTROL;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_CONTROL;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case VECTORS_CONVERT_EDGE:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_CONTROL;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_CONTROL;
*modifier = GIMP_CURSOR_MODIFIER_MINUS;
break;
case VECTORS_MOVE_ANCHOR:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case VECTORS_MOVE_CURVE:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case VECTORS_MOVE_STROKE:
case VECTORS_MOVE_VECTORS:
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case VECTORS_MOVE_ANCHORSET:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_ANCHOR;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case VECTORS_CONNECT_STROKES:
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*cursor_modifier = GIMP_CURSOR_MODIFIER_JOIN;
*tool_cursor = GIMP_TOOL_CURSOR_PATHS_SEGMENT;
*modifier = GIMP_CURSOR_MODIFIER_JOIN;
break;
default:
*cursor_modifier = GIMP_CURSOR_MODIFIER_BAD;
*modifier = GIMP_CURSOR_MODIFIER_BAD;
break;
}

View File

@ -186,7 +186,7 @@ static gboolean gimp_tool_polygon_get_cursor (GimpToolWidget *widget
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
G_DEFINE_TYPE (GimpToolPolygon, gimp_tool_polygon, GIMP_TYPE_TOOL_WIDGET)
@ -1375,7 +1375,7 @@ gimp_tool_polygon_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolPolygon *polygon = GIMP_TOOL_POLYGON (widget);
@ -1384,7 +1384,7 @@ gimp_tool_polygon_get_cursor (GimpToolWidget *widget,
NO_CLICK_TIME_AVAILABLE,
coords))
{
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
return TRUE;
}

View File

@ -294,7 +294,7 @@ static gboolean gimp_tool_rectangle_get_cursor (GimpToolWidget *widg
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static void gimp_tool_rectangle_change_complete (GimpToolRectangle *rectangle);

View File

@ -175,7 +175,7 @@ static gboolean gimp_tool_transform_grid_get_cursor (GimpToolWidget *
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
static void gimp_tool_transform_grid_update_hilight (GimpToolTransformGrid *grid);
static void gimp_tool_transform_grid_update_box (GimpToolTransformGrid *grid);
@ -1910,7 +1910,7 @@ gimp_tool_transform_grid_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
GimpToolTransformGrid *grid = GIMP_TOOL_TRANSFORM_GRID (widget);
GimpToolTransformGridPrivate *private = grid->private;
@ -2085,7 +2085,7 @@ gimp_tool_transform_grid_get_cursor (GimpToolWidget *widget,
case GIMP_TRANSFORM_HANDLE_PIVOT:
*tool_cursor = GIMP_TOOL_CURSOR_ROTATE;
*cursor_modifier = GIMP_CURSOR_MODIFIER_MOVE;
*modifier = GIMP_CURSOR_MODIFIER_MOVE;
break;
case GIMP_TRANSFORM_HANDLE_N_S:

View File

@ -806,7 +806,7 @@ gimp_tool_widget_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier)
GimpCursorModifier *modifier)
{
g_return_val_if_fail (GIMP_IS_TOOL_WIDGET (widget), FALSE);
@ -816,21 +816,21 @@ gimp_tool_widget_get_cursor (GimpToolWidget *widget,
{
GimpCursorType my_cursor;
GimpToolCursorType my_tool_cursor;
GimpCursorModifier my_cursor_modifier;
GimpCursorModifier my_modifier;
if (cursor) my_cursor = *cursor;
if (tool_cursor) my_tool_cursor = *tool_cursor;
if (cursor_modifier) my_cursor_modifier = *cursor_modifier;
if (cursor) my_cursor = *cursor;
if (tool_cursor) my_tool_cursor = *tool_cursor;
if (modifier) my_modifier = *modifier;
if (GIMP_TOOL_WIDGET_GET_CLASS (widget)->get_cursor (widget, coords,
state,
&my_cursor,
&my_tool_cursor,
&my_cursor_modifier))
&my_modifier))
{
if (cursor) *cursor = my_cursor;
if (tool_cursor) *tool_cursor = my_tool_cursor;
if (cursor_modifier) *cursor_modifier = my_cursor_modifier;
if (cursor) *cursor = my_cursor;
if (tool_cursor) *tool_cursor = my_tool_cursor;
if (modifier) *modifier = my_modifier;
return TRUE;
}

View File

@ -110,7 +110,7 @@ struct _GimpToolWidgetClass
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
};
@ -261,7 +261,7 @@ gboolean gimp_tool_widget_get_cursor (GimpToolWidget *widget,
GdkModifierType state,
GimpCursorType *cursor,
GimpToolCursorType *tool_cursor,
GimpCursorModifier *cursor_modifier);
GimpCursorModifier *modifier);
#endif /* __GIMP_TOOL_WIDGET_H__ */