[gimp] plug-ins: fix file-gih.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix file-gih.
- Date: Thu, 14 Oct 2021 21:37:03 +0000 (UTC)
commit d47fc1372de8ca6e9deff79594b4443374c96bc0
Author: Jehan <jehan girinstud io>
Date: Thu Oct 14 23:33:28 2021 +0200
plug-ins: fix file-gih.
We currently cannot call gimp_pdb_run_procedure() for procedures
containing arrays because this C-type doesn't contain the size
information (which is in a second parameter but since the rule is not
hard-coded, our API can't know this).
See issue #7369.
plug-ins/common/file-gih.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index 2f6062a973..e1cf17175e 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -447,21 +447,27 @@ gih_save (GimpProcedure *procedure,
GimpValueArray *save_retvals;
gchar spacing[8];
gchar *paramstring;
+ GimpValueArray *args;
paramstring = gimp_pixpipe_params_build (&gihparams);
- save_retvals =
- gimp_pdb_run_procedure (gimp_get_pdb (),
- "file-gih-save-internal",
- GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
- GIMP_TYPE_IMAGE, image,
- G_TYPE_INT, n_drawables,
- GIMP_TYPE_OBJECT_ARRAY, drawables,
- G_TYPE_FILE, file,
- G_TYPE_INT, info.spacing,
- G_TYPE_STRING, info.description,
- G_TYPE_STRING, paramstring,
- G_TYPE_NONE);
+ args = gimp_value_array_new_from_types (NULL,
+ GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
+ GIMP_TYPE_IMAGE, image,
+ G_TYPE_INT, n_drawables,
+ GIMP_TYPE_OBJECT_ARRAY, NULL,
+ G_TYPE_FILE, file,
+ G_TYPE_INT, info.spacing,
+ G_TYPE_STRING, info.description,
+ G_TYPE_STRING, paramstring,
+ G_TYPE_NONE);
+ gimp_value_set_object_array (gimp_value_array_index (args, 3),
+ GIMP_TYPE_ITEM, (GObject **) drawables, n_drawables);
+
+ save_retvals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
+ "file-gih-save-internal",
+ args);
+ gimp_value_array_unref (args);
if (GIMP_VALUES_GET_ENUM (save_retvals, 0) == GIMP_PDB_SUCCESS)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]