Move GimpParamSpecString from libgimp back to app

It's just too weird to be public. Remove its properties from the wire
protocol and from pluginrc. Instead, have all GParamSpecs' flags on
the wire and in pluginrc, so we can use stuff like
GIMP_PARAM_NO_VALIDATE.

Port the remaining few places to GIMP_PROC_ARG_STRING().

I'm sure something is broken now wrt UTF-8 validation,
will add tighter checks in the next commit.
This commit is contained in:
Michael Natterer 2019-08-19 12:54:52 +02:00
parent de121374ef
commit d62e75a41f
28 changed files with 383 additions and 458 deletions

View file

@ -46,7 +46,9 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
const gchar *name = param_def->name;
const gchar *nick = param_def->nick;
const gchar *blurb = param_def->blurb;
GParamFlags flags = G_PARAM_READWRITE;
GParamFlags flags = param_def->flags;
flags &= ~G_PARAM_STATIC_STRINGS;
switch (param_def->param_def_type)
{
@ -137,14 +139,10 @@ _gimp_gp_param_def_to_param_spec (gpointer gimp,
break;
case GP_PARAM_DEF_TYPE_STRING:
if (! strcmp (param_def->type_name, "GimpParamString") ||
! strcmp (param_def->type_name, "GParamString"))
return gimp_param_spec_string (name, nick, blurb,
param_def->meta.m_string.allow_non_utf8,
param_def->meta.m_string.null_ok,
param_def->meta.m_string.non_empty,
param_def->meta.m_string.default_val,
flags);
if (! strcmp (param_def->type_name, "GParamString"))
return g_param_spec_string (name, nick, blurb,
param_def->meta.m_string.default_val,
flags);
break;
case GP_PARAM_DEF_TYPE_COLOR: