mirror of https://github.com/GNOME/gimp.git
plug-ins: port most plug-ins to gimp_save_procedure_new2().
This commit is contained in:
parent
51b14a7978
commit
9ed8f00e5b
|
@ -70,7 +70,8 @@ static GimpValueArray * ascii_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static gboolean save_aa (GFile *file,
|
||||
|
@ -122,9 +123,9 @@ ascii_create_procedure (GimpPlugIn *plug_in,
|
|||
{
|
||||
gint i;
|
||||
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
ascii_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, ascii_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -168,19 +169,16 @@ ascii_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;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -227,9 +225,6 @@ ascii_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -71,7 +71,8 @@ static GimpValueArray * cel_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static gint load_palette (GFile *file,
|
||||
|
@ -163,9 +164,9 @@ cel_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
cel_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, cel_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, INDEXED*");
|
||||
|
||||
|
@ -274,12 +275,13 @@ cel_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;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
|
|
|
@ -159,7 +159,8 @@ static GimpValueArray * compressor_save (GimpProcedure *proce
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GimpValueArray * compressor_load (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
|
@ -328,10 +329,10 @@ compressor_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, compressor->save_proc))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
compressor_save,
|
||||
(gpointer) compressor, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, compressor_save,
|
||||
(gpointer) compressor, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*, GRAY*, INDEXED*");
|
||||
|
||||
|
@ -400,7 +401,8 @@ compressor_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
const CompressorEntry *compressor = run_data;
|
||||
|
|
|
@ -59,7 +59,8 @@ static GimpValueArray * header_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,
|
||||
|
@ -108,9 +109,9 @@ header_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
header_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, header_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED, RGB");
|
||||
|
||||
|
@ -144,7 +145,8 @@ header_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;
|
||||
|
|
|
@ -84,7 +84,8 @@ static GimpValueArray * heif_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
#if LIBHEIF_HAVE_VERSION(1,8,0)
|
||||
|
@ -94,7 +95,8 @@ static GimpValueArray * heif_av1_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
#endif
|
||||
|
||||
|
@ -221,9 +223,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
heif_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, heif_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*");
|
||||
|
||||
|
@ -330,9 +332,9 @@ heif_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC_AV1))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
heif_av1_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, heif_av1_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB*");
|
||||
|
||||
|
@ -461,20 +463,17 @@ heif_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata_unused,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -537,9 +536,6 @@ heif_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
@ -557,20 +553,17 @@ heif_av1_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata_unused,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpProcedureConfig *config;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpMetadata *metadata;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -633,9 +626,6 @@ heif_av1_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -90,7 +90,8 @@ static GimpValueArray * html_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,
|
||||
|
@ -144,9 +145,9 @@ html_create_procedure (GimpPlugIn *plug_in,
|
|||
|
||||
if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
html_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, html_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -260,13 +261,13 @@ html_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;
|
||||
GeglBuffer *buffer;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GeglBuffer *buffer;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
|
@ -275,9 +276,6 @@ html_save (GimpProcedure *procedure,
|
|||
GIMP_PDB_CALLING_ERROR,
|
||||
NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
if (! save_dialog (image, procedure, G_OBJECT (config)))
|
||||
return gimp_procedure_new_return_values (procedure,
|
||||
GIMP_PDB_CANCEL,
|
||||
|
@ -303,9 +301,6 @@ html_save (GimpProcedure *procedure,
|
|||
|
||||
g_object_unref (buffer);
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
return gimp_procedure_new_return_values (procedure, status, error);
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ static GimpValueArray * pcx_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
static GimpImage * load_single (GimpProcedure *procedure,
|
||||
|
@ -262,9 +263,9 @@ pcx_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pcx_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, pcx_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED, RGB, GRAY");
|
||||
|
||||
|
@ -377,7 +378,8 @@ pcx_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;
|
||||
|
|
|
@ -101,7 +101,8 @@ static GimpValueArray * pix_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,
|
||||
|
@ -190,9 +191,9 @@ pix_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
pix_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, pix_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -255,7 +256,8 @@ pix_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;
|
||||
|
|
|
@ -147,7 +147,8 @@ static GimpValueArray * ps_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,
|
||||
|
@ -440,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_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
ps_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, ps_save, NULL, NULL);
|
||||
|
||||
if (! strcmp (name, SAVE_PS_PROC))
|
||||
{
|
||||
|
@ -672,21 +673,18 @@ ps_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;
|
||||
gboolean eps_flag = FALSE;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GimpImage *orig_image;
|
||||
gboolean eps_flag = FALSE;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
eps_flag = strcmp (gimp_procedure_get_name (procedure), SAVE_PS_PROC);
|
||||
g_object_set (config,
|
||||
"eps-flag", eps_flag ? 1 : 0,
|
||||
|
@ -763,9 +761,6 @@ ps_save (GimpProcedure *procedure,
|
|||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -121,7 +121,8 @@ static GimpValueArray * sunras_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,
|
||||
|
@ -291,9 +292,9 @@ sunras_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
sunras_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, sunras_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED");
|
||||
|
||||
|
@ -364,19 +365,16 @@ sunras_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;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -426,9 +424,6 @@ sunras_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -115,7 +115,8 @@ static GimpValueArray * xpm_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,
|
||||
|
@ -222,9 +223,9 @@ xpm_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
xpm_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, xpm_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -301,19 +302,16 @@ xpm_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;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -362,9 +360,6 @@ xpm_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -100,7 +100,8 @@ static GimpValueArray * bmp_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
|
@ -169,9 +170,9 @@ bmp_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
bmp_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, bmp_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB*");
|
||||
|
||||
|
@ -255,19 +256,16 @@ bmp_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;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -304,9 +302,6 @@ bmp_save (GimpProcedure *procedure,
|
|||
procedure, G_OBJECT (config),
|
||||
&error);
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -98,7 +98,8 @@ static GimpValueArray * fits_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,
|
||||
|
@ -208,9 +209,9 @@ fits_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
fits_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, fits_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED");
|
||||
|
||||
|
@ -288,7 +289,8 @@ fits_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpImage *duplicate_image;
|
||||
|
@ -1061,4 +1063,4 @@ show_fits_errors (gint status)
|
|||
/* Write out error messages of FITS-Library */
|
||||
fits_get_errstatus (status, status_str);
|
||||
g_message ("FITS: %s\n", status_str);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -105,7 +105,8 @@ static GimpValueArray * fli_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
static GimpValueArray * fli_info (GimpProcedure *procedure,
|
||||
GimpProcedureConfig *config,
|
||||
|
@ -209,9 +210,9 @@ fli_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
fli_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, fli_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "INDEXED, GRAY");
|
||||
|
||||
|
@ -341,19 +342,16 @@ fli_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;
|
||||
GError *error = NULL;
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
GimpExportReturn export = GIMP_EXPORT_CANCEL;
|
||||
GError *error = NULL;
|
||||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
config = gimp_procedure_create_config (procedure);
|
||||
gimp_procedure_config_begin_run (config, image, run_mode, args);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
case GIMP_RUN_INTERACTIVE:
|
||||
|
@ -391,9 +389,6 @@ fli_save (GimpProcedure *procedure,
|
|||
}
|
||||
}
|
||||
|
||||
gimp_procedure_config_end_run (config, status);
|
||||
g_object_unref (config);
|
||||
|
||||
if (export == GIMP_EXPORT_EXPORT)
|
||||
{
|
||||
gimp_image_delete (image);
|
||||
|
|
|
@ -80,7 +80,8 @@ static GimpValueArray * icns_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
|
@ -166,9 +167,9 @@ icns_create_procedure (GimpPlugIn *plug_in,
|
|||
}
|
||||
else if (! strcmp (name, SAVE_PROC))
|
||||
{
|
||||
procedure = gimp_save_procedure_new (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
icns_save, NULL, NULL);
|
||||
procedure = gimp_save_procedure_new2 (plug_in, name,
|
||||
GIMP_PDB_PROC_TYPE_PLUGIN,
|
||||
NULL, icns_save, NULL, NULL);
|
||||
|
||||
gimp_procedure_set_image_types (procedure, "*");
|
||||
|
||||
|
@ -268,7 +269,8 @@ icns_save (GimpProcedure *procedure,
|
|||
gint n_drawables,
|
||||
GimpDrawable **drawables,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
GimpMetadata *metadata,
|
||||
GimpProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
GimpPDBStatusType status;
|
||||
|
|
Loading…
Reference in New Issue