diff --git a/ChangeLog b/ChangeLog index 156807a9f1..183623f4ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-04-02 Michael Natterer + + * app/plug-in/plug-in-params.c: handle storage of GIMP_PDB_INT32 + plug-in params in GValues of type G_TYPE_UINT, they are used for + guides and tattoos. + + * tools/pdbgen/pdb/guides.pdb (image_find_next_guide): don't + validate the "guide" parameter, because 0 is an allowed value + here. + + * app/pdb/guides_cmds.c: regenerated. + 2006-04-02 Karine Delvare * app/tools/gimprectangletool.c: square constraint with shift key. diff --git a/app/pdb/guides_cmds.c b/app/pdb/guides_cmds.c index 198f54af63..8e0d358ea9 100644 --- a/app/pdb/guides_cmds.c +++ b/app/pdb/guides_cmds.c @@ -136,7 +136,7 @@ register_guides_procs (Gimp *gimp) "guide", "The ID of the current guide (0 if first invocation)", 1, G_MAXUINT32, 1, - GIMP_PARAM_READWRITE)); + GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE)); gimp_procedure_add_return_value (procedure, GIMP_PDB_INT32, g_param_spec_uint ("next-guide", diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index e26d00676d..14f34429b9 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -76,6 +76,8 @@ plug_in_params_to_args (GimpArgumentSpec *proc_args, case GIMP_PDB_INT32: if (G_VALUE_HOLDS_INT (value)) g_value_set_int (value, params[i].data.d_int32); + else if (G_VALUE_HOLDS_UINT (value)) + g_value_set_uint (value, params[i].data.d_int32); else if (G_VALUE_HOLDS_ENUM (value)) g_value_set_enum (value, params[i].data.d_int32); else if (G_VALUE_HOLDS_BOOLEAN (value)) @@ -249,6 +251,8 @@ plug_in_args_to_params (GimpArgument *args, case GIMP_PDB_INT32: if (G_VALUE_HOLDS_INT (value)) params[i].data.d_int32 = g_value_get_int (value); + else if (G_VALUE_HOLDS_UINT (value)) + params[i].data.d_int32 = g_value_get_uint (value); else if (G_VALUE_HOLDS_ENUM (value)) params[i].data.d_int32 = g_value_get_enum (value); else if (G_VALUE_HOLDS_BOOLEAN (value)) diff --git a/tools/pdbgen/pdb/guides.pdb b/tools/pdbgen/pdb/guides.pdb index 7a42ea51e4..d00255958f 100644 --- a/tools/pdbgen/pdb/guides.pdb +++ b/tools/pdbgen/pdb/guides.pdb @@ -143,7 +143,7 @@ HELP @inargs = ( { name => 'image', type => 'image', desc => 'The image' }, - { name => 'guide', type => 'guide', + { name => 'guide', type => 'guide', no_success => 1, desc => 'The ID of the current guide (0 if first invocation)' } );