Commit d6fd5506 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added "gboolean non_empty" to require the string being non-empty. Changed

2007-04-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpparamspecs.[ch] (struct GimpParamSpecString)
	(gimp_param_spec_string): added "gboolean non_empty" to require
	the string being non-empty. Changed validation accordingly.
	Also fixed validation for static strings (we were happily
	freeing and modifying them before).

	* app/xcf/xcf.c: filenames should be non-empty.
	* app/pdb/gimp-pdb-compat.c: compat strings shouldn't.

	* tools/pdbgen/app.pl: add support for $arg->{non_empty} and
	changed generation of calls to gimp_param_spec_string().

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/vectors.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/unit.pdb
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/buffer.pdb: require non-empty strings for data
	object names, procedure names, unit strings, PDB data identifiers
	and buffer names. Removed some manual strlen() checks, all other
	places just got better error reporting for free (proper validation
	error instead of unspecific execution error).

	* app/pdb/*_cmds.c: regenerated.


svn path=/trunk/; revision=22329
parent 7bf61525
2007-04-25 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch] (struct GimpParamSpecString)
(gimp_param_spec_string): added "gboolean non_empty" to require
the string being non-empty. Changed validation accordingly.
Also fixed validation for static strings (we were happily
freeing and modifying them before).
* app/xcf/xcf.c: filenames should be non-empty.
* app/pdb/gimp-pdb-compat.c: compat strings shouldn't.
* tools/pdbgen/app.pl: add support for $arg->{non_empty} and
changed generation of calls to gimp_param_spec_string().
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/vectors.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/progress.pdb
* tools/pdbgen/pdb/procedural_db.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/unit.pdb
* tools/pdbgen/pdb/brush.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/buffer.pdb: require non-empty strings for data
object names, procedure names, unit strings, PDB data identifiers
and buffer names. Removed some manual strlen() checks, all other
places just got better error reporting for free (proper validation
error instead of unspecific execution error).
* app/pdb/*_cmds.c: regenerated.
2007-04-25 Michael Natterer <mitch@gimp.org>
* plug-ins/common/gif.c
......@@ -351,6 +351,7 @@ gimp_param_string_init (GParamSpec *pspec)
sspec->no_validate = FALSE;
sspec->null_ok = FALSE;
sspec->non_empty = FALSE;
}
static gboolean
......@@ -364,10 +365,28 @@ gimp_param_string_validate (GParamSpec *pspec,
{
gchar *s;
if (sspec->non_empty && ! string[0])
{
if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
g_free (string);
else
value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
value->data[0].v_pointer = g_strdup ("none");
return TRUE;
}
if (! sspec->no_validate &&
! g_utf8_validate (string, -1, (const gchar **) &s))
{
for (; *s; s++)
if (value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)
{
value->data[0].v_pointer = g_strdup (string);
value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
string = value->data[0].v_pointer;
}
for (s = string; *s; s++)
if (*s < ' ')
*s = '?';
......@@ -376,9 +395,16 @@ gimp_param_string_validate (GParamSpec *pspec,
}
else if (! sspec->null_ok)
{
value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
value->data[0].v_pointer = g_strdup ("");
return TRUE;
}
else if (sspec->non_empty)
{
value->data[1].v_uint &= ~G_VALUE_NOCOPY_CONTENTS;
value->data[0].v_pointer = g_strdup ("none");
return TRUE;
}
return FALSE;
}
......@@ -389,11 +415,14 @@ gimp_param_spec_string (const gchar *name,
const gchar *blurb,
gboolean no_validate,
gboolean null_ok,
gboolean non_empty,
const gchar *default_value,
GParamFlags flags)
{
GimpParamSpecString *sspec;
g_return_val_if_fail (! (null_ok && non_empty), NULL);
sspec = g_param_spec_internal (GIMP_TYPE_PARAM_STRING,
name, nick, blurb, flags);
......@@ -404,6 +433,7 @@ gimp_param_spec_string (const gchar *name,
sspec->no_validate = no_validate ? TRUE : FALSE;
sspec->null_ok = null_ok ? TRUE : FALSE;
sspec->non_empty = non_empty ? TRUE : FALSE;
}
return G_PARAM_SPEC (sspec);
......
......@@ -153,6 +153,7 @@ struct _GimpParamSpecString
guint no_validate : 1;
guint null_ok : 1;
guint non_empty : 1;
};
GType gimp_param_string_get_type (void) G_GNUC_CONST;
......@@ -162,6 +163,7 @@ GParamSpec * gimp_param_spec_string (const gchar *name,
const gchar *blurb,
gboolean no_validate,
gboolean null_ok,
gboolean non_empty,
const gchar *default_value,
GParamFlags flags);
......
......@@ -56,15 +56,10 @@ brush_new_invoker (GimpProcedure *procedure,
if (success)
{
if (strlen (name))
{
GimpData *data = gimp_data_factory_data_new (gimp->brush_factory, name);
GimpData *data = gimp_data_factory_data_new (gimp->brush_factory, name);
if (data)
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (data)));
else
success = FALSE;
}
if (data)
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (data)));
else
success = FALSE;
}
......@@ -173,7 +168,7 @@ brush_rename_invoker (GimpProcedure *procedure,
GimpBrush *brush = (GimpBrush *)
gimp_container_get_child_by_name (gimp->brush_factory->container, name);
if (brush && GIMP_DATA (brush)->writable && strlen (new_name))
if (brush && GIMP_DATA (brush)->writable)
{
gimp_object_set_name (GIMP_OBJECT (brush), new_name);
actual_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (brush)));
......@@ -888,14 +883,14 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The requested name of the new brush",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The actual new brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -918,14 +913,14 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("copy-name",
"copy name",
"The name of the brush's copy",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -948,7 +943,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -977,21 +972,21 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("new-name",
"new name",
"The new name of the brush",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The actual new name of the brush",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1014,7 +1009,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1037,7 +1032,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1066,7 +1061,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1113,7 +1108,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1182,7 +1177,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1211,7 +1206,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1240,7 +1235,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1270,7 +1265,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1299,7 +1294,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1328,7 +1323,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1357,7 +1352,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1386,7 +1381,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -1415,7 +1410,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1452,7 +1447,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1487,7 +1482,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1522,7 +1517,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1557,7 +1552,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -1592,7 +1587,7 @@ register_brush_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......
......@@ -155,21 +155,21 @@ register_brush_select_procs (GimpPDB *pdb)
gimp_param_spec_string ("brush-callback",
"brush callback",
"The callback PDB proc to call when brush selection is made",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("popup-title",
"popup title",
"Title of the brush selection dialog",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("initial-brush",
"initial brush",
"The name of the brush to set as the first selected",
FALSE, TRUE,
FALSE, TRUE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -211,7 +211,7 @@ register_brush_select_procs (GimpPDB *pdb)
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this pop-up",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -234,14 +234,14 @@ register_brush_select_procs (GimpPDB *pdb)
gimp_param_spec_string ("brush-callback",
"brush callback",
"The name of the callback registered for this pop-up",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("brush-name",
"brush name",
"The name of the brush to set as selected",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......
......@@ -273,7 +273,7 @@ register_brushes_procs (GimpPDB *pdb)
gimp_param_spec_string ("filter",
"filter",
"An optional regular expression used to filter the list",
FALSE, TRUE,
FALSE, TRUE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -307,7 +307,7 @@ register_brushes_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -392,14 +392,14 @@ register_brushes_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The brush name (\"\" means current active brush)",
FALSE, TRUE,
FALSE, TRUE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("actual-name",
"actual name",
"The brush name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......
......@@ -91,7 +91,7 @@ buffer_rename_invoker (GimpProcedure *procedure,
GimpBuffer *buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
if (buffer && strlen (new_name))
if (buffer)
{
gimp_object_set_name (GIMP_OBJECT (buffer), new_name);
real_name = g_strdup (gimp_object_get_name (GIMP_OBJECT (buffer)));
......@@ -288,7 +288,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("filter",
"filter",
"An optional regular expression used to filter the list",
FALSE, TRUE,
FALSE, TRUE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -322,21 +322,21 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("new-name",
"new name",
"The buffer's new name",
FALSE, FALSE,
FALSE, FALSE, TRUE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("real-name",
"real name",
"The real name given to the buffer",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -359,7 +359,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -382,7 +382,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -411,7 +411,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -440,7 +440,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......@@ -469,7 +469,7 @@ register_buffer_procs (GimpPDB *pdb)
gimp_param_spec_string ("buffer-name",
"buffer name",
"The buffer name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......
......@@ -370,7 +370,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The channel name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
......@@ -425,7 +425,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The channel name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
......
......@@ -621,7 +621,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active paint method",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -644,7 +644,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the paint method",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -881,7 +881,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active brush",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -904,7 +904,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the brush",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -927,7 +927,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active pattern",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -950,7 +950,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the pattern",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -973,7 +973,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active gradient",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -996,7 +996,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the gradient",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1019,7 +1019,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active palette",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1042,7 +1042,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the palette",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1065,7 +1065,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the active font",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1088,7 +1088,7 @@ register_context_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The name of the font",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -275,7 +275,7 @@ register_convert_procs (GimpPDB *pdb)
gimp_param_spec_string ("palette",
"palette",
"The name of the custom palette to use, ignored unless (palette_type == GIMP_CUSTOM_PALETTE)",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -1696,7 +1696,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The drawable name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......@@ -1725,7 +1725,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_param_spec_string ("name",
"name",
"The new drawable name",
FALSE, FALSE,
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -227,7 +227,7 @@ edit_named_cut_invoker (GimpProcedure *procedure,
if (success)
{
if (strlen (buffer_name) && gimp_item_is_attached (GIMP_ITEM (drawable)))
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
{
GimpImage *image = gimp_item_get_image (<