Commit 66a66b32 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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/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.
parent 70eeb8ce
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/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.
2006-05-05 Manish Singh <yosh@gimp.org>
* plug-ins/common/gifload.c (DoExtension): Revert back to unsigned
......
......@@ -614,7 +614,8 @@ gimp_param_image_id_init (GParamSpec *pspec)
{
GimpParamSpecImageID *ispec = GIMP_PARAM_SPEC_IMAGE_ID (pspec);
ispec->gimp = NULL;
ispec->gimp = NULL;
ispec->none_ok = FALSE;
}
static void
......@@ -632,6 +633,9 @@ gimp_param_image_id_validate (GParamSpec *pspec,
gint image_id = value->data[0].v_int;
GimpImage *image;
if (ispec->none_ok && (image_id == 0 || image_id == -1))
return FALSE;
image = gimp_image_get_by_ID (ispec->gimp, image_id);
if (! GIMP_IS_IMAGE (image))
......@@ -666,6 +670,7 @@ gimp_param_spec_image_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecImageID *ispec;
......@@ -675,8 +680,8 @@ gimp_param_spec_image_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_IMAGE_ID,
name, nick, blurb, flags);
if (ispec)
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -777,6 +782,7 @@ gimp_param_item_id_init (GParamSpec *pspec)
ispec->gimp = NULL;
ispec->item_type = GIMP_TYPE_ITEM;
ispec->none_ok = FALSE;
}
static void
......@@ -794,6 +800,9 @@ gimp_param_item_id_validate (GParamSpec *pspec,
gint item_id = value->data[0].v_int;
GimpItem *item;
if (ispec->none_ok && (item_id == 0 || item_id == -1))
return FALSE;
item = gimp_item_get_by_ID (ispec->gimp, item_id);
if (! item || ! g_type_is_a (G_TYPE_FROM_INSTANCE (item), ispec->item_type))
......@@ -834,6 +843,7 @@ gimp_param_spec_item_id (const gchar *name,
const gchar *blurb,
Gimp *gimp,
GType item_type,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -844,11 +854,9 @@ gimp_param_spec_item_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_ITEM_ID,
name, nick, blurb, flags);
if (ispec)
{
ispec->gimp = gimp;
ispec->item_type = item_type;
}
ispec->gimp = gimp;
ispec->item_type = item_type;
ispec->none_ok = none_ok;
return G_PARAM_SPEC (ispec);
}
......@@ -954,6 +962,7 @@ gimp_param_spec_drawable_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -963,7 +972,8 @@ gimp_param_spec_drawable_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DRAWABLE_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1067,6 +1077,7 @@ gimp_param_spec_layer_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -1076,7 +1087,8 @@ gimp_param_spec_layer_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1180,6 +1192,7 @@ gimp_param_spec_channel_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -1189,7 +1202,8 @@ gimp_param_spec_channel_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_CHANNEL_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1293,6 +1307,7 @@ gimp_param_spec_layer_mask_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -1302,7 +1317,8 @@ gimp_param_spec_layer_mask_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER_MASK_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1406,6 +1422,7 @@ gimp_param_spec_selection_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -1415,7 +1432,8 @@ gimp_param_spec_selection_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_SELECTION_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1519,6 +1537,7 @@ gimp_param_spec_vectors_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecItemID *ispec;
......@@ -1528,7 +1547,8 @@ gimp_param_spec_vectors_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_VECTORS_ID,
name, nick, blurb, flags);
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......@@ -1634,7 +1654,8 @@ gimp_param_display_id_init (GParamSpec *pspec)
{
GimpParamSpecDisplayID *ispec = GIMP_PARAM_SPEC_DISPLAY_ID (pspec);
ispec->gimp = NULL;
ispec->gimp = NULL;
ispec->none_ok = FALSE;
}
static void
......@@ -1652,6 +1673,9 @@ gimp_param_display_id_validate (GParamSpec *pspec,
gint display_id = value->data[0].v_int;
GimpObject *display;
if (ispec->none_ok && (display_id == 0 || display_id == -1))
return FALSE;
display = gimp_get_display_by_ID (ispec->gimp, display_id);
if (! GIMP_IS_OBJECT (display))
......@@ -1686,6 +1710,7 @@ gimp_param_spec_display_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags)
{
GimpParamSpecDisplayID *ispec;
......@@ -1695,8 +1720,8 @@ gimp_param_spec_display_id (const gchar *name,
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_DISPLAY_ID,
name, nick, blurb, flags);
if (ispec)
ispec->gimp = gimp;
ispec->gimp = gimp;
ispec->none_ok = none_ok ? TRUE : FALSE;
return G_PARAM_SPEC (ispec);
}
......
......@@ -223,6 +223,7 @@ struct _GimpParamSpecImageID
GParamSpecInt parent_instance;
Gimp *gimp;
gboolean none_ok;
};
GType gimp_param_image_id_get_type (void) G_GNUC_CONST;
......@@ -231,6 +232,7 @@ GParamSpec * gimp_param_spec_image_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpImage * gimp_value_get_image (const GValue *value,
......@@ -267,6 +269,7 @@ struct _GimpParamSpecItemID
Gimp *gimp;
GType item_type;
gboolean none_ok;
};
GType gimp_param_item_id_get_type (void) G_GNUC_CONST;
......@@ -276,6 +279,7 @@ GParamSpec * gimp_param_spec_item_id (const gchar *name,
const gchar *blurb,
Gimp *gimp,
GType item_type,
gboolean none_ok,
GParamFlags flags);
GimpItem * gimp_value_get_item (const GValue *value,
......@@ -317,6 +321,7 @@ GParamSpec * gimp_param_spec_drawable_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpDrawable * gimp_value_get_drawable (const GValue *value,
......@@ -357,6 +362,7 @@ GParamSpec * gimp_param_spec_layer_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpLayer * gimp_value_get_layer (const GValue *value,
......@@ -397,6 +403,7 @@ GParamSpec * gimp_param_spec_channel_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpChannel * gimp_value_get_channel (const GValue *value,
......@@ -437,6 +444,7 @@ GParamSpec * gimp_param_spec_layer_mask_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpLayerMask * gimp_value_get_layer_mask (const GValue *value,
......@@ -477,6 +485,7 @@ GParamSpec * gimp_param_spec_selection_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpSelection * gimp_value_get_selection (const GValue *value,
......@@ -517,6 +526,7 @@ GParamSpec * gimp_param_spec_vectors_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpVectors * gimp_value_get_vectors (const GValue *value,
......@@ -551,6 +561,7 @@ struct _GimpParamSpecDisplayID
GParamSpecInt parent_instance;
Gimp *gimp;
gboolean none_ok;
};
GType gimp_param_display_id_get_type (void) G_GNUC_CONST;
......@@ -559,6 +570,7 @@ GParamSpec * gimp_param_spec_display_id (const gchar *name,
const gchar *nick,
const gchar *blurb,
Gimp *gimp,
gboolean none_ok,
GParamFlags flags);
GimpObject * gimp_value_get_display (const GValue *value,
......
......@@ -348,7 +348,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image to which to add the channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("width",
......@@ -386,7 +386,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The newly created channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -408,7 +408,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image to which to add the channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
......@@ -428,7 +428,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The newly created channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -450,13 +450,13 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel to copy",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_channel_id ("channel-copy",
"channel copy",
"The newly copied channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -478,13 +478,13 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel1",
"channel1",
"The channel1",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_channel_id ("channel2",
"channel2",
"The channel2",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("operation",
......@@ -525,7 +525,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("show-masked",
......@@ -553,7 +553,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("show-masked",
......@@ -581,7 +581,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_double ("opacity",
......@@ -609,7 +609,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("opacity",
......@@ -637,7 +637,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_rgb ("color",
......@@ -666,7 +666,7 @@ register_channel_procs (GimpPDB *pdb)
gimp_param_spec_channel_id ("channel",
"channel",
"The channel",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_rgb ("color",
......
......@@ -853,7 +853,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("brightness",
......@@ -887,7 +887,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
......@@ -946,7 +946,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -968,7 +968,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -990,7 +990,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("levels",
......@@ -1018,7 +1018,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -1040,7 +1040,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("desaturate-mode",
......@@ -1069,7 +1069,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("mask-only",
......@@ -1097,7 +1097,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -1119,7 +1119,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
......@@ -1159,7 +1159,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
......@@ -1199,7 +1199,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("transfer-mode",
......@@ -1252,7 +1252,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_double ("hue",
......@@ -1292,7 +1292,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("channel",
......@@ -1369,7 +1369,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("hue-range",
......@@ -1416,7 +1416,7 @@ register_color_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("low-threshold",
......
......@@ -165,7 +165,7 @@ register_convert_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -187,7 +187,7 @@ register_convert_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -209,7 +209,7 @@ register_convert_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("dither-type",
......
......@@ -182,13 +182,13 @@ register_display_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_display_id ("display",
"display",
"The new display",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -210,7 +210,7 @@ register_display_procs (GimpPDB *pdb)
gimp_param_spec_display_id ("display",
"display",
"The display to delete",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -232,7 +232,7 @@ register_display_procs (GimpPDB *pdb)
gimp_param_spec_display_id ("display",
"display",
"The display to get the window handle from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("window",
......@@ -276,13 +276,13 @@ register_display_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("old-image",
"old image",
"The old image (must have at least one display)",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("new-image",
"new image",
"The new image (must not have a display)",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......
This diff is collapsed.
This diff is collapsed.
......@@ -651,7 +651,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable to cut from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
......@@ -679,7 +679,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable to copy from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
......@@ -707,7 +707,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image to copy from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boolean ("non-empty",
......@@ -735,7 +735,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable to paste to",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("paste-into",
......@@ -747,7 +747,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_layer_id ("floating-sel",
"floating sel",
"The new floating selection",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -769,7 +769,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The new image",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -791,7 +791,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable to cut from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
......@@ -827,7 +827,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_drawable_id ("drawable",
"drawable",
"The drawable to copy from",
pdb->gimp,
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("buffer-name",
......@@ -863,7 +863,7 @@ register_edit_procs (GimpPDB *pdb)
gimp_param_spec_image_id ("image",
"image",
"The image to copy from",
pdb->gimp,
pdb->gimp, FALSE,