2.99 libgimp: add GimpResource, GimpBrush, GimpPropWidgetBrush

So procedures can declare args and GimpProcedureDialog show chooser
widgets

Fix so is no error dialog on id_is_valid for resources

Palette.pdb changes and testing

Memory mgt changes

Gradient pdb

Font and Pattern tests

Test  brush, palette

Cleanup, remove generator

Rebase, edit docs, install test-dialog.py

Whitespace, and fix failed distcheck

Fix some clang-format, fix fail distcheck

Fix distcheck

Cleanup from review Jehan
This commit is contained in:
lloyd konneker
2022-09-05 19:28:35 -04:00
committed by Jehan
parent 60fa18137d
commit d720375e97
74 changed files with 8517 additions and 4270 deletions

View File

@ -374,14 +374,13 @@ script_fu_arg_get_param_spec (SFArg *arg,
break;
case SF_BRUSH:
/* FUTURE: brush object has more fields.
* ?? Implement gimp_param_spec_brush
*/
pspec = g_param_spec_string (name,
nick,
arg->label,
arg->default_value.sfa_brush.name,
G_PARAM_READWRITE);
/* FIXME: SF-BRUSH will not have opacity, etc. instead gimp_brush_select will choose only brush. */
/* FIXME: font, etc. are resource types. Brush is just the test for WIP. */
pspec = gimp_param_spec_brush (name,
nick,
arg->label,
FALSE, /* none OK */
G_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE);
break;
case SF_ADJUSTMENT:
@ -569,10 +568,22 @@ script_fu_arg_append_repr_from_gvalue (SFArg *arg,
case SF_PALETTE:
case SF_PATTERN:
case SF_GRADIENT:
case SF_BRUSH:
g_string_append_printf (result_string, "\"%s\"", g_value_get_string (gvalue));
break;
case SF_BRUSH:
{
/* The GValue is a GObject of type GimpBrush having property "id" */
GimpBrush *brush;
gchar *brush_name;
brush = g_value_get_object (gvalue);
g_object_get (brush, "id", &brush_name, NULL);
g_string_append_printf (result_string, "\"%s\"", brush_name);
}
break;
case SF_OPTION:
append_int_repr_from_gvalue (result_string, gvalue);
break;