Commit e51915a3 authored by Michael Natterer's avatar Michael Natterer 😴

app: rename all tools' widget members to simply "widget"

instead of "line", "polygon", "compass" etc. Good for consistency and
for copy & paste :)
parent 5ee96b17
......@@ -311,11 +311,11 @@ gimp_blend_tool_button_press (GimpTool *tool,
if (tool->display && display != tool->display)
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, tool->display);
if (! blend_tool->line)
if (! blend_tool->widget)
{
gimp_blend_tool_start (blend_tool, coords, display);
gimp_tool_widget_hover (blend_tool->line, coords, state, TRUE);
gimp_tool_widget_hover (blend_tool->widget, coords, state, TRUE);
}
/* save the current line for undo, widget_button_press() might change it
......@@ -325,10 +325,10 @@ gimp_blend_tool_button_press (GimpTool *tool,
end_x = blend_tool->end_x;
end_y = blend_tool->end_y;
if (gimp_tool_widget_button_press (blend_tool->line, coords, time, state,
if (gimp_tool_widget_button_press (blend_tool->widget, coords, time, state,
press_type))
{
blend_tool->grab_widget = blend_tool->line;
blend_tool->grab_widget = blend_tool->widget;
blend_tool->undo_stack =
g_list_prepend (blend_tool->undo_stack,
......@@ -426,7 +426,7 @@ gimp_blend_tool_cursor_update (GimpTool *tool,
GIMP_CURSOR_MODIFIER_BAD);
return;
}
else if (display != tool->display || ! blend_tool->line)
else if (display != tool->display || ! blend_tool->widget)
{
gimp_tool_set_cursor (tool, display,
gimp_tool_control_get_cursor (tool->control),
......@@ -482,7 +482,7 @@ gimp_blend_tool_undo (GimpTool *tool,
info = blend_tool->undo_stack->data;
g_object_set (blend_tool->line,
g_object_set (blend_tool->widget,
"x1", info->start_x,
"y1", info->start_y,
"x2", info->end_x,
......@@ -513,7 +513,7 @@ gimp_blend_tool_redo (GimpTool *tool,
info = blend_tool->redo_stack->data;
g_object_set (blend_tool->line,
g_object_set (blend_tool->widget,
"x1", info->start_x,
"y1", info->start_y,
"x2", info->end_x,
......@@ -601,18 +601,18 @@ gimp_blend_tool_start (GimpBlendTool *blend_tool,
blend_tool->end_x = coords->x;
blend_tool->end_y = coords->y;
blend_tool->line = gimp_tool_line_new (shell,
blend_tool->start_x,
blend_tool->start_y,
blend_tool->end_x,
blend_tool->end_y);
blend_tool->widget = gimp_tool_line_new (shell,
blend_tool->start_x,
blend_tool->start_y,
blend_tool->end_x,
blend_tool->end_y);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), blend_tool->line);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), blend_tool->widget);
g_signal_connect (blend_tool->line, "changed",
g_signal_connect (blend_tool->widget, "changed",
G_CALLBACK (gimp_blend_tool_line_changed),
blend_tool);
g_signal_connect (blend_tool->line, "response",
g_signal_connect (blend_tool->widget, "response",
G_CALLBACK (gimp_blend_tool_line_response),
blend_tool);
......@@ -689,7 +689,7 @@ gimp_blend_tool_halt (GimpBlendTool *blend_tool)
gimp_draw_tool_stop (GIMP_DRAW_TOOL (blend_tool));
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), NULL);
g_clear_object (&blend_tool->line);
g_clear_object (&blend_tool->widget);
tool->display = NULL;
tool->drawable = NULL;
......
......@@ -49,7 +49,7 @@ struct _GimpBlendTool
GList *undo_stack;
GList *redo_stack;
GimpToolWidget *line;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
GeglNode *graph;
......
......@@ -215,20 +215,20 @@ gimp_crop_tool_button_press (GimpTool *tool,
{
gimp_crop_tool_start (crop_tool, display);
gimp_tool_widget_hover (crop_tool->rectangle, coords, state, TRUE);
gimp_tool_widget_hover (crop_tool->widget, coords, state, TRUE);
/* HACK: force CREATING on a newly created rectangle; otherwise,
* the above binding of properties would cause the rectangle to
* start with the size from tool options.
*/
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (crop_tool->rectangle),
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (crop_tool->widget),
GIMP_TOOL_RECTANGLE_CREATING);
}
if (gimp_tool_widget_button_press (crop_tool->rectangle, coords, time, state,
if (gimp_tool_widget_button_press (crop_tool->widget, coords, time, state,
press_type))
{
crop_tool->grab_widget = crop_tool->rectangle;
crop_tool->grab_widget = crop_tool->widget;
}
gimp_tool_control_activate (tool->control);
......@@ -278,12 +278,12 @@ gimp_crop_tool_options_notify (GimpTool *tool,
{
GimpCropTool *crop_tool = GIMP_CROP_TOOL (tool);
if (crop_tool->rectangle)
if (crop_tool->widget)
{
if (! strcmp (pspec->name, "layer-only") ||
! strcmp (pspec->name, "allow-growing"))
{
gimp_tool_rectangle_set_constraint (GIMP_TOOL_RECTANGLE (crop_tool->rectangle),
gimp_tool_rectangle_set_constraint (GIMP_TOOL_RECTANGLE (crop_tool->widget),
gimp_crop_tool_get_constraint (crop_tool));
}
}
......@@ -352,7 +352,7 @@ gimp_crop_tool_start (GimpCropTool *crop_tool,
tool->display = display;
crop_tool->rectangle = widget = gimp_tool_rectangle_new (shell);
crop_tool->widget = widget = gimp_tool_rectangle_new (shell);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), widget);
......@@ -395,7 +395,7 @@ gimp_crop_tool_commit (GimpCropTool *crop_tool)
gdouble x2, y2;
gint w, h;
gimp_tool_rectangle_get_public_rect (GIMP_TOOL_RECTANGLE (crop_tool->rectangle),
gimp_tool_rectangle_get_public_rect (GIMP_TOOL_RECTANGLE (crop_tool->widget),
&x, &y, &x2, &y2);
w = x2 - x;
......@@ -468,7 +468,7 @@ gimp_crop_tool_halt (GimpCropTool *crop_tool)
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), NULL);
g_clear_object (&crop_tool->rectangle);
g_clear_object (&crop_tool->widget);
tool->display = NULL;
tool->drawable = NULL;
......@@ -487,7 +487,7 @@ gimp_crop_tool_update_option_defaults (GimpCropTool *crop_tool,
gboolean ignore_pending)
{
GimpTool *tool = GIMP_TOOL (crop_tool);
GimpToolRectangle *rectangle = GIMP_TOOL_RECTANGLE (crop_tool->rectangle);
GimpToolRectangle *rectangle = GIMP_TOOL_RECTANGLE (crop_tool->widget);
GimpRectangleOptions *options;
options = GIMP_RECTANGLE_OPTIONS (GIMP_TOOL_GET_OPTIONS (tool));
......@@ -584,6 +584,6 @@ gimp_crop_tool_auto_shrink (GimpCropTool *crop_tool)
"shrink-merged", &shrink_merged,
NULL);
gimp_tool_rectangle_auto_shrink (GIMP_TOOL_RECTANGLE (crop_tool->rectangle),
gimp_tool_rectangle_auto_shrink (GIMP_TOOL_RECTANGLE (crop_tool->widget),
shrink_merged);
}
......@@ -41,7 +41,7 @@ struct _GimpCropTool
GimpImage *current_image;
GimpToolWidget *rectangle;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
};
......
......@@ -49,7 +49,7 @@ struct _GimpFreeSelectToolPrivate
/* The selection operation active when the tool was started */
GimpChannelOps operation_at_start;
GimpToolWidget *polygon;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
};
......@@ -180,7 +180,7 @@ gimp_free_select_tool_finalize (GObject *object)
GimpFreeSelectTool *fst = GIMP_FREE_SELECT_TOOL (object);
GimpFreeSelectToolPrivate *priv = fst->private;
g_clear_object (&priv->polygon);
g_clear_object (&priv->widget);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......@@ -201,14 +201,14 @@ gimp_free_select_tool_start (GimpFreeSelectTool *fst,
*/
private->operation_at_start = options->operation;
private->polygon = gimp_tool_polygon_new (shell);
private->widget = gimp_tool_polygon_new (shell);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), private->polygon);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), private->widget);
g_signal_connect (private->polygon, "changed",
g_signal_connect (private->widget, "changed",
G_CALLBACK (gimp_free_select_tool_polygon_changed),
fst);
g_signal_connect (private->polygon, "response",
g_signal_connect (private->widget, "response",
G_CALLBACK (gimp_free_select_tool_polygon_response),
fst);
......@@ -221,12 +221,12 @@ gimp_free_select_tool_commit (GimpFreeSelectTool *fst,
{
GimpFreeSelectToolPrivate *private = fst->private;
if (private->polygon)
if (private->widget)
{
const GimpVector2 *points;
gint n_points;
gimp_tool_polygon_get_points (GIMP_TOOL_POLYGON (private->polygon),
gimp_tool_polygon_get_points (GIMP_TOOL_POLYGON (private->widget),
&points, &n_points);
if (n_points >= 3)
......@@ -245,7 +245,7 @@ gimp_free_select_tool_halt (GimpFreeSelectTool *fst)
GimpFreeSelectToolPrivate *private = fst->private;
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (fst), NULL);
g_clear_object (&private->polygon);
g_clear_object (&private->widget);
}
static void
......@@ -290,9 +290,9 @@ gimp_free_select_tool_oper_update (GimpTool *tool,
return;
}
if (priv->polygon)
if (priv->widget)
{
gimp_tool_widget_hover (priv->polygon, coords, state, proximity);
gimp_tool_widget_hover (priv->widget, coords, state, proximity);
}
}
......@@ -313,9 +313,9 @@ gimp_free_select_tool_cursor_update (GimpTool *tool,
return;
}
if (priv->polygon && display == tool->display)
if (priv->widget && display == tool->display)
{
gimp_tool_widget_get_cursor (priv->polygon, coords, state,
gimp_tool_widget_get_cursor (priv->widget, coords, state,
NULL, NULL, &modifier);
}
......@@ -339,7 +339,7 @@ gimp_free_select_tool_button_press (GimpTool *tool,
if (tool->display && tool->display != display)
gimp_tool_control (tool, GIMP_TOOL_ACTION_COMMIT, tool->display);
if (! private->polygon) /* not tool->display, we have a subclass */
if (! private->widget) /* not tool->display, we have a subclass */
{
/* First of all handle delegation to the selection mask edit logic
* if appropriate.
......@@ -352,13 +352,13 @@ gimp_free_select_tool_button_press (GimpTool *tool,
gimp_free_select_tool_start (fst, display);
gimp_tool_widget_hover (private->polygon, coords, state, TRUE);
gimp_tool_widget_hover (private->widget, coords, state, TRUE);
}
if (gimp_tool_widget_button_press (private->polygon, coords, time, state,
if (gimp_tool_widget_button_press (private->widget, coords, time, state,
press_type))
{
private->grab_widget = private->polygon;
private->grab_widget = private->widget;
}
gimp_tool_control_activate (tool->control);
......@@ -428,9 +428,9 @@ gimp_free_select_tool_key_press (GimpTool *tool,
GimpFreeSelectTool *fst = GIMP_FREE_SELECT_TOOL (tool);
GimpFreeSelectToolPrivate *priv = fst->private;
if (priv->polygon && display == tool->display)
if (priv->widget && display == tool->display)
{
return gimp_tool_widget_key_press (priv->polygon, kevent);
return gimp_tool_widget_key_press (priv->widget, kevent);
}
return FALSE;
......@@ -446,9 +446,9 @@ gimp_free_select_tool_modifier_key (GimpTool *tool,
GimpFreeSelectTool *fst = GIMP_FREE_SELECT_TOOL (tool);
GimpFreeSelectToolPrivate *priv = fst->private;
if (priv->polygon && display == tool->display)
if (priv->widget && display == tool->display)
{
gimp_tool_widget_hover_modifier (priv->polygon, key, press, state);
gimp_tool_widget_hover_modifier (priv->widget, key, press, state);
}
GIMP_TOOL_CLASS (parent_class)->modifier_key (tool, key, press, state,
......@@ -465,9 +465,9 @@ gimp_free_select_tool_active_modifier_key (GimpTool *tool,
GimpFreeSelectTool *fst = GIMP_FREE_SELECT_TOOL (tool);
GimpFreeSelectToolPrivate *priv = fst->private;
if (priv->polygon)
if (priv->widget)
{
gimp_tool_widget_motion_modifier (priv->polygon, key, press, state);
gimp_tool_widget_motion_modifier (priv->widget, key, press, state);
GIMP_TOOL_CLASS (parent_class)->active_modifier_key (tool,
key, press, state,
......
......@@ -194,17 +194,17 @@ gimp_measure_tool_button_press (GimpTool *tool,
if (tool->display && display != tool->display)
gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, tool->display);
if (! measure->compass)
if (! measure->widget)
{
gimp_measure_tool_start (measure, display, coords);
gimp_tool_widget_hover (measure->compass, coords, state, TRUE);
gimp_tool_widget_hover (measure->widget, coords, state, TRUE);
}
if (gimp_tool_widget_button_press (measure->compass, coords, time, state,
if (gimp_tool_widget_button_press (measure->widget, coords, time, state,
press_type))
{
measure->grab_widget = measure->compass;
measure->grab_widget = measure->widget;
}
/* create the info window if necessary */
......@@ -360,27 +360,27 @@ gimp_measure_tool_start (GimpMeasureTool *measure,
measure->x[2] = 0;
measure->y[2] = 0;
measure->compass = gimp_tool_compass_new (shell,
measure->n_points,
measure->x[0],
measure->y[0],
measure->x[1],
measure->y[1],
measure->x[2],
measure->y[2]);
measure->widget = gimp_tool_compass_new (shell,
measure->n_points,
measure->x[0],
measure->y[0],
measure->x[1],
measure->y[1],
measure->x[2],
measure->y[2]);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), measure->compass);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), measure->widget);
g_signal_connect (measure->compass, "changed",
g_signal_connect (measure->widget, "changed",
G_CALLBACK (gimp_measure_tool_compass_changed),
measure);
g_signal_connect (measure->compass, "response",
g_signal_connect (measure->widget, "response",
G_CALLBACK (gimp_measure_tool_compass_response),
measure);
g_signal_connect (measure->compass, "status",
g_signal_connect (measure->widget, "status",
G_CALLBACK (gimp_measure_tool_compass_status),
measure);
g_signal_connect (measure->compass, "create-guides",
g_signal_connect (measure->widget, "create-guides",
G_CALLBACK (gimp_measure_tool_compass_create_guides),
measure);
......@@ -401,7 +401,7 @@ gimp_measure_tool_halt (GimpMeasureTool *measure)
gimp_draw_tool_stop (GIMP_DRAW_TOOL (measure));
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), NULL);
g_clear_object (&measure->compass);
g_clear_object (&measure->widget);
g_clear_object (&measure->gui);
......
......@@ -39,7 +39,7 @@ struct _GimpMeasureTool
{
GimpDrawTool parent_instance;
GimpToolWidget *compass;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
gint n_points;
......
......@@ -61,7 +61,7 @@ struct _GimpRectangleSelectToolPrivate
gdouble press_x;
gdouble press_y;
GimpToolWidget *rectangle;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
};
......@@ -250,13 +250,13 @@ gimp_rectangle_select_tool_button_press (GimpTool *tool,
{
gimp_rectangle_select_tool_start (rect_tool, display);
gimp_tool_widget_hover (private->rectangle, coords, state, TRUE);
gimp_tool_widget_hover (private->widget, coords, state, TRUE);
/* HACK: force CREATING on a newly created rectangle; otherwise,
* the above binding of properties would cause the rectangle to
* start with the size from tool options.
*/
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (private->rectangle),
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (private->widget),
GIMP_TOOL_RECTANGLE_CREATING);
}
......@@ -268,14 +268,14 @@ gimp_rectangle_select_tool_button_press (GimpTool *tool,
if (state & (gimp_get_extend_selection_mask () |
gimp_get_modify_selection_mask ()))
{
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (private->rectangle),
gimp_tool_rectangle_set_function (GIMP_TOOL_RECTANGLE (private->widget),
GIMP_TOOL_RECTANGLE_CREATING);
}
if (gimp_tool_widget_button_press (private->rectangle, coords, time, state,
if (gimp_tool_widget_button_press (private->widget, coords, time, state,
press_type))
{
private->grab_widget = private->rectangle;
private->grab_widget = private->widget;
}
private->press_x = coords->x;
......@@ -286,7 +286,7 @@ gimp_rectangle_select_tool_button_press (GimpTool *tool,
* unless the user has done something in the meantime
*/
function =
gimp_tool_rectangle_get_function (GIMP_TOOL_RECTANGLE (private->rectangle));
gimp_tool_rectangle_get_function (GIMP_TOOL_RECTANGLE (private->widget));
if (function == GIMP_TOOL_RECTANGLE_CREATING)
{
......@@ -419,9 +419,9 @@ gimp_rectangle_select_tool_key_press (GimpTool *tool,
GimpRectangleSelectTool *rect_tool = GIMP_RECTANGLE_SELECT_TOOL (tool);
GimpRectangleSelectToolPrivate *priv = rect_tool->private;
if (priv->rectangle && display == tool->display)
if (priv->widget && display == tool->display)
{
if (gimp_tool_widget_key_press (priv->rectangle, kevent))
if (gimp_tool_widget_key_press (priv->widget, kevent))
return TRUE;
}
......@@ -438,9 +438,9 @@ gimp_rectangle_select_tool_oper_update (GimpTool *tool,
GimpRectangleSelectTool *rect_tool = GIMP_RECTANGLE_SELECT_TOOL (tool);
GimpRectangleSelectToolPrivate *priv = rect_tool->private;
if (priv->rectangle && display == tool->display)
if (priv->widget && display == tool->display)
{
gimp_tool_widget_hover (priv->rectangle, coords, state, proximity);
gimp_tool_widget_hover (priv->widget, coords, state, proximity);
}
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,
......@@ -458,9 +458,9 @@ gimp_rectangle_select_tool_cursor_update (GimpTool *tool,
GimpCursorType cursor = GIMP_CURSOR_CROSSHAIR_SMALL;
GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_NONE;
if (private->rectangle && display == tool->display)
if (private->widget && display == tool->display)
{
gimp_tool_widget_get_cursor (private->rectangle, coords, state,
gimp_tool_widget_get_cursor (private->widget, coords, state,
&cursor, NULL, &modifier);
}
......@@ -668,7 +668,7 @@ gimp_rectangle_select_tool_start (GimpRectangleSelectTool *rect_tool,
tool->display = display;
private->rectangle = widget = gimp_tool_rectangle_new (shell);
private->widget = widget = gimp_tool_rectangle_new (shell);
g_object_set (widget,
"draw-ellipse",
......@@ -720,12 +720,12 @@ gimp_rectangle_select_tool_commit (GimpRectangleSelectTool *rect_tool)
GimpTool *tool = GIMP_TOOL (rect_tool);
GimpRectangleSelectToolPrivate *priv = rect_tool->private;
if (priv->rectangle)
if (priv->widget)
{
gdouble x1, y1, x2, y2;
gint w, h;
gimp_tool_rectangle_get_public_rect (GIMP_TOOL_RECTANGLE (priv->rectangle),
gimp_tool_rectangle_get_public_rect (GIMP_TOOL_RECTANGLE (priv->widget),
&x1, &y1, &x2, &y2);
w = x2 - x1;
h = y2 - y1;
......@@ -756,7 +756,7 @@ gimp_rectangle_select_tool_commit (GimpRectangleSelectTool *rect_tool)
if (gimp_item_bounds (GIMP_ITEM (selection), &x, &y, &w, &h))
{
g_object_set (priv->rectangle,
g_object_set (priv->widget,
"x1", (gdouble) x,
"y1", (gdouble) y,
"x2", (gdouble) (x + w),
......@@ -854,7 +854,7 @@ gimp_rectangle_select_tool_halt (GimpRectangleSelectTool *rect_tool)
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), NULL);
g_clear_object (&priv->rectangle);
g_clear_object (&priv->widget);
tool->display = NULL;
}
......@@ -891,7 +891,7 @@ gimp_rectangle_select_tool_update_option_defaults (GimpRectangleSelectTool *rect
rect_options = GIMP_RECTANGLE_OPTIONS (gimp_tool_get_options (tool));
if (! priv->rectangle)
if (! priv->widget)
return;
if (tool->display != NULL && ! ignore_pending)
......@@ -901,7 +901,7 @@ gimp_rectangle_select_tool_update_option_defaults (GimpRectangleSelectTool *rect
* rectangle width/height.
*/
gimp_tool_rectangle_pending_size_set (GIMP_TOOL_RECTANGLE (priv->rectangle),
gimp_tool_rectangle_pending_size_set (GIMP_TOOL_RECTANGLE (priv->widget),
G_OBJECT (rect_options),
"default-aspect-numerator",
"default-aspect-denominator");
......@@ -933,6 +933,6 @@ gimp_rectangle_select_tool_auto_shrink (GimpRectangleSelectTool *rect_tool)
"shrink-merged", &shrink_merged,
NULL);
gimp_tool_rectangle_auto_shrink (GIMP_TOOL_RECTANGLE (private->rectangle),
gimp_tool_rectangle_auto_shrink (GIMP_TOOL_RECTANGLE (private->widget),
shrink_merged);
}
......@@ -204,7 +204,7 @@ gimp_vector_tool_dispose (GObject *object)
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (object);
gimp_vector_tool_set_vectors (vector_tool, NULL);
g_clear_object (&vector_tool->path);
g_clear_object (&vector_tool->widget);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
......@@ -250,13 +250,13 @@ gimp_vector_tool_button_press (GimpTool *tool,
{
gimp_vector_tool_start (vector_tool, display);
gimp_tool_widget_hover (vector_tool->path, coords, state, TRUE);
gimp_tool_widget_hover (vector_tool->widget, coords, state, TRUE);
}
if (gimp_tool_widget_button_press (vector_tool->path, coords, time, state,
if (gimp_tool_widget_button_press (vector_tool->widget, coords, time, state,
press_type))
{
vector_tool->grab_widget = vector_tool->path;
vector_tool->grab_widget = vector_tool->widget;
}
gimp_tool_control_activate (tool->control);
......@@ -358,7 +358,7 @@ gimp_vector_tool_cursor_update (GimpTool *tool,
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
GimpDisplayShell *shell = gimp_display_get_shell (display);
if (display != tool->display || ! vector_tool->path)
if (display != tool->display || ! vector_tool->widget)
{
GimpToolCursorType tool_cursor = GIMP_TOOL_CURSOR_PATHS;
......@@ -389,7 +389,7 @@ gimp_vector_tool_start (GimpVectorTool *vector_tool,
tool->display = display;
vector_tool->path = widget = gimp_tool_path_new (shell);
vector_tool->widget = widget = gimp_tool_path_new (shell);
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), widget);
......@@ -435,7 +435,7 @@ gimp_vector_tool_halt (GimpVectorTool *vector_tool)
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
gimp_draw_tool_set_widget (GIMP_DRAW_TOOL (tool), NULL);
g_clear_object (&vector_tool->path);
g_clear_object (&vector_tool->widget);
tool->display = NULL;
}
......@@ -646,7 +646,7 @@ gimp_vector_tool_set_vectors (GimpVectorTool *vector_tool,
if (tool->display)
{
gimp_tool_path_set_vectors (GIMP_TOOL_PATH (vector_tool->path), vectors);
gimp_tool_path_set_vectors (GIMP_TOOL_PATH (vector_tool->widget), vectors);
}
else
{
......
......@@ -45,7 +45,7 @@ struct _GimpVectorTool
GimpVectors *vectors; /* the current Vector data */
GimpVectorMode saved_mode; /* used by modifier_key() */
GimpToolWidget *path;
GimpToolWidget *widget;
GimpToolWidget *grab_widget;
};
......
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