added GError arguments and fixed all functions to abort when the first

2007-12-06  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore-stroke.[ch]: added GError arguments and
	fixed all functions to abort when the first call to
	gimp_paint_core_start() fails (it won't succeed either for the
	next path or whatever segemts).

	* app/core/gimpitem.[ch]: added GError to gimp_item_stroke()

	* app/core/gimpselection.c
	* app/core/gimpchannel.c
	* app/vectors/gimpvectors.c: don't gimp_message() in
	GimpItem::stroke() but set the error.

	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* app/actions/select-commands.c: handle the returned errors.

	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/paint_tools.pdb: pass the error to the stroke
	functions.

	* app/pdb/paint_tools_cmds.c
	* app/pdb/edit_cmds.c
	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=24273
This commit is contained in:
Michael Natterer 2007-12-06 18:40:12 +00:00 committed by Michael Natterer
parent 543302f551
commit e418cf6d66
16 changed files with 221 additions and 129 deletions

View file

@ -1,3 +1,30 @@
2007-12-06 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore-stroke.[ch]: added GError arguments and
fixed all functions to abort when the first call to
gimp_paint_core_start() fails (it won't succeed either for the
next path or whatever segemts).
* app/core/gimpitem.[ch]: added GError to gimp_item_stroke()
* app/core/gimpselection.c
* app/core/gimpchannel.c
* app/vectors/gimpvectors.c: don't gimp_message() in
GimpItem::stroke() but set the error.
* app/dialogs/stroke-dialog.c
* app/actions/vectors-commands.c
* app/actions/select-commands.c: handle the returned errors.
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/paint_tools.pdb: pass the error to the stroke
functions.
* app/pdb/paint_tools_cmds.c
* app/pdb/edit_cmds.c
* app/pdb/paths_cmds.c: regenerated.
2007-12-06 Michael Natterer <mitch@gimp.org>
Move some gimp_message() calls where they belong:

View file

@ -336,6 +336,7 @@ select_stroke_last_vals_cmd_callback (GtkAction *action,
GimpContext *context;
GtkWidget *widget;
GimpStrokeDesc *desc;
GError *error = NULL;
return_if_no_image (image, data);
return_if_no_context (context, data);
return_if_no_widget (widget, data);
@ -356,12 +357,19 @@ select_stroke_last_vals_cmd_callback (GtkAction *action,
else
desc = gimp_stroke_desc_new (image->gimp, context);
gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
drawable, context, desc, FALSE, NULL);
if (! gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
drawable, context, desc, FALSE, NULL, &error))
{
gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
g_object_unref (desc);
gimp_image_flush (image);
}

View file

@ -391,6 +391,7 @@ vectors_stroke_last_vals_cmd_callback (GtkAction *action,
GimpContext *context;
GtkWidget *widget;
GimpStrokeDesc *desc;
GError *error = NULL;
return_if_no_vectors (image, vectors, data);
return_if_no_context (context, data);
return_if_no_widget (widget, data);
@ -412,11 +413,19 @@ vectors_stroke_last_vals_cmd_callback (GtkAction *action,
else
desc = gimp_stroke_desc_new (image->gimp, context);
gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE, NULL);
if (! gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE,
NULL, &error))
{
gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
error->message);
g_clear_error (&error);
}
else
{
gimp_image_flush (image);
}
g_object_unref (desc);
gimp_image_flush (image);
}
void

View file

@ -120,7 +120,8 @@ static void gimp_channel_transform (GimpItem *item,
static gboolean gimp_channel_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress);
GimpProgress *progress,
GError **error);
static void gimp_channel_invalidate_boundary (GimpDrawable *drawable);
static void gimp_channel_get_active_components (const GimpDrawable *drawable,
@ -668,10 +669,11 @@ gimp_channel_transform (GimpItem *item,
}
static gboolean
gimp_channel_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress)
gimp_channel_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress,
GError **error)
{
GimpChannel *channel = GIMP_CHANNEL (item);
@ -686,9 +688,8 @@ gimp_channel_stroke (GimpItem *item,
&n_segs_in, &n_segs_out,
0, 0, 0, 0))
{
gimp_message (gimp_item_get_image (item)->gimp, G_OBJECT (progress),
GIMP_MESSAGE_WARNING,
_("Cannot stroke empty channel."));
g_set_error (error, 0, 0,
_("Cannot stroke empty channel."));
return FALSE;
}
@ -713,7 +714,8 @@ gimp_channel_stroke (GimpItem *item,
retval = gimp_paint_core_stroke_boundary (core, drawable,
stroke_desc->paint_options,
segs_in, n_segs_in,
offset_x, offset_y);
offset_x, offset_y,
error);
g_object_unref (core);
}

View file

@ -1000,12 +1000,13 @@ gimp_item_transform (GimpItem *item,
}
gboolean
gimp_item_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpStrokeDesc *stroke_desc,
gboolean use_default_values,
GimpProgress *progress)
gimp_item_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpStrokeDesc *stroke_desc,
gboolean use_default_values,
GimpProgress *progress,
GError **error)
{
GimpItemClass *item_class;
gboolean retval = FALSE;
@ -1017,6 +1018,7 @@ gimp_item_stroke (GimpItem *item,
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
g_return_val_if_fail (GIMP_IS_STROKE_DESC (stroke_desc), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
item_class = GIMP_ITEM_GET_CLASS (item);
@ -1029,7 +1031,7 @@ gimp_item_stroke (GimpItem *item,
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT,
item_class->stroke_desc);
retval = item_class->stroke (item, drawable, stroke_desc, progress);
retval = item_class->stroke (item, drawable, stroke_desc, progress, error);
gimp_image_undo_group_end (image);

View file

@ -111,7 +111,8 @@ struct _GimpItemClass
gboolean (* stroke) (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress);
GimpProgress *progress,
GError **error);
const gchar *default_name;
const gchar *rename_desc;
@ -215,7 +216,8 @@ gboolean gimp_item_stroke (GimpItem *item,
GimpContext *context,
GimpStrokeDesc *stroke_desc,
gboolean use_default_values,
GimpProgress *progress);
GimpProgress *progress,
GError **error);
gint gimp_item_get_ID (GimpItem *item);
GimpItem * gimp_item_get_by_ID (Gimp *gimp,

View file

@ -76,7 +76,8 @@ static void gimp_selection_rotate (GimpItem *item,
static gboolean gimp_selection_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress);
GimpProgress *progress,
GError **error);
static void gimp_selection_invalidate_boundary (GimpDrawable *drawable);
@ -256,10 +257,11 @@ gimp_selection_rotate (GimpItem *item,
}
static gboolean
gimp_selection_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress)
gimp_selection_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpStrokeDesc *stroke_desc,
GimpProgress *progress,
GError **error)
{
GimpSelection *selection = GIMP_SELECTION (item);
const BoundSeg *dummy_in;
@ -273,16 +275,15 @@ gimp_selection_stroke (GimpItem *item,
&num_dummy_in, &num_dummy_out,
0, 0, 0, 0))
{
gimp_message (gimp_item_get_image (item)->gimp, G_OBJECT (progress),
GIMP_MESSAGE_WARNING,
_("There is no selection to stroke."));
g_set_error (error, 0, 0,
_("There is no selection to stroke."));
return FALSE;
}
selection->stroking = TRUE;
retval = GIMP_ITEM_CLASS (parent_class)->stroke (item, drawable, stroke_desc,
progress);
progress, error);
selection->stroking = FALSE;

View file

@ -273,6 +273,7 @@ stroke_dialog_response (GtkWidget *widget,
{
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
GimpStrokeDesc *saved_desc;
GError *error = NULL;
if (! drawable)
{
@ -297,7 +298,16 @@ stroke_dialog_response (GtkWidget *widget,
saved_desc,
(GDestroyNotify) g_object_unref);
gimp_item_stroke (item, drawable, context, desc, FALSE, NULL);
if (! gimp_item_stroke (item, drawable, context, desc, FALSE, NULL,
&error))
{
gimp_message (context->gimp, G_OBJECT (widget),
GIMP_MESSAGE_WARNING,
error->message);
g_clear_error (&error);
return;
}
gimp_image_flush (image);
}
/* fallthrough */

View file

@ -38,11 +38,12 @@ static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
gboolean
gimp_paint_core_stroke (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpCoords *strokes,
gint n_strokes)
gimp_paint_core_stroke (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpCoords *strokes,
gint n_strokes,
GError **error)
{
g_return_val_if_fail (GIMP_IS_PAINT_CORE (core), FALSE);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
@ -50,8 +51,10 @@ gimp_paint_core_stroke (GimpPaintCore *core,
g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), FALSE);
g_return_val_if_fail (strokes != NULL, FALSE);
g_return_val_if_fail (n_strokes > 0, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (gimp_paint_core_start (core, drawable, paint_options, &strokes[0], NULL))
if (gimp_paint_core_start (core, drawable, paint_options, &strokes[0],
error))
{
gint i;
@ -85,13 +88,14 @@ gimp_paint_core_stroke (GimpPaintCore *core,
}
gboolean
gimp_paint_core_stroke_boundary (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
const BoundSeg *bound_segs,
gint n_bound_segs,
gint offset_x,
gint offset_y)
gimp_paint_core_stroke_boundary (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
const BoundSeg *bound_segs,
gint n_bound_segs,
gint offset_x,
gint offset_y,
GError **error)
{
GimpImage *image;
BoundSeg *stroke_segs;
@ -109,6 +113,7 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), FALSE);
g_return_val_if_fail (bound_segs != NULL && n_bound_segs > 0, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
image = gimp_item_get_image (GIMP_ITEM (drawable));
@ -157,7 +162,7 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
if (initialized ||
gimp_paint_core_start (core, drawable, paint_options, &coords[0],
NULL))
error))
{
gint i;
@ -182,6 +187,10 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
gimp_paint_core_paint (core, drawable, paint_options,
GIMP_PAINT_STATE_FINISH, 0);
}
else
{
break;
}
n_coords = 0;
seg++;
@ -203,14 +212,15 @@ gimp_paint_core_stroke_boundary (GimpPaintCore *core,
g_free (coords);
g_free (stroke_segs);
return TRUE;
return initialized;
}
gboolean
gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpVectors *vectors)
gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpVectors *vectors,
GError **error)
{
GList *stroke;
GArray *coords = NULL;
@ -224,6 +234,7 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options), FALSE);
g_return_val_if_fail (GIMP_IS_VECTORS (vectors), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
gimp_item_offsets (GIMP_ITEM (vectors), &vectors_off_x, &vectors_off_y);
gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y);
@ -249,7 +260,7 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
if (initialized ||
gimp_paint_core_start (core, drawable, paint_options,
&g_array_index (coords, GimpCoords, 0),
NULL))
error))
{
initialized = TRUE;
@ -272,6 +283,13 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
gimp_paint_core_paint (core, drawable, paint_options,
GIMP_PAINT_STATE_FINISH, 0);
}
else
{
if (coords)
g_array_free (coords, TRUE);
break;
}
}
if (coords)
@ -285,5 +303,5 @@ gimp_paint_core_stroke_vectors (GimpPaintCore *core,
gimp_paint_core_cleanup (core);
}
return TRUE;
return initialized;
}

View file

@ -20,22 +20,25 @@
#define __GIMP_PAINT_CORE_STROKE_H__
gboolean gimp_paint_core_stroke (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpCoords *strokes,
gint n_strokes);
gboolean gimp_paint_core_stroke_boundary (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
const BoundSeg *bound_segs,
gint n_bound_segs,
gint offset_x,
gint offset_y);
gboolean gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpVectors *vectors);
gboolean gimp_paint_core_stroke (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpCoords *strokes,
gint n_strokes,
GError **error);
gboolean gimp_paint_core_stroke_boundary (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
const BoundSeg *bound_segs,
gint n_bound_segs,
gint offset_x,
gint offset_y,
GError **error);
gboolean gimp_paint_core_stroke_vectors (GimpPaintCore *core,
GimpDrawable *drawable,
GimpPaintOptions *paint_options,
GimpVectors *vectors,
GError **error);
#endif /* __GIMP_PAINT_CORE_STROKE_H__ */

View file

@ -688,7 +688,8 @@ edit_stroke_invoker (GimpProcedure *procedure,
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}
@ -723,7 +724,8 @@ edit_stroke_vectors_invoker (GimpProcedure *procedure,
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (vectors),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}

View file

@ -44,13 +44,14 @@
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
static gboolean
paint_tools_stroke (Gimp *gimp,
GimpContext *context,
GimpPaintOptions *options,
GimpDrawable *drawable,
gint n_strokes,
const gdouble *strokes,
const gchar *first_property_name,
paint_tools_stroke (Gimp *gimp,
GimpContext *context,
GimpPaintOptions *options,
GimpDrawable *drawable,
gint n_strokes,
const gdouble *strokes,
GError **error,
const gchar *first_property_name,
...)
{
GimpPaintCore *core;
@ -84,7 +85,8 @@ paint_tools_stroke (Gimp *gimp,
}
retval = gimp_paint_core_stroke (core, drawable, options,
coords, n_strokes);
coords, n_strokes,
error);
g_free (coords);
@ -129,7 +131,7 @@ airbrush_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -167,7 +169,7 @@ airbrush_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -217,7 +219,7 @@ clone_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
"src-drawable", src_drawable,
"src-x", src_x,
@ -258,7 +260,7 @@ clone_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -305,7 +307,7 @@ convolve_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -343,7 +345,7 @@ convolve_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -393,7 +395,7 @@ dodgeburn_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -431,7 +433,7 @@ dodgeburn_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -478,7 +480,7 @@ eraser_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -516,7 +518,7 @@ eraser_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -560,7 +562,7 @@ heal_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
"src-drawable", src_drawable,
"src-x", src_x,
@ -601,7 +603,7 @@ heal_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -653,7 +655,7 @@ paintbrush_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -691,7 +693,7 @@ paintbrush_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -729,7 +731,7 @@ pencil_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -773,7 +775,7 @@ smudge_invoker (GimpProcedure *procedure,
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -811,7 +813,7 @@ smudge_default_invoker (GimpProcedure *procedure,
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}

View file

@ -332,7 +332,8 @@ path_stroke_current_invoker (GimpProcedure *procedure,
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (vectors),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}

View file

@ -790,7 +790,8 @@ HELP
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (gimp_image_get_mask (image)),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}
@ -829,7 +830,8 @@ HELP
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (vectors),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}

View file

@ -67,7 +67,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -109,7 +109,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -170,7 +170,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
"src-drawable", src_drawable,
"src-x", src_x,
@ -216,7 +216,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -258,7 +258,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -307,7 +307,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -347,7 +347,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -397,7 +397,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -448,7 +448,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -497,7 +497,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
"src-drawable", src_drawable,
"src-x", src_x,
@ -543,7 +543,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -604,7 +604,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -654,7 +654,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -695,7 +695,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -739,7 +739,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -781,7 +781,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -832,7 +832,7 @@ HELP
NULL);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -874,7 +874,7 @@ HELP
GimpPaintOptions *options = gimp_paint_options_new (info);
success = paint_tools_stroke (gimp, context, options, drawable,
num_strokes, strokes,
num_strokes, strokes, error,
"undo-desc", info->blurb,
NULL);
}
@ -905,13 +905,14 @@ $extra{app}->{code} = <<'CODE';
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
static gboolean
paint_tools_stroke (Gimp *gimp,
GimpContext *context,
GimpPaintOptions *options,
GimpDrawable *drawable,
gint n_strokes,
const gdouble *strokes,
const gchar *first_property_name,
paint_tools_stroke (Gimp *gimp,
GimpContext *context,
GimpPaintOptions *options,
GimpDrawable *drawable,
gint n_strokes,
const gdouble *strokes,
GError **error,
const gchar *first_property_name,
...)
{
GimpPaintCore *core;
@ -945,7 +946,8 @@ paint_tools_stroke (Gimp *gimp,
}
retval = gimp_paint_core_stroke (core, drawable, options,
coords, n_strokes);
coords, n_strokes,
error);
g_free (coords);

View file

@ -273,7 +273,8 @@ sub path_stroke_current {
g_object_set (desc, "method", GIMP_STROKE_METHOD_PAINT_CORE, NULL);
success = gimp_item_stroke (GIMP_ITEM (vectors),
drawable, context, desc, TRUE, progress);
drawable, context, desc, TRUE, progress,
error);
g_object_unref (desc);
}