Commit 15019fef authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: port many plug-ins from GimpProcedure to GimpImageProcedure

Also move the call to set_icon_name() after set_menu_label(), all
ported plug-ins should look the same so we are a good example for copy
and paste ;)
parent d89e6ca7
Pipeline #105633 passed with stages
in 19 minutes and 23 seconds
......@@ -95,6 +95,9 @@ static GimpProcedure * play_create_procedure (GimpPlugIn *plug_in,
const gchar *name);
static GimpValueArray * play_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -239,12 +242,13 @@ play_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, PLUG_IN_PROC))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
play_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
play_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");
gimp_procedure_set_menu_label (procedure, N_("_Playback..."));
gimp_procedure_set_icon_name (procedure, "media-playback-start");
gimp_procedure_add_menu_path (procedure, "<Image>/Filters/Animation/");
gimp_procedure_set_documentation (procedure,
......@@ -256,28 +260,6 @@ play_create_procedure (GimpPlugIn *plug_in,
"Adam D. Moss <adam@gimp.org>",
"Adam D. Moss <adam@gimp.org>",
"1997, 1998...");
gimp_procedure_set_icon_name (procedure, "media-playback-start");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
}
return procedure;
......@@ -285,16 +267,16 @@ play_create_procedure (GimpPlugIn *plug_in,
static GimpValueArray *
play_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image,
gint32 drawable,
const GimpValueArray *args,
gpointer run_data)
{
GimpRunMode run_mode;
INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
image_id = gimp_value_get_image_id (gimp_value_array_index (args, 1));
image_id = image;
gimp_get_data (PLUG_IN_PROC, &settings);
......
......@@ -67,6 +67,9 @@ static GimpProcedure * remap_create_procedure (GimpPlugIn *plug_in,
const gchar *name);
static GimpValueArray * remap_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -116,12 +119,13 @@ remap_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, PLUG_IN_PROC_REMAP))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
remap_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
remap_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED*");
gimp_procedure_set_menu_label (procedure, N_("R_earrange Colormap..."));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_COLORMAP);
gimp_procedure_add_menu_path (procedure, "<Image>/Colors/Map/Colormap");
gimp_procedure_add_menu_path (procedure, "<Colormap>");
......@@ -137,27 +141,6 @@ remap_create_procedure (GimpPlugIn *plug_in,
"Mukund Sivaraman <muks@mukund.org>",
"June 2006");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_COLORMAP);
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("num-colors",
"Num colors",
......@@ -174,12 +157,13 @@ remap_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PLUG_IN_PROC_SWAP))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
remap_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
remap_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED*");
gimp_procedure_set_menu_label (procedure, N_("_Swap Colors"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_COLORMAP);
gimp_procedure_set_documentation (procedure,
N_("Swap two colors in the colormap"),
......@@ -194,27 +178,6 @@ remap_create_procedure (GimpPlugIn *plug_in,
"Mukund Sivaraman <muks@mukund.org>",
"June 2006");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_COLORMAP);
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_uchar ("index1",
"Index 1",
......@@ -236,22 +199,20 @@ remap_create_procedure (GimpPlugIn *plug_in,
static GimpValueArray *
remap_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data)
{
GimpRunMode run_mode;
gint32 image_ID;
guchar map[256];
gint i;
guchar map[256];
gint i;
INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
image_ID = gimp_value_get_image_id (gimp_value_array_index (args, 1));
/* Make sure that the image is indexed */
if (gimp_image_base_type (image_ID) != GIMP_INDEXED)
if (gimp_image_base_type (image_id) != GIMP_INDEXED)
return gimp_procedure_new_return_values (procedure,
GIMP_PDB_EXECUTION_ERROR,
NULL);
......@@ -266,7 +227,7 @@ remap_run (GimpProcedure *procedure,
gint n_col_args;
const guchar *col_args;
g_free (gimp_image_get_colormap (image_ID, &n_cols));
g_free (gimp_image_get_colormap (image_id, &n_cols));
n_col_args = g_value_get_int (gimp_value_array_index (args, 3));
col_args = gimp_value_get_uint8_array (gimp_value_array_index (args, 4));
......@@ -274,7 +235,7 @@ remap_run (GimpProcedure *procedure,
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
if (! remap_dialog (image_ID, map))
if (! remap_dialog (image_id, map))
return gimp_procedure_new_return_values (procedure,
GIMP_PDB_CANCEL,
NULL);
......@@ -295,7 +256,7 @@ remap_run (GimpProcedure *procedure,
break;
}
if (! remap (image_ID, n_cols, map))
if (! remap (image_id, n_cols, map))
return gimp_procedure_new_return_values (procedure,
GIMP_PDB_EXECUTION_ERROR,
NULL);
......@@ -319,7 +280,7 @@ remap_run (GimpProcedure *procedure,
GIMP_PDB_CALLING_ERROR,
NULL);
g_free (gimp_image_get_colormap (image_ID, &n_cols));
g_free (gimp_image_get_colormap (image_id, &n_cols));
if (index1 >= n_cols || index2 >= n_cols)
return gimp_procedure_new_return_values (procedure,
......@@ -330,7 +291,7 @@ remap_run (GimpProcedure *procedure,
map[index1] = map[index2];
map[index2] = tmp;
if (! remap (image_ID, n_cols, map))
if (! remap (image_id, n_cols, map))
return gimp_procedure_new_return_values (procedure,
GIMP_PDB_EXECUTION_ERROR,
NULL);
......
......@@ -130,10 +130,10 @@ gbr_create_procedure (GimpPlugIn *plug_in,
procedure = gimp_save_procedure_new (plug_in, name, GIMP_PLUGIN,
gbr_save, NULL, NULL);
gimp_procedure_set_image_types (procedure,
"RGB*, INDEXED*, GRAY*");
gimp_procedure_set_image_types (procedure, "*");
gimp_procedure_set_menu_label (procedure, N_("GIMP brush"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_procedure_set_documentation (procedure,
"Exports files in the GIMP brush "
......@@ -141,7 +141,6 @@ gbr_create_procedure (GimpPlugIn *plug_in,
"Exports files in the GIMP brush "
"file format",
SAVE_PROC);
gimp_procedure_set_attribution (procedure,
"Tim Newsome, Jens Lautenbacher, "
"Sven Neumann",
......@@ -149,8 +148,6 @@ gbr_create_procedure (GimpPlugIn *plug_in,
"Sven Neumann",
"1997-2000");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-gimp-gbr");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......
......@@ -172,6 +172,7 @@ gih_create_procedure (GimpPlugIn *plug_in,
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
gimp_procedure_set_menu_label (procedure, N_("GIMP brush (animated)"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_procedure_set_documentation (procedure,
"exports images in GIMP brush pipe "
......@@ -185,14 +186,11 @@ gih_create_procedure (GimpPlugIn *plug_in,
"layers can be divided into a "
"rectangular array of brushes.",
SAVE_PROC);
gimp_procedure_set_attribution (procedure,
"Tor Lillqvist",
"Tor Lillqvist",
"1999");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-gimp-gih");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......
......@@ -104,10 +104,10 @@ pat_create_procedure (GimpPlugIn *plug_in,
procedure = gimp_save_procedure_new (plug_in, name, GIMP_PLUGIN,
pat_save, NULL, NULL);
gimp_procedure_set_image_types (procedure,
"RGB*, INDEXED*, GRAY*");
gimp_procedure_set_image_types (procedure, "*");
gimp_procedure_set_menu_label (procedure, N_("GIMP pattern"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_PATTERN);
gimp_procedure_set_documentation (procedure,
"Exports Gimp pattern file (.PAT)",
......@@ -115,14 +115,11 @@ pat_create_procedure (GimpPlugIn *plug_in,
"by exporting them in the "
"appropriate place with this plug-in.",
SAVE_PROC);
gimp_procedure_set_attribution (procedure,
"Tim Newsome",
"Tim Newsome",
"1997");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_PATTERN);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-gimp-pat");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......
......@@ -97,6 +97,9 @@ static GimpProcedure * film_create_procedure (GimpPlugIn *plug_in,
const gchar *name);
static GimpValueArray * film_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -187,8 +190,6 @@ static FilmInterface filmint =
NULL, NULL /* image list widgets */
};
static GimpRunMode run_mode;
static void
film_class_init (FilmClass *klass)
......@@ -212,14 +213,14 @@ film_query_procedures (GimpPlugIn *plug_in)
static GimpProcedure *
film_create_procedure (GimpPlugIn *plug_in,
const gchar *name)
const gchar *name)
{
GimpProcedure *procedure = NULL;
if (! strcmp (name, PLUG_IN_PROC))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
film_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
film_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");
......@@ -236,25 +237,6 @@ film_create_procedure (GimpPlugIn *plug_in,
"Peter Kirchgessner (peter@kirchgessner.net)",
"1997");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("film-height",
"Film height",
......@@ -327,6 +309,9 @@ film_create_procedure (GimpPlugIn *plug_in,
static GimpValueArray *
film_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data)
{
......@@ -336,8 +321,6 @@ film_run (GimpProcedure *procedure,
INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
......@@ -345,7 +328,7 @@ film_run (GimpProcedure *procedure,
gimp_get_data (PLUG_IN_PROC, &filmvals);
/* First acquire information with a dialog */
if (! film_dialog (gimp_value_get_image_id (gimp_value_array_index (args, 1))))
if (! film_dialog (image_id))
return gimp_procedure_new_return_values (procedure, GIMP_PDB_CANCEL,
NULL);
break;
......
......@@ -86,6 +86,9 @@ static GimpProcedure * mail_create_procedure (GimpPlugIn *plug_in,
const gchar *name);
static GimpValueArray * mail_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -184,12 +187,13 @@ mail_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, PLUG_IN_PROC))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
mail_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
mail_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");
gimp_procedure_set_menu_label (procedure, N_("Send by E_mail..."));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_EDIT);
gimp_procedure_add_menu_path (procedure, "<Image>/File/Send");
gimp_procedure_set_documentation (procedure,
......@@ -210,27 +214,6 @@ mail_create_procedure (GimpPlugIn *plug_in,
"Spencer Kimball and Peter Mattis",
"1995-1997");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_EDIT);
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_string ("filename",
"Filename",
......@@ -271,26 +254,22 @@ mail_create_procedure (GimpPlugIn *plug_in,
static GimpValueArray *
mail_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data)
{
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 drawable_ID;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
INIT_I18N ();
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
image_ID = gimp_value_get_image_id (gimp_value_array_index (args, 1));
drawable_ID = gimp_value_get_drawable_id (gimp_value_array_index (args, 2));
switch (run_mode)
{
case GIMP_RUN_INTERACTIVE:
gimp_get_data (PLUG_IN_PROC, &mail_info);
{
gchar *filename = gimp_image_get_filename (image_ID);
gchar *filename = gimp_image_get_filename (image_id);
if (filename)
{
......@@ -334,8 +313,8 @@ mail_run (GimpProcedure *procedure,
}
status = send_image (mail_info.filename,
image_ID,
drawable_ID,
image_id,
drawable_id,
run_mode);
if (status == GIMP_PDB_SUCCESS)
......
......@@ -165,9 +165,8 @@ browser_create_procedure (GimpPlugIn *plug_in,
browser_run, NULL, NULL);
gimp_procedure_set_menu_label (procedure, N_("_Plug-In Browser"));
gimp_procedure_add_menu_path (procedure, "<Image>/Help/Programming");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_PLUGIN);
gimp_procedure_add_menu_path (procedure, "<Image>/Help/Programming");
gimp_procedure_set_documentation (procedure,
N_("Display information about plug-ins"),
......@@ -180,7 +179,6 @@ browser_create_procedure (GimpPlugIn *plug_in,
"new plug-ins have installed "
"themselves in the menus.",
PLUG_IN_PROC);
gimp_procedure_set_attribution (procedure,
"Andy Thomas",
"Andy Thomas",
......
......@@ -127,7 +127,6 @@ browser_create_procedure (GimpPlugIn *plug_in,
N_("List available procedures in the PDB"),
NULL,
PLUG_IN_PROC);
gimp_procedure_set_attribution (procedure,
"Thomas Noel",
"Thomas Noel",
......
......@@ -179,20 +179,18 @@ editor_create_procedure (GimpPlugIn *plug_in,
editor_run, NULL, NULL);
gimp_procedure_set_menu_label (procedure, N_("U_nits"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_TOOL_MEASURE);
gimp_procedure_add_menu_path (procedure, "<Image>/Edit/Preferences");
gimp_procedure_set_documentation (procedure,
N_("Create or alter units used in GIMP"),
"The GIMP unit editor",
name);
gimp_procedure_set_attribution (procedure,
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer <mitch@gimp.org>",
"2000");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_TOOL_MEASURE);
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
......
......@@ -121,6 +121,7 @@ ico_create_procedure (GimpPlugIn *plug_in,
ico_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, N_("Microsoft Windows icon"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_procedure_set_documentation (procedure,
"Loads files of Windows ICO file format",
......@@ -131,8 +132,6 @@ ico_create_procedure (GimpPlugIn *plug_in,
"Christian Kreibich <christian@whoop.org>",
"2002");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-ico");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......@@ -201,6 +200,7 @@ ico_create_procedure (GimpPlugIn *plug_in,
gimp_procedure_set_image_types (procedure, "*");
gimp_procedure_set_menu_label (procedure, N_("Microsoft Windows icon"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_procedure_set_documentation (procedure,
"Saves files in Windows ICO file format",
......@@ -211,8 +211,6 @@ ico_create_procedure (GimpPlugIn *plug_in,
"Christian Kreibich <christian@whoop.org>",
"2002");
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-ico");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......
......@@ -165,6 +165,7 @@ sgi_create_procedure (GimpPlugIn *plug_in,
gimp_procedure_set_menu_label (procedure,
N_("Silicon Graphics IRIS image"));
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_procedure_set_documentation (procedure,
"Exports files in SGI image file format",
......@@ -175,8 +176,6 @@ sgi_create_procedure (GimpPlugIn *plug_in,
"Copyright 1997-1998 by Michael Sweet",
PLUG_IN_VERSION);
gimp_procedure_set_icon_name (procedure, GIMP_ICON_BRUSH);
gimp_file_procedure_set_mime_types (GIMP_FILE_PROCEDURE (procedure),
"image/x-sgi");
gimp_file_procedure_set_extensions (GIMP_FILE_PROCEDURE (procedure),
......
......@@ -94,6 +94,9 @@ static GimpProcedure * explorer_create_procedure (GimpPlugIn *plug_in
const gchar *name);
static GimpValueArray * explorer_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -157,7 +160,6 @@ gchar *fractalexplorer_path = NULL;
static gfloat cx = -0.75;
static gfloat cy = -0.2;
gint32 drawable_id;
static GList *fractalexplorer_list = NULL;
explorer_interface_t wint =
......@@ -225,8 +227,8 @@ explorer_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, PLUG_IN_PROC))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
explorer_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
explorer_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
......@@ -244,25 +246,6 @@ explorer_create_procedure (GimpPlugIn *plug_in,
"www.multimania.com/cotting)",
"December, 1998");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_drawable_id ("drawable",
"Drawable",
"The input drawable",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_int ("fractal-type",
"Fractal type",
......@@ -414,10 +397,12 @@ explorer_create_procedure (GimpPlugIn *plug_in,
static GimpValueArray *
explorer_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data)
{
GimpRunMode run_mode;
gint pwidth;
gint pheight;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
......@@ -427,7 +412,6 @@ explorer_run (GimpProcedure *procedure,
INIT_I18N ();
gegl_init (NULL, NULL);
run_mode = g_value_get_enum (gimp_value_array_index (args, 0));
drawable_id = gimp_value_get_drawable_id (gimp_value_array_index (args, 2));
if (! gimp_drawable_mask_intersect (drawable_id,
......
......@@ -81,6 +81,9 @@ static GimpProcedure * gfig_create_procedure (GimpPlugIn *plug_in,
const gchar *name);
static GimpValueArray * gfig_run (GimpProcedure *procedure,
GimpRunMode run_mode,
gint32 image_id,
gint32 drawable_id,
const GimpValueArray *args,
gpointer run_data);
......@@ -151,8 +154,8 @@ gfig_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, PLUG_IN_PROC))
{
procedure = gimp_procedure_new (plug_in, name, GIMP_PLUGIN,
gfig_run, NULL, NULL);
procedure = gimp_image_procedure_new (plug_in, name, GIMP_PLUGIN,
gfig_run, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
......@@ -177,26 +180,6 @@ gfig_create_procedure (GimpPlugIn *plug_in,
"Andy Thomas",
"Andy Thomas",
"1997");
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("run-mode",
"Run mode",
"The run mode",
GIMP_TYPE_RUN_MODE,
GIMP_RUN_NONINTERACTIVE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"Image",
"The input image",
FALSE,
G_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,