Commit Graph

11 Commits

Author SHA1 Message Date
Jehan 318342039d Issue #11422: gimp_prop_widget_new_from_pspec: not supported: GeglParamColor
In all core code, transform GeglParamColor to GimpParamColor with alpha.
2024-08-02 18:44:00 +02:00
Jehan 75dd13981a libgimpconfig: more param spec types to ignore (GeglParamFormat). 2022-10-26 23:29:32 +02:00
Jehan e5d5be4277 Issue #8062: error when offsetting a layer. 2022-10-26 23:10:51 +02:00
Jehan e7a7edd29c libgimpconfig: fix gimp_config_param_spec_duplicate() for objects and…
… object arrays.

We were not supporting duplicating object pspec for no good reason. Well
maybe the reason was that libgimpconfig does not see these types which
are in libgimp. But then the trick is to compare by name.

As for object array, they are present as subtypes of GimpArray specs.
Yet most GimpParamSpec*Array-s are subclass of GimpParamSpecArray but
GimpParamSpecObjectArray are their own GParamSpecBoxed subclass (same as
the Gimp*Array-s are just typedef-s of GimpArray but GimpObjectArray is
its own boxed type).
So I had to move the object array test as its own case to fix support.

Finally do not ignore anymore any type in gimp_config_class_init(). When
we create a GimpConfig, we want to know when a type is not implemented
as parameter (and if it's a well known type, we need to implement it).
2022-02-11 17:31:30 +01:00
Jehan 353c73457a app, libgimp, libgimpconfig, extensions: image procedures now with…
… drawable array instead of a single drawable.

Instead of expecting a single drawable, GimpImageProcedure's run()
function will now have an array of drawable as parameter.
As a consequence, all existing plug-ins are broken again. I am going to
fix them in the next commit so that this change can be easily reviewed
and examined if needed later.

I only fix the Vala demo plug-in now (or rather, I just use the first
layer in the array for now) because otherwise the build fails.
2021-04-04 01:40:00 +02:00
Niels De Graef 9c9e310a67 gir: Add missing annotations
Otherwise we won't be able to generate proper API for our bindings
2020-05-04 02:11:57 +02:00
Ell 46df3642d2 libgimpconfig: in gimp_config_type_register(), don't override GimpConfig::equal()
gimp_config_type_register() currently overrides GimpConfig::equal()
to only compare the properties of the most-derived type.  However,
this prevents the properties of GimpOperationSettings from being
considered during comparison of operation-config objects.  Instead,
don't override GimpConfig::equal(), and rely on
GIMP_CONFIG_PARAM_DONT_COMPARE to exclude specific base-class
properties from comparison.
2020-04-08 00:22:49 +03:00
Ell 3d30a036de libgimpconfig: relax precondition check in gimp_config_type_register()
Allow passing a non-NULL `pspecs` with `n_pspecs == 0` to
gimp_config_type_register(), in particular since
g_object_class_list_properties() may return such values.
2019-09-23 18:22:19 +03:00
Michael Natterer 31bf04a610 libgimpconfig: fix precondition checks in gimp_config_type_register()
check for zero pspecs or more than zero pspecs, but consistently check
both pspecs and n_pspecs.
2019-09-20 00:35:56 +02:00
Jehan 5c7d6da1c3 libgimpconfig: allow gimp_config_type_register() with 0 pspecs.
There is at least one valid case of a config type registration with no
parameters: when registering the gegl:nop operation. This is the default
case when running the GEGL operation tool. See implementation of
gimp_filter_tool_get_operation().
Therefore we ended up crashing GIMP just by calling this tool.
2019-09-17 12:55:04 +02:00
Michael Natterer 3598722020 libgimpconfig: add gimp_config_type_register()
which implements a generalized (not GEGL operation specific) version
of the dynamic config type creation code from gimp-operation-config.c.
2019-09-16 10:48:32 +02:00