Revert "PDB: fix #14205 image-find-next-sample-point error"

This reverts commit 69894d8bbf.

Let's not randomly make our API less strict on types as a workaround for
a bug. If there are specific cases where it's needed to accept 0, then
these are the cases we have to handle.

Also unlike what the commit message was saying, it's not true that this
was only affecting Script-Fu. Any change to the PDB affects by
definition the whole PDB, as well as libgimp and all bindings (over PDB
or libgimp alike). And yes, this change **was** of "real consequence".

I'll do further commits for the proper fixes to #14205.
This commit is contained in:
Jehan 2025-06-12 12:15:41 +02:00
parent d86b26dc4b
commit 2d2f1d048d
5 changed files with 21 additions and 21 deletions

View file

@ -5439,7 +5439,7 @@ register_image_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo-state",
"tattoo state",
"The tattoo state",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -5468,7 +5468,7 @@ register_image_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo-state",
"tattoo state",
"The new image tattoo state",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -5497,7 +5497,7 @@ register_image_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo",
"tattoo",
"The tattoo of the layer to find",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_layer ("layer",
@ -5532,7 +5532,7 @@ register_image_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo",
"tattoo",
"The tattoo of the channel to find",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_channel ("channel",
@ -5567,7 +5567,7 @@ register_image_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo",
"tattoo",
"The tattoo of the path to find",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_path ("path",

View file

@ -296,7 +296,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("guide",
"guide",
"The new guide",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -331,7 +331,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("guide",
"guide",
"The new guide",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -360,7 +360,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("guide",
"guide",
"The ID of the guide to be removed",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -395,7 +395,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("next-guide",
"next guide",
"The next guide's ID",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -424,7 +424,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("guide",
"guide",
"The guide",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_enum ("orientation",
@ -462,7 +462,7 @@ register_image_guides_procs (GimpPDB *pdb)
g_param_spec_uint ("guide",
"guide",
"The guide",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("position",

View file

@ -240,7 +240,7 @@ register_image_sample_points_procs (GimpPDB *pdb)
g_param_spec_uint ("sample-point",
"sample point",
"The new sample point",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -269,7 +269,7 @@ register_image_sample_points_procs (GimpPDB *pdb)
g_param_spec_uint ("sample-point",
"sample point",
"The ID of the sample point to be removed",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -298,13 +298,13 @@ register_image_sample_points_procs (GimpPDB *pdb)
g_param_spec_uint ("sample-point",
"sample point",
"The ID of the current sample point (0 if first invocation)",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
gimp_procedure_add_return_value (procedure,
g_param_spec_uint ("next-sample-point",
"next sample point",
"The next sample point's ID",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -333,7 +333,7 @@ register_image_sample_points_procs (GimpPDB *pdb)
g_param_spec_uint ("sample-point",
"sample point",
"The guide",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_int ("position-x",

View file

@ -1919,7 +1919,7 @@ register_item_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo",
"tattoo",
"The item tattoo",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
@ -1948,7 +1948,7 @@ register_item_procs (GimpPDB *pdb)
g_param_spec_uint ("tattoo",
"tattoo",
"The new item tattoo",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);

View file

@ -467,7 +467,7 @@ CODE
g_param_spec_uint ("$name",
"$nick",
"$blurb",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
$flags)
CODE
}
@ -476,7 +476,7 @@ CODE
g_param_spec_uint ("$name",
"$nick",
"$blurb",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
$flags)
CODE
}
@ -485,7 +485,7 @@ CODE
g_param_spec_uint ("$name",
"$nick",
"$blurb",
0, G_MAXUINT32, 1,
1, G_MAXUINT32, 1,
$flags)
CODE
}