mirror of https://github.com/GNOME/gimp.git
plug-ins: port to gimp_save_procedure_new2() all export procedures…
… which were using gimp_procedure_config_begin_export().
This commit is contained in:
parent
da7e8f3388
commit
b23519a401
|
@ -65,7 +65,8 @@ static GimpValueArray * csource_save (GimpProcedure *procedur
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static gboolean save_image (GFile *file,
|
||||
|
@ -113,9 +114,9 @@ csource_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
csource_save, NULL, NULL);
|
||||
NULL, csource_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -208,10 +209,10 @@ csource_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
gchar *prefixed_name;
|
||||
|
@ -225,9 +226,6 @@ csource_save (GimpProcedure *procedure,
|
|||
GIMP_PDB_CALLING_ERROR,
|
||||
NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
gimp_ui_init (PLUG_IN_BINARY);
|
||||
|
||||
export = gimp_export_image (&image, &n_drawables, &drawables, "C Source",
|
||||
|
@ -283,9 +281,6 @@ csource_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -81,7 +81,8 @@ static GimpValueArray * gif_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static gboolean save_image (GFile *file,
|
||||
|
@ -140,9 +141,9 @@ gif_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
gif_save, NULL, NULL);
|
||||
NULL, gif_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED*, GRAY*");
|
||||
|
||||
|
@ -259,10 +260,10 @@ gif_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpImage *orig_image;
|
||||
|
@ -271,9 +272,6 @@ gif_save (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
orig_image = image;
|
||||
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE ||
|
||||
|
@ -363,9 +361,6 @@ gif_save (GimpProcedure *procedure,
|
|||
gimp_image_delete (sanitized_image);
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -163,7 +163,8 @@ static GimpValueArray * mng_save (GimpProcedure *procedur
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static mng_ptr MNG_DECL myalloc (mng_size_t size);
|
||||
|
@ -245,9 +246,9 @@ mng_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
mng_save, NULL, NULL);
|
||||
NULL, mng_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -361,19 +362,16 @@ mng_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_IGNORE;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE ||
|
||||
run_mode == GIMP_RUN_WITH_LAST_VALS)
|
||||
{
|
||||
|
@ -407,9 +405,6 @@ mng_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -189,7 +189,8 @@ static GimpValueArray * pdf_save (GimpProcedure *procedur
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GimpValueArray * pdf_save_multi (GimpProcedure *procedure,
|
||||
GimpProcedureConfig *config,
|
||||
|
@ -305,9 +306,9 @@ pdf_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pdf_save, NULL, NULL);
|
||||
"application/pdf", pdf_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -472,10 +473,10 @@ pdf_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
gboolean had_saved_list = FALSE;
|
||||
|
@ -485,9 +486,6 @@ pdf_save (GimpProcedure *procedure,
|
|||
/* Initializing all the settings */
|
||||
multi_page.image_count = 0;
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "application/pdf");
|
||||
file_name = g_file_get_path (file);
|
||||
|
||||
switch (run_mode)
|
||||
|
@ -526,9 +524,6 @@ pdf_save (GimpProcedure *procedure,
|
|||
(run_mode != GIMP_RUN_NONINTERACTIVE),
|
||||
&error);
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
return gimp_procedure_new_return_values (procedure, status, error);
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,8 @@ static GimpValueArray * png_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * load_image (GFile *file,
|
||||
|
@ -201,9 +202,9 @@ png_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
png_save, NULL, NULL);
|
||||
"image/png", png_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -374,23 +375,18 @@ png_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
GimpImage *orig_image;
|
||||
gboolean alpha;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
metadata = gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "image/png");
|
||||
|
||||
orig_image = image;
|
||||
|
||||
switch (run_mode)
|
||||
|
@ -461,9 +457,6 @@ png_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -155,7 +155,8 @@ static GimpValueArray * pnm_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * load_image (GFile *file,
|
||||
|
@ -337,9 +338,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PNM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PNM),
|
||||
NULL);
|
||||
|
||||
|
@ -374,9 +375,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PBM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PBM),
|
||||
NULL);
|
||||
|
||||
|
@ -410,9 +411,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PGM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PGM),
|
||||
NULL);
|
||||
|
||||
|
@ -446,9 +447,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PPM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PPM),
|
||||
NULL);
|
||||
|
||||
|
@ -482,9 +483,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PAM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PAM),
|
||||
NULL);
|
||||
|
||||
|
@ -511,9 +512,9 @@ pnm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, PFM_SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pnm_save,
|
||||
NULL, pnm_save,
|
||||
GINT_TO_POINTER (FILE_TYPE_PFM),
|
||||
NULL);
|
||||
|
||||
|
@ -578,10 +579,10 @@ pnm_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
FileType file_type = GPOINTER_TO_INT (run_data);
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
|
@ -590,9 +591,6 @@ pnm_save (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -683,9 +681,6 @@ pnm_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -175,7 +175,8 @@ static GimpValueArray * raw_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
/* prototypes for the new load functions */
|
||||
|
@ -443,9 +444,9 @@ raw_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
raw_save, NULL, NULL);
|
||||
NULL, raw_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB, RGBA");
|
||||
|
||||
|
@ -612,10 +613,10 @@ raw_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
RawPlanarConfiguration planar_conf;
|
||||
|
@ -623,9 +624,6 @@ raw_save (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
g_object_get (config,
|
||||
"planar-configuration", &planar_conf,
|
||||
NULL);
|
||||
|
@ -680,9 +678,6 @@ raw_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -89,7 +89,8 @@ static GimpValueArray * xbm_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * load_image (GFile *file,
|
||||
|
@ -178,9 +179,9 @@ xbm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
xbm_save, NULL, NULL);
|
||||
NULL, xbm_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED");
|
||||
|
||||
|
@ -336,10 +337,10 @@ xbm_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
gchar *mask_basename = NULL;
|
||||
|
@ -347,9 +348,6 @@ xbm_save (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -486,9 +484,6 @@ xbm_save (GimpProcedure *procedure,
|
|||
g_object_unref (mask_file);
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -173,7 +173,8 @@ static GimpValueArray * xmc_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * load_image (GFile *file,
|
||||
|
@ -339,9 +340,9 @@ xmc_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
xmc_save, NULL, NULL);
|
||||
NULL, xmc_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGBA");
|
||||
|
||||
|
@ -513,10 +514,10 @@ xmc_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpImage *orig_image;
|
||||
|
@ -543,9 +544,6 @@ xmc_save (GimpProcedure *procedure,
|
|||
error);
|
||||
}
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_export (config, image, run_mode, args, NULL);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -616,9 +614,6 @@ xmc_save (GimpProcedure *procedure,
|
|||
|
||||
g_free (hotspot_range);
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
return gimp_procedure_new_return_values (procedure, status, error);
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,8 @@ static GimpValueArray * jpeg_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
|
@ -171,9 +172,9 @@ jpeg_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
jpeg_save, NULL, NULL);
|
||||
"image/jpeg", jpeg_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*");
|
||||
|
||||
|
@ -428,12 +429,11 @@ jpeg_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpProcedureConfig *config;
|
||||
GimpMetadata *metadata;
|
||||
GimpImage *orig_image;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
@ -444,9 +444,6 @@ jpeg_save (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
metadata = gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "image/jpeg");
|
||||
preview_image = NULL;
|
||||
preview_layer = NULL;
|
||||
|
||||
|
@ -610,9 +607,6 @@ jpeg_save (GimpProcedure *procedure,
|
|||
gimp_metadata_set_bits_per_sample (metadata, 8);
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
/* If the image was exported, delete the new display. This also
|
||||
|
|
|
@ -72,7 +72,8 @@ static GimpValueArray * psd_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GimpValueArray * psd_load_metadata (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
|
@ -202,9 +203,9 @@ psd_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
psd_save, NULL, NULL);
|
||||
"image/x-psd", psd_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -433,21 +434,16 @@ psd_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpMetadata *metadata;
|
||||
GimpExportReturn export = GIMP_EXPORT_IGNORE;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
metadata = gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "image/x-psd");
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -488,9 +484,6 @@ psd_save (GimpProcedure *procedure,
|
|||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -95,7 +95,8 @@ static GimpValueArray * tiff_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GimpPDBStatusType tiff_save_rec (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
|
@ -179,9 +180,9 @@ tiff_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
tiff_save, NULL, NULL);
|
||||
"image/tiff", tiff_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -332,20 +333,15 @@ tiff_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpMetadata *metadata;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
metadata = gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "image/tiff");
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -360,9 +356,6 @@ tiff_save (GimpProcedure *procedure,
|
|||
n_drawables, drawables,
|
||||
file, config, metadata, FALSE, &error);
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
return gimp_procedure_new_return_values (procedure, status, error);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@ static GimpValueArray * webp_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
|
@ -139,9 +140,9 @@ webp_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
webp_save, NULL, NULL);
|
||||
"image/webp", webp_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -281,22 +282,17 @@ webp_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
gboolean animation;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
metadata = gimp_procedure_config_begin_export (config, image, run_mode,
|
||||
args, "image/webp");
|
||||
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE ||
|
||||
run_mode == GIMP_RUN_WITH_LAST_VALS)
|
||||
gimp_ui_init (PLUG_IN_BINARY);
|
||||
|
@ -375,9 +371,6 @@ webp_save (GimpProcedure *procedure,
|
|||
gimp_metadata_set_bits_per_sample (metadata, 8);
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_export (config, image, file, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
Loading…
Reference in New Issue