diff --git a/app/pdb/drawable-filter-cmds.c b/app/pdb/drawable-filter-cmds.c index 236a36d5e1..c6cfe11ab6 100644 --- a/app/pdb/drawable-filter-cmds.c +++ b/app/pdb/drawable-filter-cmds.c @@ -883,22 +883,14 @@ drawable_filter_operation_get_pspecs_invoker (GimpProcedure *procedure, { GParamSpec *pspec = specs[n_parent_specs + i]; GPParamDef param_def = { 0, }; + GValue value = G_VALUE_INIT; + + g_value_init (&value, G_TYPE_PARAM); /* Make sure we do not try to send param specs over the wire * if we don't support sending their type. */ - if (_gimp_param_spec_to_gp_param_def (pspec, ¶m_def, TRUE)) - { - GValue value = G_VALUE_INIT; - - g_value_init (&value, G_TYPE_PARAM); - - g_value_set_param (&value, g_param_spec_ref (pspec)); - gimp_value_array_append (pspecs, &value); - - g_value_unset (&value); - } - else + if (! _gimp_param_spec_to_gp_param_def (pspec, ¶m_def, TRUE)) { /* This is not technically a bug if an operation has * unsupported argument types, because we cannot possibly @@ -909,11 +901,27 @@ drawable_filter_operation_get_pspecs_invoker (GimpProcedure *procedure, * want to softly notify developers, in case we can * actually do something about some types. */ - g_printerr ("%s: ignoring argument '%s' of procedure '%s'. " + g_printerr ("%s: replacing argument '%s' of procedure '%s' with a placeholder. " "Unsupported argument type '%s'.\n", G_STRFUNC, pspec->name, operation_name, g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec))); + + g_value_set_param (&value, g_param_spec_param ( + "unknown", "Unknown", + g_strdup_printf ("placeholder for unsupported type:%s:%s:%s", + pspec->name, + g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), + g_param_spec_get_blurb (pspec)), + G_TYPE_PARAM, G_PARAM_READABLE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } + else + { + g_value_set_param (&value, g_param_spec_ref (pspec)); + } + + gimp_value_array_append (pspecs, &value); + + g_value_unset (&value); } g_free (specs); diff --git a/pdb/groups/drawable_filter.pdb b/pdb/groups/drawable_filter.pdb index 2f5570b55c..e8201d07ce 100644 --- a/pdb/groups/drawable_filter.pdb +++ b/pdb/groups/drawable_filter.pdb @@ -849,22 +849,14 @@ HELP { GParamSpec *pspec = specs[n_parent_specs + i]; GPParamDef param_def = { 0, }; + GValue value = G_VALUE_INIT; + + g_value_init (&value, G_TYPE_PARAM); /* Make sure we do not try to send param specs over the wire * if we don't support sending their type. */ - if (_gimp_param_spec_to_gp_param_def (pspec, ¶m_def, TRUE)) - { - GValue value = G_VALUE_INIT; - - g_value_init (&value, G_TYPE_PARAM); - - g_value_set_param (&value, g_param_spec_ref (pspec)); - gimp_value_array_append (pspecs, &value); - - g_value_unset (&value); - } - else + if (! _gimp_param_spec_to_gp_param_def (pspec, ¶m_def, TRUE)) { /* This is not technically a bug if an operation has * unsupported argument types, because we cannot possibly @@ -875,11 +867,27 @@ HELP * want to softly notify developers, in case we can * actually do something about some types. */ - g_printerr ("%s: ignoring argument '%s' of procedure '%s'. " + g_printerr ("%s: replacing argument '%s' of procedure '%s' with a placeholder. " "Unsupported argument type '%s'.\n", G_STRFUNC, pspec->name, operation_name, g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec))); + + g_value_set_param (&value, g_param_spec_param ( + "unknown", "Unknown", + g_strdup_printf ("placeholder for unsupported type:%s:%s:%s", + pspec->name, + g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), + g_param_spec_get_blurb (pspec)), + G_TYPE_PARAM, G_PARAM_READABLE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); } + else + { + g_value_set_param (&value, g_param_spec_ref (pspec)); + } + + gimp_value_array_append (pspecs, &value); + + g_value_unset (&value); } g_free (specs);