mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
5e69f1fc12
commit
51bea46e8e
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
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>
|
2006-04-02 Karine Delvare <edhel@gimp.org>
|
||||||
|
|
||||||
* app/tools/gimprectangletool.c: square constraint with shift key.
|
* app/tools/gimprectangletool.c: square constraint with shift key.
|
||||||
|
|
|
@ -136,7 +136,7 @@ register_guides_procs (Gimp *gimp)
|
||||||
"guide",
|
"guide",
|
||||||
"The ID of the current guide (0 if first invocation)",
|
"The ID of the current guide (0 if first invocation)",
|
||||||
1, G_MAXUINT32, 1,
|
1, G_MAXUINT32, 1,
|
||||||
GIMP_PARAM_READWRITE));
|
GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
|
||||||
gimp_procedure_add_return_value (procedure,
|
gimp_procedure_add_return_value (procedure,
|
||||||
GIMP_PDB_INT32,
|
GIMP_PDB_INT32,
|
||||||
g_param_spec_uint ("next-guide",
|
g_param_spec_uint ("next-guide",
|
||||||
|
|
|
@ -76,6 +76,8 @@ plug_in_params_to_args (GimpArgumentSpec *proc_args,
|
||||||
case GIMP_PDB_INT32:
|
case GIMP_PDB_INT32:
|
||||||
if (G_VALUE_HOLDS_INT (value))
|
if (G_VALUE_HOLDS_INT (value))
|
||||||
g_value_set_int (value, params[i].data.d_int32);
|
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))
|
else if (G_VALUE_HOLDS_ENUM (value))
|
||||||
g_value_set_enum (value, params[i].data.d_int32);
|
g_value_set_enum (value, params[i].data.d_int32);
|
||||||
else if (G_VALUE_HOLDS_BOOLEAN (value))
|
else if (G_VALUE_HOLDS_BOOLEAN (value))
|
||||||
|
@ -249,6 +251,8 @@ plug_in_args_to_params (GimpArgument *args,
|
||||||
case GIMP_PDB_INT32:
|
case GIMP_PDB_INT32:
|
||||||
if (G_VALUE_HOLDS_INT (value))
|
if (G_VALUE_HOLDS_INT (value))
|
||||||
params[i].data.d_int32 = g_value_get_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))
|
else if (G_VALUE_HOLDS_ENUM (value))
|
||||||
params[i].data.d_int32 = g_value_get_enum (value);
|
params[i].data.d_int32 = g_value_get_enum (value);
|
||||||
else if (G_VALUE_HOLDS_BOOLEAN (value))
|
else if (G_VALUE_HOLDS_BOOLEAN (value))
|
||||||
|
|
|
@ -143,7 +143,7 @@ HELP
|
||||||
@inargs = (
|
@inargs = (
|
||||||
{ name => 'image', type => 'image',
|
{ name => 'image', type => 'image',
|
||||||
desc => 'The 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)' }
|
desc => 'The ID of the current guide (0 if first invocation)' }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue