app: gimp_param_spec_duplicate(): don't warn

about unsupported GParamSpecs, simply return NULL and move the warning
to the only caller instead.
This commit is contained in:
Michael Natterer 2019-09-14 12:23:13 +02:00
parent 3f84fbee1e
commit f73f813e1f
2 changed files with 8 additions and 10 deletions

View File

@ -244,16 +244,6 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
&gimp_color,
flags);
}
else if (G_IS_PARAM_SPEC_OBJECT (pspec) ||
G_IS_PARAM_SPEC_POINTER (pspec))
{
/* silently ignore object properties */
}
else
{
g_warning ("%s: not supported: %s (%s)\n", G_STRFUNC,
g_type_name (G_TYPE_FROM_INSTANCE (pspec)), pspec->name);
}
if (copy)
{

View File

@ -192,6 +192,14 @@ gimp_operation_config_class_init (GObjectClass *klass,
{
g_object_class_install_property (klass, i + 1, copy);
}
else if (! G_IS_PARAM_SPEC_OBJECT (pspec) &&
! G_IS_PARAM_SPEC_POINTER (pspec))
{
/* silently ignore object properties */
g_warning ("%s: not supported: %s (%s)\n", G_STRFUNC,
g_type_name (G_TYPE_FROM_INSTANCE (pspec)), pspec->name);
}
}
}