Issue #10885: gimp-palette-get-colors warning and critical.

We were missing GimpColorArray support in one function. Note that the specific
example in Python in #10885 still doesn't work, but for a second reason:
gimp_value_array_index() returns a GValue which pygobject automatically tries to
transform to the contained data. And unfortunately it doesn't know about our
GimpColorArray type so we end with unusable boxed type generic data.
This commit is contained in:
Jehan 2024-02-27 22:31:15 +01:00
parent d9c440614b
commit 71d03d5828

View file

@ -72,6 +72,10 @@ _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def)
! strcmp (param_def->value_type_name, "GBytes"))
return g_param_spec_boxed (name, nick, blurb, G_TYPE_BYTES, flags);
if (! strcmp (param_def->type_name, "GParamBoxed") &&
! strcmp (param_def->value_type_name, "GimpColorArray"))
return g_param_spec_boxed (name, nick, blurb, GIMP_TYPE_COLOR_ARRAY, flags);
break;
case GP_PARAM_DEF_TYPE_CHOICE: