mirror of https://github.com/GNOME/gimp.git
added "gboolean none_ok" members to GimpParamSpecImageID,
2006-05-06 Michael Natterer <mitch@gimp.org> * app/core/gimpparamspecs.[ch]: added "gboolean none_ok" members to GimpParamSpecImageID, GimpParamSpecItemID and GimpParamSpecDisplayID. If none_ok is set, allow '0' and '-1' as valid IDs. Added "none_ok" parameter to all ID param spec constructors. * app/xcf/xcf.c: require real image IDs, but allow images without active drawable. * app/pdb/gimp-pdb-compat.c: set none_ok to TRUE in all compat param specs, so only IDs that are really random garbage don't pass validation. Fixes validation errors with 0 and -1 IDs. * tools/pdbgen/app.pl: set none_ok to FALSE by default. Added support for $arg->{none_ok} to control it. * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/progress.pdb * tools/pdbgen/pdb/text_tool.pdb: use none_ok instead of no_success (which disables validation entirely). * app/pdb/[many]_cmds.c: regenerated.
This commit is contained in:
parent
66a66b3218
commit
549df3a0df
|
@ -6,6 +6,9 @@
|
|||
valid IDs. Added "none_ok" parameter to all ID param spec
|
||||
constructors.
|
||||
|
||||
* app/xcf/xcf.c: require real image IDs, but allow images without
|
||||
active drawable.
|
||||
|
||||
* app/pdb/gimp-pdb-compat.c: set none_ok to TRUE in all compat
|
||||
param specs, so only IDs that are really random garbage don't pass
|
||||
validation. Fixes validation errors with 0 and -1 IDs.
|
||||
|
|
|
@ -174,13 +174,13 @@ xcf_init (Gimp *gimp)
|
|||
gimp_param_spec_image_id ("image",
|
||||
"Image",
|
||||
"Input image",
|
||||
gimp,
|
||||
gimp, FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_drawable_id ("drawable",
|
||||
"Drawable",
|
||||
"Active drawable of input image",
|
||||
gimp,
|
||||
gimp, TRUE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_procedure_add_argument (procedure,
|
||||
gimp_param_spec_string ("filename",
|
||||
|
@ -258,7 +258,7 @@ xcf_init (Gimp *gimp)
|
|||
gimp_param_spec_image_id ("image",
|
||||
"Image",
|
||||
"Output image",
|
||||
gimp,
|
||||
gimp, FALSE,
|
||||
GIMP_PARAM_READWRITE));
|
||||
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
|
||||
g_object_unref (procedure);
|
||||
|
|
Loading…
Reference in New Issue