mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
Issue #11422: gimp_prop_widget_new_from_pspec: not supported: GeglParamColor
In all core code, transform GeglParamColor to GimpParamColor with alpha.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "libgimpbase/gimpbase.h"
|
||||
#include "libgimpcolor/gimpcolor.h"
|
||||
#include "libgimpconfig/gimpconfig.h"
|
||||
|
||||
#include "operations-types.h"
|
||||
@@ -150,7 +151,20 @@ gimp_operation_config_get_type (Gimp *gimp,
|
||||
strcmp (pspec->name, "input") &&
|
||||
strcmp (pspec->name, "output"))
|
||||
{
|
||||
pspecs[j] = pspec;
|
||||
if (GEGL_IS_PARAM_SPEC_COLOR (pspec))
|
||||
/* As special exception, let's transform GeglParamColor
|
||||
* into GimpParamColor in all core code. This way, we
|
||||
* have one less param type to handle.
|
||||
*/
|
||||
pspecs[j] = gimp_param_spec_color (pspec->name,
|
||||
g_param_spec_get_nick (pspec),
|
||||
g_param_spec_get_blurb (pspec),
|
||||
TRUE,
|
||||
gegl_param_spec_color_get_default (pspec),
|
||||
pspec->flags);
|
||||
else
|
||||
pspecs[j] = pspec;
|
||||
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
@@ -142,6 +142,11 @@ gimp_config_class_init (GObjectClass *klass,
|
||||
if (copy)
|
||||
{
|
||||
g_object_class_install_property (klass, i + 1, copy);
|
||||
/* If the original param spec was floating, this would unref
|
||||
* it. Otherwise (e.g. it's a spec taken from another object),
|
||||
* nothing happens.
|
||||
*/
|
||||
g_param_spec_sink (pspec);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user