libgimp, plug-ins: rename gimp_load_procedure_new2() as gimp_load_procedure_new().

All C load procedures are now moved to the new API.
This commit is contained in:
Jehan 2023-08-06 03:21:27 +02:00
parent 136aca3c34
commit 9e2a7e8759
48 changed files with 258 additions and 336 deletions

View File

@ -619,7 +619,6 @@ EXPORTS
gimp_load_procedure_get_thumbnail_loader
gimp_load_procedure_get_type
gimp_load_procedure_new
gimp_load_procedure_new2
gimp_load_procedure_set_handles_raw
gimp_load_procedure_set_thumbnail_loader
gimp_main

View File

@ -55,7 +55,6 @@
struct _GimpLoadProcedurePrivate
{
GimpRunLoadFunc run_func;
GimpRunLoadFunc2 run_func2;
gpointer run_data;
GDestroyNotify run_data_destroy;
@ -177,12 +176,18 @@ static GimpValueArray *
gimp_load_procedure_run (GimpProcedure *procedure,
const GimpValueArray *args)
{
GimpLoadProcedure *load_proc = GIMP_LOAD_PROCEDURE (procedure);
GimpValueArray *remaining;
GimpValueArray *return_values;
GimpRunMode run_mode;
GFile *file;
gint i;
GimpLoadProcedure *load_proc = GIMP_LOAD_PROCEDURE (procedure);
GimpValueArray *remaining;
GimpValueArray *return_values;
GimpProcedureConfig *config;
GimpImage *image = NULL;
GimpMetadata *metadata = NULL;
gchar *mimetype = NULL;
GimpMetadataLoadFlags flags = GIMP_METADATA_LOAD_ALL;
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
GimpRunMode run_mode;
GFile *file;
gint i;
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
file = GIMP_VALUES_GET_FILE (args, 1);
@ -196,103 +201,85 @@ gimp_load_procedure_run (GimpProcedure *procedure,
gimp_value_array_append (remaining, value);
}
if (load_proc->priv->run_func2)
config = gimp_procedure_create_config (procedure);
mimetype = (gchar *) gimp_file_procedure_get_mime_types (GIMP_FILE_PROCEDURE (procedure));
if (mimetype != NULL)
{
GimpProcedureConfig *config;
GimpImage *image = NULL;
GimpMetadata *metadata = NULL;
gchar *mimetype = NULL;
GimpMetadataLoadFlags flags = GIMP_METADATA_LOAD_ALL;
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
char *delim;
config = gimp_procedure_create_config (procedure);
mimetype = (gchar *) gimp_file_procedure_get_mime_types (GIMP_FILE_PROCEDURE (procedure));
if (mimetype != NULL)
{
char *delim;
mimetype = g_strdup (mimetype);
mimetype = g_strstrip (mimetype);
delim = strstr (mimetype, ",");
if (delim)
*delim = '\0';
/* Though docs only writes about the list being comma-separated, our
* code apparently also split by spaces.
*/
delim = strstr (mimetype, " ");
if (delim)
*delim = '\0';
delim = strstr (mimetype, "\t");
if (delim)
*delim = '\0';
metadata = gimp_metadata_load_from_file (file, NULL);
g_free (mimetype);
}
else
{
flags = GIMP_METADATA_LOAD_NONE;
}
if (metadata == NULL)
metadata = gimp_metadata_new ();
return_values = load_proc->priv->run_func2 (procedure,
run_mode,
file,
metadata, &flags,
config,
load_proc->priv->run_data);
if (return_values != NULL &&
gimp_value_array_length (return_values) > 0 &&
G_VALUE_HOLDS_ENUM (gimp_value_array_index (return_values, 0)))
status = GIMP_VALUES_GET_ENUM (return_values, 0);
gimp_procedure_config_end_run (config, status);
if (status == GIMP_PDB_SUCCESS)
{
if (gimp_value_array_length (return_values) < 2 ||
! GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_values, 1)))
{
GError *error = NULL;
status = GIMP_PDB_EXECUTION_ERROR;
g_set_error (&error, GIMP_PLUG_IN_ERROR, 0,
_("This file loading plug-in returned SUCCESS as a status without an image. "
"This is a bug in the plug-in code. Contact the plug-in developer."));
gimp_value_array_unref (return_values);
return_values = gimp_procedure_new_return_values (procedure, status, error);
}
else
{
image = GIMP_VALUES_GET_IMAGE (return_values, 1);
}
}
if (image != NULL && metadata != NULL && flags != GIMP_METADATA_LOAD_NONE)
gimp_image_metadata_load_finish (image, NULL, metadata, flags);
/* This is debug printing to help plug-in developers figure out best
* practices.
mimetype = g_strdup (mimetype);
mimetype = g_strstrip (mimetype);
delim = strstr (mimetype, ",");
if (delim)
*delim = '\0';
/* Though docs only writes about the list being comma-separated, our
* code apparently also split by spaces.
*/
if (G_OBJECT (config)->ref_count > 1)
g_printerr ("%s: ERROR: the GimpSaveProcedureConfig object was refed "
"by plug-in, it MUST NOT do that!\n", G_STRFUNC);
delim = strstr (mimetype, " ");
if (delim)
*delim = '\0';
delim = strstr (mimetype, "\t");
if (delim)
*delim = '\0';
g_object_unref (config);
metadata = gimp_metadata_load_from_file (file, NULL);
g_free (mimetype);
}
else
{
return_values = load_proc->priv->run_func (procedure,
run_mode,
file,
remaining,
load_proc->priv->run_data);
flags = GIMP_METADATA_LOAD_NONE;
}
if (metadata == NULL)
metadata = gimp_metadata_new ();
return_values = load_proc->priv->run_func (procedure,
run_mode,
file,
metadata, &flags,
config,
load_proc->priv->run_data);
if (return_values != NULL &&
gimp_value_array_length (return_values) > 0 &&
G_VALUE_HOLDS_ENUM (gimp_value_array_index (return_values, 0)))
status = GIMP_VALUES_GET_ENUM (return_values, 0);
gimp_procedure_config_end_run (config, status);
if (status == GIMP_PDB_SUCCESS)
{
if (gimp_value_array_length (return_values) < 2 ||
! GIMP_VALUE_HOLDS_IMAGE (gimp_value_array_index (return_values, 1)))
{
GError *error = NULL;
status = GIMP_PDB_EXECUTION_ERROR;
g_set_error (&error, GIMP_PLUG_IN_ERROR, 0,
_("This file loading plug-in returned SUCCESS as a status without an image. "
"This is a bug in the plug-in code. Contact the plug-in developer."));
gimp_value_array_unref (return_values);
return_values = gimp_procedure_new_return_values (procedure, status, error);
}
else
{
image = GIMP_VALUES_GET_IMAGE (return_values, 1);
}
}
if (image != NULL && metadata != NULL && flags != GIMP_METADATA_LOAD_NONE)
gimp_image_metadata_load_finish (image, NULL, metadata, flags);
/* This is debug printing to help plug-in developers figure out best
* practices.
*/
if (G_OBJECT (config)->ref_count > 1)
g_printerr ("%s: ERROR: the GimpSaveProcedureConfig object was refed "
"by plug-in, it MUST NOT do that!\n", G_STRFUNC);
g_object_unref (config);
g_clear_object (&metadata);
gimp_value_array_unref (remaining);
return return_values;
@ -369,53 +356,6 @@ gimp_load_procedure_new (GimpPlugIn *plug_in,
return GIMP_PROCEDURE (procedure);
}
/**
* gimp_load_procedure_new2:
* @plug_in: a #GimpPlugIn.
* @name: the new procedure's name.
* @proc_type: the new procedure's #GimpPDBProcType.
* @run_func: the run function for the new procedure.
* @run_data: user data passed to @run_func.
* @run_data_destroy: (nullable): free function for @run_data, or %NULL.
*
* Creates a new load procedure named @name which will call @run_func
* when invoked.
*
* See gimp_procedure_new() for information about @proc_type.
*
* Returns: (transfer full): a new #GimpProcedure.
*
* Since: 3.0
**/
GimpProcedure *
gimp_load_procedure_new2 (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
GimpRunLoadFunc2 run_func,
gpointer run_data,
GDestroyNotify run_data_destroy)
{
GimpLoadProcedure *procedure;
g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), NULL);
g_return_val_if_fail (gimp_is_canonical_identifier (name), NULL);
g_return_val_if_fail (proc_type != GIMP_PDB_PROC_TYPE_INTERNAL, NULL);
g_return_val_if_fail (proc_type != GIMP_PDB_PROC_TYPE_EXTENSION, NULL);
g_return_val_if_fail (run_func != NULL, NULL);
procedure = g_object_new (GIMP_TYPE_LOAD_PROCEDURE,
"plug-in", plug_in,
"name", name,
"procedure-type", proc_type,
NULL);
procedure->priv->run_func2 = run_func;
procedure->priv->run_data = run_data;
procedure->priv->run_data_destroy = run_data_destroy;
return GIMP_PROCEDURE (procedure);
}
/**
* gimp_load_procedure_set_handles_raw:
* @procedure: A load procedure object.

View File

@ -31,47 +31,36 @@ G_BEGIN_DECLS
/**
* GimpRunLoadFunc:
* @procedure: the #GimpProcedure that runs.
* @run_mode: the #GimpRunMode.
* @file: the #GFile to load from.
* @args: the @procedure's remaining arguments.
* @run_data: (closure): the run_data given in gimp_load_procedure_new().
*
* The load function is run during the lifetime of the GIMP session,
* each time a plug-in load procedure is called.
*
* Returns: (transfer full): the @procedure's return values.
*
* Since: 3.0
**/
typedef GimpValueArray * (* GimpRunLoadFunc) (GimpProcedure *procedure,
GimpRunMode run_mode,
GFile *file,
const GimpValueArray *args,
gpointer run_data);
/**
* GimpRunLoadFunc2:
* @procedure: the #GimpProcedure that runs.
* @run_mode: the #GimpRunMode.
* @file: the #GFile to load from.
* @procedure: the [class@Gimp.Procedure] that runs.
* @run_mode: the [enum@RunMode].
* @file: the [iface@Gio.File] to load from.
* @metadata: the [class@Gimp.Metadata] which will be added to the new image.
* @flags: (inout): flags to filter which metadata will be added..
* @config: the @procedure's remaining arguments.
* @run_data: (closure): the run_data given in gimp_load_procedure_new().
*
* The load function is run during the lifetime of the GIMP session,
* each time a plug-in load procedure is called.
* The load function is run during the lifetime of the GIMP session, each time a
* plug-in load procedure is called.
*
* You are expected to read @file and create a [class@Gimp.Image] out of its
* data. This image will be the first return value.
* @metadata will be filled from metadata from @file if our infrastructure
* supports this format. You may tweak this object, for instance adding metadata
* specific to the format. You can also edit @flags if you need to filter out
* some specific common fields. For instance, it is customary to remove a
* colorspace field with [flags@MetadataLoadFlags] when a profile was added.
*
* Returns: (transfer full): the @procedure's return values.
*
* Since: 3.0
**/
typedef GimpValueArray * (* GimpRunLoadFunc2) (GimpProcedure *procedure,
GimpRunMode run_mode,
GFile *file,
GimpMetadata *metadata,
GimpMetadataLoadFlags *flags,
GimpProcedureConfig *config,
gpointer run_data);
typedef GimpValueArray * (* GimpRunLoadFunc) (GimpProcedure *procedure,
GimpRunMode run_mode,
GFile *file,
GimpMetadata *metadata,
GimpMetadataLoadFlags *flags,
GimpProcedureConfig *config,
gpointer run_data);
#define GIMP_TYPE_LOAD_PROCEDURE (gimp_load_procedure_get_type ())
@ -107,12 +96,6 @@ GimpProcedure * gimp_load_procedure_new (GimpPlugIn *plu
GimpRunLoadFunc run_func,
gpointer run_data,
GDestroyNotify run_data_destroy);
GimpProcedure * gimp_load_procedure_new2 (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
GimpRunLoadFunc2 run_func,
gpointer run_data,
GDestroyNotify run_data_destroy);
void gimp_load_procedure_set_handles_raw (GimpLoadProcedure *procedure,
gboolean handles_raw);

View File

@ -134,9 +134,9 @@ cel_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
cel_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
cel_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("KISS CEL"));

View File

@ -316,10 +316,10 @@ compressor_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, compressor->load_proc))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
compressor_load,
(gpointer) compressor, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
compressor_load,
(gpointer) compressor, NULL);
gimp_procedure_set_documentation (procedure,
compressor->load_blurb,

View File

@ -107,9 +107,9 @@ desktop_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
desktop_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
desktop_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Desktop Link"));

View File

@ -169,9 +169,9 @@ dicom_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dicom_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dicom_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("DICOM image"));

View File

@ -130,9 +130,9 @@ farbfeld_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
farbfeld_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
farbfeld_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure,
N_("Farbfeld"));

View File

@ -194,10 +194,10 @@ goat_create_procedure (GimpPlugIn *plug_in,
if (! g_strcmp0 (name, format->load_proc))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
goat_load,
(gpointer) format, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
goat_load,
(gpointer) format, NULL);
gimp_procedure_set_menu_label (procedure, format->file_type);

View File

@ -171,9 +171,9 @@ gif_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
gif_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
gif_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("GIF image"));

View File

@ -187,9 +187,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
heif_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
heif_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("HEIF/HEIC"));
@ -305,9 +305,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
#if LIBHEIF_HAVE_VERSION(1,8,0)
else if (! strcmp (name, LOAD_PROC_AV1))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
heif_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
heif_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, "HEIF/AVIF");

View File

@ -140,9 +140,9 @@ iff_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
iff_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
iff_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Amiga IFF"));

View File

@ -182,9 +182,9 @@ jp2_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_JP2_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jp2_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jp2_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("JPEG 2000 image"));
gimp_file_procedure_set_format_name (GIMP_FILE_PROCEDURE (procedure),
@ -216,9 +216,9 @@ jp2_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_J2K_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jp2_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jp2_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("JPEG 2000 codestream"));
gimp_file_procedure_set_format_name (GIMP_FILE_PROCEDURE (procedure),

View File

@ -135,9 +135,9 @@ jpegxl_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jpegxl_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jpegxl_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("JPEG XL image"));

View File

@ -205,9 +205,9 @@ pcx_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pcx_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pcx_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("ZSoft PCX image"));
@ -236,9 +236,9 @@ pcx_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_PROC_DCX))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dcx_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dcx_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("ZSoft DCX image"));

View File

@ -312,9 +312,9 @@ pdf_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pdf_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pdf_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Portable Document Format"));

View File

@ -164,9 +164,9 @@ pix_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pix_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pix_load, NULL, NULL);
gimp_file_procedure_set_handles_remote (GIMP_FILE_PROCEDURE (procedure),
TRUE);

View File

@ -176,9 +176,9 @@ png_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
png_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
png_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("PNG image"));

View File

@ -311,9 +311,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pnm_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
pnm_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("PNM Image"));

View File

@ -330,9 +330,9 @@ ps_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PS_PROC) ||
! strcmp (name, LOAD_EPS_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
ps_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
ps_load, NULL, NULL);
if (! strcmp (name, LOAD_PS_PROC))
{

View File

@ -660,9 +660,9 @@ psp_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psp_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psp_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Paint Shop Pro image"));

View File

@ -132,9 +132,9 @@ qoi_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
qoi_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
qoi_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure,
N_("Quite OK Image"));

View File

@ -329,9 +329,9 @@ raw_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
raw_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
raw_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Raw image data"));
@ -409,7 +409,7 @@ raw_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_HGT_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
raw_load, NULL, NULL);

View File

@ -270,9 +270,9 @@ sunras_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
sunras_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
sunras_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("SUN Rasterfile image"));

View File

@ -153,9 +153,9 @@ svg_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
svg_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
svg_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("SVG image"));

View File

@ -256,9 +256,9 @@ tga_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
tga_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
tga_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("TarGA image"));

View File

@ -111,9 +111,9 @@ wbmp_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
wbmp_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
wbmp_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Wireless BMP image"));

View File

@ -148,9 +148,9 @@ wmf_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
wmf_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
wmf_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Microsoft WMF file"));

View File

@ -155,9 +155,9 @@ xbm_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xbm_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xbm_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("X BitMap image"));

View File

@ -294,9 +294,9 @@ xmc_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xmc_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xmc_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("X11 Mouse Cursor"));

View File

@ -192,9 +192,9 @@ xpm_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xpm_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xpm_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("X PixMap image"));

View File

@ -320,9 +320,9 @@ xwd_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xwd_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
xwd_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("X window dump"));

View File

@ -148,9 +148,9 @@ bmp_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
bmp_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
bmp_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Windows BMP image"));

View File

@ -142,9 +142,9 @@ dds_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dds_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
dds_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("DDS image"));

View File

@ -102,9 +102,9 @@ exr_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
exr_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
exr_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("OpenEXR image"));

View File

@ -129,9 +129,9 @@ faxg3_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
faxg3_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
faxg3_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("G3 fax image"));

View File

@ -172,9 +172,9 @@ fits_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
fits_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
fits_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure,
_("Flexible Image Transport System"));

View File

@ -177,9 +177,9 @@ fli_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
fli_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
fli_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("AutoDesk FLIC animation"));

View File

@ -127,9 +127,9 @@ icns_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
icns_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
icns_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, N_("Icns"));

View File

@ -168,7 +168,7 @@ ico_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
ico_load, NULL, NULL);
@ -196,7 +196,7 @@ ico_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_CUR_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
ico_load, NULL, NULL);
@ -226,7 +226,7 @@ ico_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_ANI_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
ani_load, NULL, NULL);

View File

@ -129,7 +129,7 @@ jpeg_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
jpeg_load, NULL, NULL);

View File

@ -129,9 +129,9 @@ psd_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Photoshop image"));
@ -158,9 +158,9 @@ psd_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_MERGED_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("Photoshop image (merged)"));
@ -271,9 +271,9 @@ psd_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, LOAD_METADATA_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load_metadata, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
psd_load_metadata, NULL, NULL);
gimp_procedure_set_documentation (procedure,
"Loads Photoshop-format metadata "

View File

@ -268,10 +268,10 @@ darktable_create_procedure (GimpPlugIn *plug_in,
load_blurb = g_strdup_printf (format->load_blurb_format, "darktable");
load_help = g_strdup_printf (format->load_help_format, "darktable");
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
darktable_load,
(gpointer) format, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
darktable_load,
(gpointer) format, NULL);
gimp_procedure_set_documentation (procedure,
load_blurb, load_help, name);

View File

@ -128,10 +128,10 @@ placeholder_create_procedure (GimpPlugIn *plug_in,
load_blurb = g_strdup_printf (format->load_blurb_format, "placeholder");
load_help = g_strdup_printf (format->load_help_format, "placeholder");
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
placeholder_load,
(gpointer) format, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
placeholder_load,
(gpointer) format, NULL);
gimp_procedure_set_documentation (procedure,
load_blurb, load_help, name);

View File

@ -219,10 +219,10 @@ rawtherapee_create_procedure (GimpPlugIn *plug_in,
load_blurb = g_strdup_printf (format->load_blurb_format, "rawtherapee");
load_help = g_strdup_printf (format->load_help_format, "rawtherapee");
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
rawtherapee_load,
(gpointer) format, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
rawtherapee_load,
(gpointer) format, NULL);
gimp_procedure_set_documentation (procedure,
load_blurb, load_help, name);

View File

@ -139,9 +139,9 @@ sgi_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
sgi_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
sgi_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure,
N_("Silicon Graphics IRIS image"));

View File

@ -155,9 +155,9 @@ tiff_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
tiff_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
tiff_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("TIFF or BigTIFF image"));

View File

@ -117,9 +117,9 @@ webp_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, LOAD_PROC))
{
procedure = gimp_load_procedure_new2 (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
webp_load, NULL, NULL);
procedure = gimp_load_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
webp_load, NULL, NULL);
gimp_procedure_set_menu_label (procedure, _("WebP image"));