mirror of https://github.com/GNOME/gimp.git
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:
parent
048b2c437d
commit
318342039d
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue