[gimp] plug-ins: fix various plug-ins ported to GimpImageProcedure.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix various plug-ins ported to GimpImageProcedure.
- Date: Sun, 18 Aug 2019 20:29:04 +0000 (UTC)
commit 4799619bbc427bbc3b002b278daab14e2f50618f
Author: Jehan <jehan girinstud io>
Date: Sun Aug 18 22:26:33 2019 +0200
plug-ins: fix various plug-ins ported to GimpImageProcedure.
All the GimpImageProcedure must remap the order of their additional
arguments (i.e. subtracts 3).
This fixes the other plug-ins changed in commit 15019fef52 which had
such additional arguments.
plug-ins/common/colormap-remap.c | 8 +++---
plug-ins/common/film.c | 18 ++++++-------
plug-ins/common/mail.c | 10 ++++----
plug-ins/fractal-explorer/fractal-explorer.c | 38 ++++++++++++++--------------
4 files changed, 37 insertions(+), 37 deletions(-)
---
diff --git a/plug-ins/common/colormap-remap.c b/plug-ins/common/colormap-remap.c
index 49e88b6521..99662955ff 100644
--- a/plug-ins/common/colormap-remap.c
+++ b/plug-ins/common/colormap-remap.c
@@ -229,8 +229,8 @@ remap_run (GimpProcedure *procedure,
g_free (gimp_image_get_colormap (image_id, &n_cols));
- n_col_args = g_value_get_int (gimp_value_array_index (args, 3));
- col_args = gimp_value_get_uint8_array (gimp_value_array_index (args, 4));
+ n_col_args = g_value_get_int (gimp_value_array_index (args, 0));
+ col_args = gimp_value_get_uint8_array (gimp_value_array_index (args, 1));
switch (run_mode)
{
@@ -270,8 +270,8 @@ remap_run (GimpProcedure *procedure,
else if (strcmp (gimp_procedure_get_name (procedure),
PLUG_IN_PROC_SWAP) == 0)
{
- guchar index1 = g_value_get_uchar (gimp_value_array_index (args, 3));
- guchar index2 = g_value_get_uchar (gimp_value_array_index (args, 4));
+ guchar index1 = g_value_get_uchar (gimp_value_array_index (args, 0));
+ guchar index2 = g_value_get_uchar (gimp_value_array_index (args, 1));
guchar tmp;
gint n_cols;
diff --git a/plug-ins/common/film.c b/plug-ins/common/film.c
index f1aeef0ddb..1ae2b69bae 100644
--- a/plug-ins/common/film.c
+++ b/plug-ins/common/film.c
@@ -334,7 +334,7 @@ film_run (GimpProcedure *procedure,
break;
case GIMP_RUN_NONINTERACTIVE:
- filmvals.film_height = g_value_get_int (gimp_value_array_index (args, 3));
+ filmvals.film_height = g_value_get_int (gimp_value_array_index (args, 0));
if (filmvals.film_height <= 0)
{
filmvals.keep_height = TRUE;
@@ -344,19 +344,19 @@ film_run (GimpProcedure *procedure,
{
filmvals.keep_height = FALSE;
}
- gimp_value_get_rgb (gimp_value_array_index (args, 4),
+ gimp_value_get_rgb (gimp_value_array_index (args, 1),
&filmvals.film_color);
- filmvals.number_start = g_value_get_int (gimp_value_array_index (args, 5));
+ filmvals.number_start = g_value_get_int (gimp_value_array_index (args, 2));
g_strlcpy (filmvals.number_font,
- g_value_get_string (gimp_value_array_index (args, 6)),
+ g_value_get_string (gimp_value_array_index (args, 3)),
FONT_LEN);
- gimp_value_get_rgb (gimp_value_array_index (args, 7),
+ gimp_value_get_rgb (gimp_value_array_index (args, 4),
&filmvals.number_color);
- filmvals.number_pos[0] = g_value_get_int (gimp_value_array_index (args, 8));
- filmvals.number_pos[1] = g_value_get_int (gimp_value_array_index (args, 9));
- filmvals.num_images = g_value_get_int (gimp_value_array_index (args, 10));
+ filmvals.number_pos[0] = g_value_get_int (gimp_value_array_index (args, 5));
+ filmvals.number_pos[1] = g_value_get_int (gimp_value_array_index (args, 6));
+ filmvals.num_images = g_value_get_int (gimp_value_array_index (args, 7));
memcpy (filmvals.image,
- gimp_value_get_int32_array (gimp_value_array_index (args, 11)),
+ gimp_value_get_int32_array (gimp_value_array_index (args, 8)),
filmvals.num_images * sizeof (gint32));
break;
diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c
index 065a0030d2..d49b47d3bf 100644
--- a/plug-ins/common/mail.c
+++ b/plug-ins/common/mail.c
@@ -288,19 +288,19 @@ mail_run (GimpProcedure *procedure,
case GIMP_RUN_NONINTERACTIVE:
g_strlcpy (mail_info.filename,
- g_value_get_string (gimp_value_array_index (args, 3)),
+ g_value_get_string (gimp_value_array_index (args, 0)),
BUFFER_SIZE);
g_strlcpy (mail_info.receipt,
- g_value_get_string (gimp_value_array_index (args, 4)),
+ g_value_get_string (gimp_value_array_index (args, 1)),
BUFFER_SIZE);
g_strlcpy (mail_info.from,
- g_value_get_string (gimp_value_array_index (args, 5)),
+ g_value_get_string (gimp_value_array_index (args, 2)),
BUFFER_SIZE);
g_strlcpy (mail_info.subject,
- g_value_get_string (gimp_value_array_index (args, 6)),
+ g_value_get_string (gimp_value_array_index (args, 3)),
BUFFER_SIZE);
g_strlcpy (mail_info.comment,
- g_value_get_string (gimp_value_array_index (args, 7)),
+ g_value_get_string (gimp_value_array_index (args, 4)),
BUFFER_SIZE);
break;
diff --git a/plug-ins/fractal-explorer/fractal-explorer.c b/plug-ins/fractal-explorer/fractal-explorer.c
index dece1eb8a6..a54602c366 100644
--- a/plug-ins/fractal-explorer/fractal-explorer.c
+++ b/plug-ins/fractal-explorer/fractal-explorer.c
@@ -450,25 +450,25 @@ explorer_run (GimpProcedure *procedure,
break;
case GIMP_RUN_NONINTERACTIVE:
- wvals.fractaltype = g_value_get_int (gimp_value_array_index (args, 3));
- wvals.xmin = g_value_get_double (gimp_value_array_index (args, 4));
- wvals.xmax = g_value_get_double (gimp_value_array_index (args, 5));
- wvals.ymin = g_value_get_double (gimp_value_array_index (args, 6));
- wvals.ymax = g_value_get_double (gimp_value_array_index (args, 7));
- wvals.iter = g_value_get_double (gimp_value_array_index (args, 8));
- wvals.cx = g_value_get_double (gimp_value_array_index (args, 9));
- wvals.cy = g_value_get_double (gimp_value_array_index (args, 10));
- wvals.colormode = g_value_get_int (gimp_value_array_index (args, 11));
- wvals.redstretch = g_value_get_double (gimp_value_array_index (args, 12));
- wvals.greenstretch = g_value_get_double (gimp_value_array_index (args, 13));
- wvals.bluestretch = g_value_get_double (gimp_value_array_index (args, 14));
- wvals.redmode = g_value_get_int (gimp_value_array_index (args, 15));
- wvals.greenmode = g_value_get_int (gimp_value_array_index (args, 16));
- wvals.bluemode = g_value_get_int (gimp_value_array_index (args, 17));
- wvals.redinvert = g_value_get_int (gimp_value_array_index (args, 18));
- wvals.greeninvert = g_value_get_int (gimp_value_array_index (args, 19));
- wvals.blueinvert = g_value_get_int (gimp_value_array_index (args, 20));
- wvals.ncolors = g_value_get_int (gimp_value_array_index (args, 21));
+ wvals.fractaltype = g_value_get_int (gimp_value_array_index (args, 0));
+ wvals.xmin = g_value_get_double (gimp_value_array_index (args, 1));
+ wvals.xmax = g_value_get_double (gimp_value_array_index (args, 2));
+ wvals.ymin = g_value_get_double (gimp_value_array_index (args, 3));
+ wvals.ymax = g_value_get_double (gimp_value_array_index (args, 4));
+ wvals.iter = g_value_get_double (gimp_value_array_index (args, 5));
+ wvals.cx = g_value_get_double (gimp_value_array_index (args, 6));
+ wvals.cy = g_value_get_double (gimp_value_array_index (args, 7));
+ wvals.colormode = g_value_get_int (gimp_value_array_index (args, 8));
+ wvals.redstretch = g_value_get_double (gimp_value_array_index (args, 9));
+ wvals.greenstretch = g_value_get_double (gimp_value_array_index (args, 10));
+ wvals.bluestretch = g_value_get_double (gimp_value_array_index (args, 11));
+ wvals.redmode = g_value_get_int (gimp_value_array_index (args, 12));
+ wvals.greenmode = g_value_get_int (gimp_value_array_index (args, 13));
+ wvals.bluemode = g_value_get_int (gimp_value_array_index (args, 14));
+ wvals.redinvert = g_value_get_int (gimp_value_array_index (args, 15));
+ wvals.greeninvert = g_value_get_int (gimp_value_array_index (args, 16));
+ wvals.blueinvert = g_value_get_int (gimp_value_array_index (args, 17));
+ wvals.ncolors = g_value_get_int (gimp_value_array_index (args, 18));
make_color_map ();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]