libgimp, plug-ins: rename to gimp_save_procedure_new().

Also the mimetype is already set by gimp_file_procedure_set_mime_types() so
transform the mimetype argument into an export_metadata argument.
This commit is contained in:
Jehan 2023-07-22 23:49:47 +02:00
parent 06bd1f1289
commit fcc810d7d3
44 changed files with 248 additions and 330 deletions

View File

@ -824,7 +824,6 @@ EXPORTS
gimp_save_procedure_get_support_xmp
gimp_save_procedure_get_type
gimp_save_procedure_new
gimp_save_procedure_new2
gimp_save_procedure_set_support_comment
gimp_save_procedure_set_support_exif
gimp_save_procedure_set_support_iptc

View File

@ -42,7 +42,6 @@ enum
struct _GimpSaveProcedurePrivate
{
GimpRunSaveFunc run_func;
GimpRunSaveFunc2 run_func2;
gpointer run_data;
GDestroyNotify run_data_destroy;
@ -53,7 +52,7 @@ struct _GimpSaveProcedurePrivate
gboolean supports_thumbnail;
gboolean supports_comment;
gchar *mimetype;
gboolean export_metadata;
};
@ -189,7 +188,7 @@ gimp_save_procedure_init (GimpSaveProcedure *procedure)
{
procedure->priv = gimp_save_procedure_get_instance_private (procedure);
procedure->priv->mimetype = NULL;
procedure->priv->export_metadata = FALSE;
}
static void
@ -231,8 +230,6 @@ gimp_save_procedure_finalize (GObject *object)
if (procedure->priv->run_data_destroy)
procedure->priv->run_data_destroy (procedure->priv->run_data);
g_free (procedure->priv->mimetype);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@ -343,12 +340,15 @@ gimp_save_procedure_run (GimpProcedure *procedure,
GimpSaveProcedure *save_proc = GIMP_SAVE_PROCEDURE (procedure);
GimpValueArray *remaining;
GimpValueArray *return_values;
GimpProcedureConfig *config;
GimpRunMode run_mode;
GimpImage *image;
GimpDrawable **drawables;
GFile *file;
gint n_drawables;
gint i;
GimpMetadata *metadata;
gchar *mimetype = NULL;
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
run_mode = GIMP_VALUES_GET_ENUM (args, 0);
image = GIMP_VALUES_GET_IMAGE (args, 1);
@ -358,24 +358,47 @@ gimp_save_procedure_run (GimpProcedure *procedure,
remaining = gimp_value_array_new (gimp_value_array_length (args) - ARG_OFFSET);
for (i = ARG_OFFSET; i < gimp_value_array_length (args); i++)
for (gint i = ARG_OFFSET; i < gimp_value_array_length (args); i++)
{
GValue *value = gimp_value_array_index (args, i);
gimp_value_array_append (remaining, value);
}
if (save_proc->priv->run_func2)
{
GimpProcedureConfig *config;
GimpMetadata *metadata;
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;
config = gimp_procedure_create_config (procedure);
metadata = gimp_procedure_config_begin_export (config, image, run_mode, remaining,
save_proc->priv->mimetype);
if (save_proc->priv->export_metadata)
{
mimetype = (gchar *) gimp_file_procedure_get_mime_types (GIMP_FILE_PROCEDURE (procedure));
if (mimetype == NULL)
{
g_printerr ("%s: ERROR: the GimpSaveProcedureConfig object was created "
"with export_metadata but you didn't set any MimeType with gimp_file_procedure_set_mime_types()!\n",
G_STRFUNC);
}
else
{
char *delim;
return_values = save_proc->priv->run_func2 (procedure, run_mode,
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_procedure_config_begin_export (config, image, run_mode, remaining, mimetype);
g_free (mimetype);
return_values = save_proc->priv->run_func (procedure, run_mode,
image, n_drawables, drawables,
file, metadata, config,
save_proc->priv->run_data);
@ -395,18 +418,6 @@ gimp_save_procedure_run (GimpProcedure *procedure,
"by plug-in, it MUST NOT do that!\n", G_STRFUNC);
g_object_unref (config);
}
else
{
return_values = save_proc->priv->run_func (procedure,
run_mode,
image,
n_drawables,
drawables,
file,
remaining,
save_proc->priv->run_data);
}
gimp_value_array_unref (remaining);
return return_values;
@ -502,6 +513,7 @@ gimp_save_procedure_add_metadata (GimpSaveProcedure *save_procedure)
* @plug_in: a #GimpPlugIn.
* @name: the new procedure's name.
* @proc_type: the new procedure's #GimpPDBProcType.
* @export_metadata: whether GIMP should handle metadata exporting.
* @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.
@ -523,8 +535,12 @@ gimp_save_procedure_add_metadata (GimpSaveProcedure *save_procedure)
*
* When invoked via gimp_procedure_run(), it unpacks these standard
* arguments and calls @run_func which is a #GimpRunSaveFunc. The
* "args" #GimpValueArray of #GimpRunSaveFunc only contains
* additionally added arguments.
* #GimpProcedureConfig of #GimpRunSaveFunc only contains additionally added
* arguments.
*
* If @export_metadata is TRUE, then the class will also handle the metadata
* export if the format is supported by our backend. This requires you to also
* set appropriate MimeType with gimp_file_procedure_set_mime_types().
*
* Returns: a new #GimpProcedure.
*
@ -534,6 +550,7 @@ GimpProcedure *
gimp_save_procedure_new (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
gboolean export_metadata,
GimpRunSaveFunc run_func,
gpointer run_data,
GDestroyNotify run_data_destroy)
@ -553,74 +570,7 @@ gimp_save_procedure_new (GimpPlugIn *plug_in,
NULL);
procedure->priv->run_func = run_func;
procedure->priv->run_data = run_data;
procedure->priv->run_data_destroy = run_data_destroy;
return GIMP_PROCEDURE (procedure);
}
/**
* gimp_save_procedure_new:
* @plug_in: a #GimpPlugIn.
* @name: the new procedure's name.
* @proc_type: the new procedure's #GimpPDBProcType.
* @mimetype: the exported format's MimeType.
* @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 save procedure named @name which will call @run_func
* when invoked.
*
* See gimp_procedure_new() for information about @proc_type.
*
* #GimpSaveProcedure is a #GimpProcedure subclass that makes it easier
* to write file save procedures.
*
* It automatically adds the standard
*
* (#GimpRunMode, #GimpImage, #GimpDrawable, #GFile)
*
* arguments of a save procedure. It is possible to add additional
* arguments.
*
* When invoked via gimp_procedure_run(), it unpacks these standard
* arguments and calls @run_func which is a #GimpRunSaveFunc. The
* "args" #GimpValueArray of #GimpRunSaveFunc only contains
* additionally added arguments.
*
* If @mimetype is non-%NULL, then the class will also handle the metadata
* export if the format is supported by our backend.
*
* Returns: a new #GimpProcedure.
*
* Since: 3.0
**/
GimpProcedure *
gimp_save_procedure_new2 (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
const gchar *mimetype,
GimpRunSaveFunc2 run_func,
gpointer run_data,
GDestroyNotify run_data_destroy)
{
GimpSaveProcedure *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_SAVE_PROCEDURE,
"plug-in", plug_in,
"name", name,
"procedure-type", proc_type,
NULL);
procedure->priv->run_func2 = run_func;
procedure->priv->mimetype = g_strdup (mimetype);
procedure->priv->export_metadata = export_metadata;
procedure->priv->run_data = run_data;
procedure->priv->run_data_destroy = run_data_destroy;

View File

@ -37,34 +37,9 @@ G_BEGIN_DECLS
* @n_drawables: the number of drawables to save.
* @drawables: (array length=n_drawables): the drawables to save.
* @file: the #GFile to save to.
* @args: the @procedure's remaining arguments.
* @run_data: (closure): the run_data given in gimp_save_procedure_new().
*
* The save function is run during the lifetime of the GIMP session,
* each time a plug-in save procedure is called.
*
* Returns: (transfer full): the @procedure's return values.
*
* Since: 3.0
**/
typedef GimpValueArray * (* GimpRunSaveFunc) (GimpProcedure *procedure,
GimpRunMode run_mode,
GimpImage *image,
gint n_drawables,
GimpDrawable **drawables,
GFile *file,
const GimpValueArray *args,
gpointer run_data);
/**
* GimpRunSaveFunc2:
* @procedure: the #GimpProcedure that runs.
* @run_mode: the #GimpRunMode.
* @image: the image to save.
* @n_drawables: the number of drawables to save.
* @drawables: (array length=n_drawables): the drawables to save.
* @metadata: metadata object prepared for the mimetype passed in
* gimp_save_procedure_new().
* @file: the #GFile to save to.
* gimp_file_procedure_set_mime_types() if export_metadata
* argument was set in gimp_save_procedure_new().
* @config: the @procedure's remaining arguments.
* @run_data: (closure): the run_data given in gimp_save_procedure_new().
*
@ -80,7 +55,7 @@ typedef GimpValueArray * (* GimpRunSaveFunc) (GimpProcedure *procedure,
*
* Since: 3.0
**/
typedef GimpValueArray * (* GimpRunSaveFunc2) (GimpProcedure *procedure,
typedef GimpValueArray * (* GimpRunSaveFunc) (GimpProcedure *procedure,
GimpRunMode run_mode,
GimpImage *image,
gint n_drawables,
@ -121,16 +96,10 @@ GType gimp_save_procedure_get_type (void) G_GNUC_CONST;
GimpProcedure * gimp_save_procedure_new (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
gboolean export_metadata,
GimpRunSaveFunc run_func,
gpointer run_data,
GDestroyNotify run_data_destroy);
GimpProcedure * gimp_save_procedure_new2 (GimpPlugIn *plug_in,
const gchar *name,
GimpPDBProcType proc_type,
const gchar *mimetype,
GimpRunSaveFunc2 run_func,
gpointer run_data,
GDestroyNotify run_data_destroy);
void gimp_save_procedure_set_support_exif (GimpSaveProcedure *procedure,
gboolean supports);

View File

@ -123,9 +123,9 @@ ascii_create_procedure (GimpPlugIn *plug_in,
{
gint i;
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, ascii_save, NULL, NULL);
FALSE, ascii_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -164,9 +164,9 @@ cel_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, cel_save, NULL, NULL);
FALSE, cel_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, INDEXED*");

View File

@ -329,9 +329,9 @@ compressor_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, compressor->save_proc))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, compressor_save,
FALSE, compressor_save,
(gpointer) compressor, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*, INDEXED*");

View File

@ -114,9 +114,9 @@ csource_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, csource_save, NULL, NULL);
FALSE, csource_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -196,9 +196,9 @@ dicom_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, dicom_save, NULL, NULL);
FALSE, dicom_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB, GRAY");

View File

@ -117,9 +117,9 @@ gbr_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, gbr_save, NULL, NULL);
FALSE, gbr_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -213,9 +213,9 @@ goat_create_procedure (GimpPlugIn *plug_in,
}
else if (! g_strcmp0 (name, format->save_proc))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, goat_save,
FALSE, goat_save,
(gpointer) format, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -141,9 +141,9 @@ gif_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, gif_save, NULL, NULL);
FALSE, gif_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED*, GRAY*");

View File

@ -148,9 +148,9 @@ gih_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, gih_save, NULL, NULL);
FALSE, gih_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");

View File

@ -109,9 +109,9 @@ header_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, header_save, NULL, NULL);
FALSE, header_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, RGB");

View File

@ -223,9 +223,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, heif_save, NULL, NULL);
FALSE, heif_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*");
@ -332,9 +332,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC_AV1))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, heif_av1_save, NULL, NULL);
FALSE, heif_av1_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*");

View File

@ -145,9 +145,9 @@ html_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, html_save, NULL, NULL);
FALSE, html_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -158,9 +158,9 @@ jpegxl_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, jpegxl_save, NULL, NULL);
FALSE, jpegxl_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");

View File

@ -246,9 +246,9 @@ mng_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, mng_save, NULL, NULL);
FALSE, mng_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -104,9 +104,9 @@ pat_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pat_save, NULL, NULL);
FALSE, pat_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -263,9 +263,9 @@ pcx_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pcx_save, NULL, NULL);
FALSE, pcx_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, RGB, GRAY");

View File

@ -306,9 +306,9 @@ pdf_create_procedure (GimpPlugIn *plug_in,
if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"application/pdf", pdf_save, NULL, NULL);
TRUE, pdf_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -191,9 +191,9 @@ pix_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pix_save, NULL, NULL);
FALSE, pix_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -202,9 +202,9 @@ png_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"image/png", png_save, NULL, NULL);
TRUE, png_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -338,9 +338,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PNM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PNM),
NULL);
@ -375,9 +375,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PBM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PBM),
NULL);
@ -411,9 +411,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PGM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PGM),
NULL);
@ -447,9 +447,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PPM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PPM),
NULL);
@ -483,9 +483,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PAM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PAM),
NULL);
@ -512,9 +512,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, PFM_SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, pnm_save,
FALSE, pnm_save,
GINT_TO_POINTER (FILE_TYPE_PFM),
NULL);

View File

@ -441,9 +441,9 @@ ps_create_procedure (GimpPlugIn *plug_in,
else if (! strcmp (name, SAVE_PS_PROC) ||
! strcmp (name, SAVE_EPS_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, ps_save, NULL, NULL);
FALSE, ps_save, NULL, NULL);
if (! strcmp (name, SAVE_PS_PROC))
{

View File

@ -686,9 +686,9 @@ psp_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, psp_save, NULL, NULL);
FALSE, psp_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -156,9 +156,9 @@ qoi_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, qoi_save, NULL, NULL);
FALSE, qoi_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -444,9 +444,9 @@ raw_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, raw_save, NULL, NULL);
FALSE, raw_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB, RGBA");

View File

@ -292,9 +292,9 @@ sunras_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, sunras_save, NULL, NULL);
FALSE, sunras_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED");

View File

@ -278,9 +278,9 @@ tga_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, tga_save, NULL, NULL);
FALSE, tga_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -179,9 +179,9 @@ xbm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, xbm_save, NULL, NULL);
FALSE, xbm_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED");

View File

@ -340,9 +340,9 @@ xmc_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, xmc_save, NULL, NULL);
FALSE, xmc_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGBA");

View File

@ -223,9 +223,9 @@ xpm_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, xpm_save, NULL, NULL);
FALSE, xpm_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -346,9 +346,9 @@ xwd_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, xwd_save, NULL, NULL);
FALSE, xwd_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED");

View File

@ -170,9 +170,9 @@ bmp_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, bmp_save, NULL, NULL);
FALSE, bmp_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB*");

View File

@ -176,9 +176,9 @@ dds_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, dds_save, NULL, NULL);
FALSE, dds_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB");

View File

@ -209,9 +209,9 @@ fits_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, fits_save, NULL, NULL);
FALSE, fits_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED");

View File

@ -210,9 +210,9 @@ fli_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, fli_save, NULL, NULL);
FALSE, fli_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY");

View File

@ -167,9 +167,9 @@ icns_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, icns_save, NULL, NULL);
FALSE, icns_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -285,9 +285,9 @@ ico_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, ico_save, NULL, NULL);
FALSE, ico_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");
@ -310,9 +310,9 @@ ico_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_CUR_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, cur_save, NULL, NULL);
FALSE, cur_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");
@ -357,9 +357,9 @@ ico_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_ANI_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, ani_save, NULL, NULL);
FALSE, ani_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -172,9 +172,9 @@ jpeg_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"image/jpeg", jpeg_save, NULL, NULL);
TRUE, jpeg_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");

View File

@ -203,9 +203,9 @@ psd_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"image/x-psd", psd_save, NULL, NULL);
TRUE, psd_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -162,9 +162,9 @@ sgi_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
NULL, sgi_save, NULL, NULL);
FALSE, sgi_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -180,9 +180,9 @@ tiff_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"image/tiff", tiff_save, NULL, NULL);
TRUE, tiff_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");

View File

@ -140,9 +140,9 @@ webp_create_procedure (GimpPlugIn *plug_in,
}
else if (! strcmp (name, SAVE_PROC))
{
procedure = gimp_save_procedure_new2 (plug_in, name,
procedure = gimp_save_procedure_new (plug_in, name,
GIMP_PDB_PROC_TYPE_PLUGIN,
"image/webp", webp_save, NULL, NULL);
TRUE, webp_save, NULL, NULL);
gimp_procedure_set_image_types (procedure, "*");