From 1abb4543cd6cb56bc523ae5bcc54165f5cdefc66 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 4 Sep 2021 00:25:13 +0200 Subject: [PATCH] =?UTF-8?q?app,=20pdb:=20move=20"src-drawables"=20from=20c?= =?UTF-8?q?ore=20to=20option=20object=20for=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … "gimp-clone" and "gimp-heal" PDB calls. Untested but this should work. Anyway we will take a close look at the whole API before releasing. --- app/pdb/paint-tools-cmds.c | 21 ++++++++++++--------- pdb/groups/paint_tools.pdb | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/app/pdb/paint-tools-cmds.c b/app/pdb/paint-tools-cmds.c index c8a1ae7ba2..0c0a5f7cb1 100644 --- a/app/pdb/paint-tools-cmds.c +++ b/app/pdb/paint-tools-cmds.c @@ -234,15 +234,15 @@ clone_invoker (GimpProcedure *procedure, src_drawables = g_list_prepend (NULL, src_drawable); g_object_set (options, - "clone-type", clone_type, + "clone-type", clone_type, + "src-drawables", src_drawables, NULL); success = paint_tools_stroke (gimp, context, options, drawable, num_strokes, strokes, error, - "undo-desc", options->paint_info->blurb, - "src-drawables", src_drawables, - "src-x", (gint) floor (src_x), - "src-y", (gint) floor (src_y), + "undo-desc", options->paint_info->blurb, + "src-x", (gint) floor (src_x), + "src-y", (gint) floor (src_y), NULL); g_list_free (src_drawables); } @@ -624,12 +624,15 @@ heal_invoker (GimpProcedure *procedure, options = gimp_config_duplicate (GIMP_CONFIG (options)); src_drawables = g_list_prepend (NULL, src_drawable); + g_object_set (options, + "src-drawables", src_drawables, + NULL); + success = paint_tools_stroke (gimp, context, options, drawable, num_strokes, strokes, error, - "undo-desc", options->paint_info->blurb, - "src-drawables", src_drawables, - "src-x", (gint) floor (src_x), - "src-y", (gint) floor (src_y), + "undo-desc", options->paint_info->blurb, + "src-x", (gint) floor (src_x), + "src-y", (gint) floor (src_y), NULL); g_list_free (src_drawables); } diff --git a/pdb/groups/paint_tools.pdb b/pdb/groups/paint_tools.pdb index 52ad2d5b27..84f29f1c55 100644 --- a/pdb/groups/paint_tools.pdb +++ b/pdb/groups/paint_tools.pdb @@ -178,15 +178,15 @@ HELP src_drawables = g_list_prepend (NULL, src_drawable); g_object_set (options, - "clone-type", clone_type, + "clone-type", clone_type, + "src-drawables", src_drawables, NULL); success = paint_tools_stroke (gimp, context, options, drawable, num_strokes, strokes, error, - "undo-desc", options->paint_info->blurb, - "src-drawables", src_drawables, - "src-x", (gint) floor (src_x), - "src-y", (gint) floor (src_y), + "undo-desc", options->paint_info->blurb, + "src-x", (gint) floor (src_x), + "src-y", (gint) floor (src_y), NULL); g_list_free (src_drawables); } @@ -540,12 +540,15 @@ HELP options = gimp_config_duplicate (GIMP_CONFIG (options)); src_drawables = g_list_prepend (NULL, src_drawable); + g_object_set (options, + "src-drawables", src_drawables, + NULL); + success = paint_tools_stroke (gimp, context, options, drawable, num_strokes, strokes, error, - "undo-desc", options->paint_info->blurb, - "src-drawables", src_drawables, - "src-x", (gint) floor (src_x), - "src-y", (gint) floor (src_y), + "undo-desc", options->paint_info->blurb, + "src-x", (gint) floor (src_x), + "src-y", (gint) floor (src_y), NULL); g_list_free (src_drawables); }