app: support GimpParamSpecRGB in generated GEGL UI, not only GeglParamSpecColor

This commit is contained in:
Michael Natterer 2012-05-04 23:50:02 +02:00
parent aaceaf055a
commit c16c61f458
2 changed files with 19 additions and 1 deletions

View File

@ -188,6 +188,24 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
pspec->flags |
GIMP_CONFIG_PARAM_SERIALIZE);
}
else if (GIMP_IS_PARAM_SPEC_RGB (pspec))
{
GValue value = G_VALUE_INIT;
GimpRGB color;
g_value_init (&value, GIMP_TYPE_RGB);
g_param_value_set_default (pspec, &value);
gimp_value_get_rgb (&value, &color);
g_value_unset (&value);
return gimp_param_spec_rgb (pspec->name,
g_param_spec_get_nick (pspec),
g_param_spec_get_blurb (pspec),
gimp_param_spec_rgb_has_alpha (pspec),
&color,
pspec->flags |
GIMP_CONFIG_PARAM_SERIALIZE);
}
else if (GEGL_IS_PARAM_SPEC_COLOR (pspec))
{
GeglColor *gegl_color;

View File

@ -278,7 +278,7 @@ gimp_gegl_config_proxy_sync (GimpObject *proxy,
g_object_get_property (G_OBJECT (proxy), gimp_pspec->name,
&value);
if (GIMP_IS_PARAM_SPEC_RGB (gimp_pspec))
if (GEGL_IS_PARAM_SPEC_COLOR (gegl_pspec))
{
GimpRGB gimp_color;
GeglColor *gegl_color;