Commit 392f00ba authored by Michael Natterer's avatar Michael Natterer 😴

app, libgimp: get rid of all ID GTypes and ID param specs

Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.

Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.

This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).

For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.

Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
parent d68ef369
Pipeline #109351 passed with stages
in 16 minutes and 49 seconds
......@@ -242,9 +242,9 @@ gimp_gegl_procedure_execute (GimpProcedure *procedure,
GObject *config;
GeglNode *node;
image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
config = g_value_get_object (gimp_value_array_index (args, 3));
image = g_value_get_object (gimp_value_array_index (args, 1));
drawable = g_value_get_object (gimp_value_array_index (args, 2));
config = g_value_get_object (gimp_value_array_index (args, 3));
node = gegl_node_new_child (NULL,
"operation",
......@@ -458,17 +458,17 @@ gimp_gegl_procedure_new (Gimp *gimp,
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Input image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"Image",
"Input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"Input drawable",
gimp, TRUE,
GIMP_PARAM_READWRITE));
gimp_param_spec_drawable ("drawable",
"Drawable",
"Input drawable",
TRUE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_object ("settings",
"Settings",
......
......@@ -152,7 +152,7 @@ plug_in_run_cmd_callback (GimpAction *action,
{
/* remember only image plug-ins */
if (procedure->num_args >= 2 &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]))
GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]))
{
gimp_filter_history_add (gimp, procedure);
}
......
......@@ -126,11 +126,11 @@ procedure_commands_get_image_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
}
else
......@@ -167,22 +167,22 @@ procedure_commands_get_item_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_ITEM_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_ITEM (procedure->args[n_args]))
{
if (item &&
g_type_is_a (G_TYPE_FROM_INSTANCE (item),
GIMP_PARAM_SPEC_ITEM_ID (procedure->args[n_args])->item_type))
G_PARAM_SPEC_VALUE_TYPE (procedure->args[n_args])))
{
gimp_value_set_item (gimp_value_array_index (args, n_args),
item);
g_value_set_object (gimp_value_array_index (args, n_args),
item);
n_args++;
}
else
......@@ -221,12 +221,11 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DISPLAY_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_DISPLAY (procedure->args[n_args]))
{
if (display)
{
gimp_value_set_display (gimp_value_array_index (args, n_args),
GIMP_OBJECT (display));
g_value_set_object (gimp_value_array_index (args, n_args), display);
n_args++;
}
else
......@@ -238,24 +237,24 @@ procedure_commands_get_display_args (GimpProcedure *procedure,
}
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[n_args]))
{
GimpImage *image = display ? gimp_display_get_image (display) : NULL;
if (image)
{
gimp_value_set_image (gimp_value_array_index (args, n_args), image);
g_value_set_object (gimp_value_array_index (args, n_args), image);
n_args++;
if (gimp_value_array_length (args) > n_args &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[n_args]))
GIMP_IS_PARAM_SPEC_DRAWABLE (procedure->args[n_args]))
{
GimpDrawable *drawable = gimp_image_get_active_drawable (image);
if (drawable)
{
gimp_value_set_drawable (gimp_value_array_index (args, n_args),
drawable);
g_value_set_object (gimp_value_array_index (args, n_args),
drawable);
n_args++;
}
else
......
......@@ -401,11 +401,11 @@ vectors_selection_to_vectors_cmd_callback (GimpAction *action,
args = gimp_procedure_get_arguments (procedure);
g_value_set_enum (gimp_value_array_index (args, 0),
advanced ?
GIMP_RUN_INTERACTIVE : GIMP_RUN_NONINTERACTIVE);
gimp_value_set_image (gimp_value_array_index (args, 1),
image);
g_value_set_enum (gimp_value_array_index (args, 0),
advanced ?
GIMP_RUN_INTERACTIVE : GIMP_RUN_NONINTERACTIVE);
g_value_set_object (gimp_value_array_index (args, 1),
image);
gimp_procedure_execute_async (procedure, image->gimp,
action_data_get_context (data),
......
This diff is collapsed.
This diff is collapsed.
......@@ -488,11 +488,11 @@ gimp_eek (const gchar *reason,
gimp_get_user_context (the_errors_gimp),
NULL, NULL,
"gimp-xcf-save",
GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
GIMP_TYPE_IMAGE_ID, gimp_image_get_id (image),
GIMP_TYPE_DRAWABLE_ID, gimp_item_get_id (item),
G_TYPE_STRING, backup_path,
G_TYPE_STRING, backup_path,
GIMP_TYPE_RUN_MODE, GIMP_RUN_NONINTERACTIVE,
GIMP_TYPE_IMAGE, image,
GIMP_TYPE_DRAWABLE, item,
G_TYPE_STRING, backup_path,
G_TYPE_STRING, backup_path,
G_TYPE_NONE);
i++;
}
......
......@@ -103,7 +103,7 @@ file_gbr_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
......@@ -130,8 +130,8 @@ file_gbr_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
image = g_value_get_object (gimp_value_array_index (args, 1));
drawable = g_value_get_object (gimp_value_array_index (args, 2));
uri = g_value_get_string (gimp_value_array_index (args, 3));
spacing = g_value_get_int (gimp_value_array_index (args, 5));
name = g_value_get_string (gimp_value_array_index (args, 6));
......
......@@ -108,7 +108,7 @@ file_gih_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
......@@ -135,7 +135,7 @@ file_gih_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
image = g_value_get_object (gimp_value_array_index (args, 1));
uri = g_value_get_string (gimp_value_array_index (args, 3));
spacing = g_value_get_int (gimp_value_array_index (args, 5));
name = g_value_get_string (gimp_value_array_index (args, 6));
......
......@@ -104,7 +104,7 @@ file_pat_load_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (image)
gimp_value_set_image (gimp_value_array_index (return_vals, 1), image);
g_value_set_object (gimp_value_array_index (return_vals, 1), image);
gimp_unset_busy (gimp);
......@@ -130,8 +130,8 @@ file_pat_save_invoker (GimpProcedure *procedure,
gimp_set_busy (gimp);
image = gimp_value_get_image (gimp_value_array_index (args, 1), gimp);
drawable = gimp_value_get_drawable (gimp_value_array_index (args, 2), gimp);
image = g_value_get_object (gimp_value_array_index (args, 1));
drawable = g_value_get_object (gimp_value_array_index (args, 2));
uri = g_value_get_string (gimp_value_array_index (args, 3));
name = g_value_get_string (gimp_value_array_index (args, 5));
......
......@@ -104,11 +104,11 @@ file_data_init (Gimp *gimp)
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Output image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"Image",
"Output image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
......@@ -153,18 +153,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Input image",
gimp, FALSE,
gimp_param_spec_image ("image",
"Image",
"Input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"Active drawable "
"of input image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
......@@ -252,11 +252,11 @@ file_data_init (Gimp *gimp)
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Output image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"Image",
"Output image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
......@@ -301,18 +301,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Input image",
gimp, FALSE,
gimp_param_spec_image ("image",
"Image",
"Input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"Active drawable "
"of input image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
......@@ -406,11 +406,11 @@ file_data_init (Gimp *gimp)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Output image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"Image",
"Output image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc);
g_object_unref (procedure);
......@@ -455,18 +455,18 @@ file_data_init (Gimp *gimp)
GIMP_RUN_INTERACTIVE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"Input image",
gimp, FALSE,
gimp_param_spec_image ("image",
"Image",
"Input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable ("drawable",
"Drawable",
"Active drawable "
"of input image",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"Active drawable "
"of input image",
gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_string ("uri",
"URI",
......
......@@ -237,8 +237,7 @@ file_open_image (Gimp *gimp,
*status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
if (*status == GIMP_PDB_SUCCESS && ! file_proc->generic_file_proc)
image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
gimp);
image = g_value_get_object (gimp_value_array_index (return_vals, 1));
if (local_file)
{
......@@ -383,10 +382,9 @@ file_open_thumbnail (Gimp *gimp,
status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
if (status == GIMP_PDB_SUCCESS &&
GIMP_VALUE_HOLDS_IMAGE_ID (gimp_value_array_index (return_vals, 1)))
GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_vals, 1)))
{
image = gimp_value_get_image (gimp_value_array_index (return_vals, 1),
gimp);
image = g_value_get_object (gimp_value_array_index (return_vals, 1));
if (gimp_value_array_length (return_vals) >= 3 &&
G_VALUE_HOLDS_INT (gimp_value_array_index (return_vals, 2)) &&
......
......@@ -69,8 +69,6 @@ file_save (Gimp *gimp,
GFile *local_file = NULL;
gchar *uri = NULL;
gboolean mounted = TRUE;
gint32 image_id;
gint32 drawable_id;
GError *my_error = NULL;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), GIMP_PDB_CALLING_ERROR);
......@@ -188,19 +186,16 @@ file_save (Gimp *gimp,
if (! uri)
uri = g_file_get_uri (file);
image_id = gimp_image_get_id (image);
drawable_id = gimp_item_get_id (GIMP_ITEM (drawable));
return_vals =
gimp_pdb_execute_procedure_by_name (image->gimp->pdb,
gimp_get_user_context (gimp),
progress, error,
gimp_object_get_name (file_proc),
GIMP_TYPE_RUN_MODE, run_mode,
GIMP_TYPE_IMAGE_ID, image_id,
GIMP_TYPE_DRAWABLE_ID, drawable_id,
G_TYPE_STRING, uri,
G_TYPE_STRING, uri,
GIMP_TYPE_RUN_MODE, run_mode,
GIMP_TYPE_IMAGE, image,
GIMP_TYPE_DRAWABLE, drawable,
G_TYPE_STRING, uri,
G_TYPE_STRING, uri,
G_TYPE_NONE);
status = g_value_get_enum (gimp_value_array_index (return_vals, 0));
......
......@@ -150,12 +150,12 @@ static void gui_compare_accelerator (gpointer data,
guint accel_key,
GdkModifierType accel_mods,
gboolean changed);
static void gui_check_unique_accelerator (gpointer data,
static void gui_check_unique_accelerator (gpointer data,
const gchar *accel_path,
guint accel_key,
GdkModifierType accel_mods,
gboolean changed);
static gboolean gui_check_action_exists (const gchar *accel_path);
static gboolean gui_check_action_exists (const gchar *accel_path);
/* private variables */
......@@ -174,6 +174,9 @@ gui_libs_init (GOptionContext *context)
g_return_if_fail (context != NULL);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
/* make the GimpDisplay type known by name early, needed for the PDB */
g_type_class_ref (GIMP_TYPE_DISPLAY);
}
void
......
......@@ -62,7 +62,7 @@ channel_new_invoker (GimpProcedure *procedure,
GimpRGB color;
GimpChannel *channel = NULL;
image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
image = g_value_get_object (gimp_value_array_index (args, 0));
width = g_value_get_int (gimp_value_array_index (args, 1));
height = g_value_get_int (gimp_value_array_index (args, 2));
name = g_value_get_string (gimp_value_array_index (args, 3));
......@@ -84,7 +84,7 @@ channel_new_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
......@@ -104,7 +104,7 @@ channel_new_from_component_invoker (GimpProcedure *procedure,
const gchar *name;
GimpChannel *channel = NULL;
image = gimp_value_get_image (gimp_value_array_index (args, 0), gimp);
image = g_value_get_object (gimp_value_array_index (args, 0));
component = g_value_get_enum (gimp_value_array_index (args, 1));
name = g_value_get_string (gimp_value_array_index (args, 2));
......@@ -124,7 +124,7 @@ channel_new_from_component_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel);
g_value_set_object (gimp_value_array_index (return_vals, 1), channel);
return return_vals;
}
......@@ -142,7 +142,7 @@ channel_copy_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpChannel *channel_copy = NULL;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
......@@ -167,7 +167,7 @@ channel_copy_invoker (GimpProcedure *procedure,
error ? *error : NULL);
if (success)
gimp_value_set_channel (gimp_value_array_index (return_vals, 1), channel_copy);
g_value_set_object (gimp_value_array_index (return_vals, 1), channel_copy);
return return_vals;
}
......@@ -187,8 +187,8 @@ channel_combine_masks_invoker (GimpProcedure *procedure,
gint offx;
gint offy;
channel1 = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel2 = gimp_value_get_channel (gimp_value_array_index (args, 1), gimp);
channel1 = g_value_get_object (gimp_value_array_index (args, 0));
channel2 = g_value_get_object (gimp_value_array_index (args, 1));
operation = g_value_get_enum (gimp_value_array_index (args, 2));
offx = g_value_get_int (gimp_value_array_index (args, 3));
offy = g_value_get_int (gimp_value_array_index (args, 4));
......@@ -218,7 +218,7 @@ channel_get_show_masked_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gboolean show_masked = FALSE;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
......@@ -246,7 +246,7 @@ channel_set_show_masked_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gboolean show_masked;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
show_masked = g_value_get_boolean (gimp_value_array_index (args, 1));
if (success)
......@@ -271,7 +271,7 @@ channel_get_opacity_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gdouble opacity = 0.0;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
......@@ -299,7 +299,7 @@ channel_set_opacity_invoker (GimpProcedure *procedure,
GimpChannel *channel;
gdouble opacity;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
opacity = g_value_get_double (gimp_value_array_index (args, 1));
if (success)
......@@ -324,7 +324,7 @@ channel_get_color_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpRGB color = { 0.0, 0.0, 0.0, 1.0 };
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
if (success)
{
......@@ -353,7 +353,7 @@ channel_set_color_invoker (GimpProcedure *procedure,
GimpChannel *channel;
GimpRGB color;
channel = gimp_value_get_channel (gimp_value_array_index (args, 0), gimp);
channel = g_value_get_object (gimp_value_array_index (args, 0));
gimp_value_get_rgb (gimp_value_array_index (args, 1), &color);
if (success)
......@@ -389,11 +389,11 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
"The image to which to add the channel",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"image",
"The image to which to add the channel",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("width",
"width",
......@@ -427,11 +427,11 @@ register_channel_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_channel_id ("channel",
"channel",
"The newly created channel",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_channel ("channel",
"channel",
"The newly created channel",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -450,11 +450,11 @@ register_channel_procs (GimpPDB *pdb)
"2005",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
"The image to which to add the channel",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_image ("image",
"image",
"The image to which to add the channel",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("component",
"component",
......@@ -470,11 +470,11 @@ register_channel_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_channel_id ("channel",
"channel",
"The newly created channel",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_channel ("channel",
"channel",
"The newly created channel",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -493,17 +493,17 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_channel_id ("channel",
"channel",
"The channel to copy",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_channel ("channel",
"channel",
"The channel to copy",
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, FALSE,
GIMP_PARAM_READWRITE));
gimp_param_spec_channel ("channel-copy",
"channel copy",
"The newly copied channel",
FALSE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
......@@ -521,17 +521,17 @@ register_channel_procs (GimpPDB *pdb)
"1995-1996",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_channel_id ("channel1",
"channel1",
"The channel1",