Commit 51bea46e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

handle storage of GIMP_PDB_INT32 plug-in params in GValues of type

2006-04-02  Michael Natterer  <mitch@gimp.org>

	* 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.
parent 5e69f1fc
2006-04-02 Michael Natterer <mitch@gimp.org>
* 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 <edhel@gimp.org>
* app/tools/gimprectangletool.c: square constraint with shift key.
......
......@@ -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",
......
......@@ -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))
......
......@@ -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)' }
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment