From 14bcaa717b18797e06f8d9653ade4e883fec9b86 Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 20 Jul 2023 23:58:41 +0200 Subject: [PATCH] plug-ins: a bunch of more plug-ins ported to gimp_save_procedure_new2(). --- plug-ins/common/file-dicom.c | 12 ++--- plug-ins/common/file-gbr.c | 27 +++++------ plug-ins/common/file-gegl.c | 12 ++--- plug-ins/common/file-jpegxl.c | 26 +++++------ plug-ins/common/file-pat.c | 27 +++++------ plug-ins/common/file-psp.c | 25 +++++------ plug-ins/common/file-qoi.c | 12 ++--- plug-ins/common/file-tga.c | 25 +++++------ plug-ins/common/file-xwd.c | 18 ++++---- plug-ins/file-dds/dds.c | 27 +++++------ plug-ins/file-ico/ico.c | 84 ++++++++++++++++------------------- plug-ins/file-sgi/sgi.c | 25 +++++------ 12 files changed, 142 insertions(+), 178 deletions(-) diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c index f76675856a..9939195a48 100644 --- a/plug-ins/common/file-dicom.c +++ b/plug-ins/common/file-dicom.c @@ -96,7 +96,8 @@ static GimpValueArray * dicom_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, @@ -195,9 +196,9 @@ dicom_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - dicom_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, dicom_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "RGB, GRAY"); @@ -267,7 +268,8 @@ dicom_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; diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c index fe0b2ceb89..9f6b0237c5 100644 --- a/plug-ins/common/file-gbr.c +++ b/plug-ins/common/file-gbr.c @@ -73,7 +73,8 @@ static GimpValueArray * gbr_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); static gboolean save_dialog (GimpProcedure *procedure, @@ -116,9 +117,9 @@ gbr_create_procedure (GimpPlugIn *plug_in, if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - gbr_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, gbr_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -170,17 +171,14 @@ gbr_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 *description; - GError *error = NULL; - - config = gimp_procedure_create_config (procedure); - gimp_procedure_config_begin_run (config, image, run_mode, args); + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpExportReturn export = GIMP_EXPORT_CANCEL; + gchar *description; + GError *error = NULL; g_object_get (config, "description", &description, @@ -277,9 +275,6 @@ gbr_save (GimpProcedure *procedure, gimp_value_array_unref (save_retvals); } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { gimp_image_delete (image); diff --git a/plug-ins/common/file-gegl.c b/plug-ins/common/file-gegl.c index f8f3c3dedc..d7f0e48bdc 100644 --- a/plug-ins/common/file-gegl.c +++ b/plug-ins/common/file-gegl.c @@ -89,7 +89,8 @@ static GimpValueArray * goat_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, @@ -212,9 +213,9 @@ goat_create_procedure (GimpPlugIn *plug_in, } else if (! g_strcmp0 (name, format->save_proc)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - goat_save, + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, goat_save, (gpointer) format, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -273,7 +274,8 @@ goat_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data) { const FileFormat *format = run_data; diff --git a/plug-ins/common/file-jpegxl.c b/plug-ins/common/file-jpegxl.c index 8d6406357d..4f18868d59 100644 --- a/plug-ins/common/file-jpegxl.c +++ b/plug-ins/common/file-jpegxl.c @@ -70,7 +70,8 @@ static GimpValueArray *jpegxl_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); static void create_cmyk_layer (GimpImage *image, @@ -157,9 +158,9 @@ jpegxl_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - jpegxl_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, jpegxl_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "RGB*, GRAY*"); @@ -2111,19 +2112,16 @@ jpegxl_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; - 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: @@ -2182,10 +2180,6 @@ jpegxl_save (GimpProcedure *procedure, } } - - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { g_free (drawables); diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c index a9e3bce3cd..99ea71428a 100644 --- a/plug-ins/common/file-pat.c +++ b/plug-ins/common/file-pat.c @@ -60,7 +60,8 @@ static GimpValueArray * pat_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); static gboolean save_dialog (GimpImage *image, @@ -103,9 +104,9 @@ pat_create_procedure (GimpPlugIn *plug_in, if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - pat_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, pat_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -149,17 +150,14 @@ pat_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 *description; - GError *error = NULL; - - config = gimp_procedure_create_config (procedure); - gimp_procedure_config_begin_run (config, image, run_mode, args); + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpExportReturn export = GIMP_EXPORT_CANCEL; + gchar *description; + GError *error = NULL; g_object_get (config, "description", &description, @@ -247,9 +245,6 @@ pat_save (GimpProcedure *procedure, gimp_value_array_unref (save_retvals); } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { gimp_image_delete (image); diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c index 7c9340ee2b..6cea0fd507 100644 --- a/plug-ins/common/file-psp.c +++ b/plug-ins/common/file-psp.c @@ -595,7 +595,8 @@ static GimpValueArray * psp_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, @@ -685,9 +686,9 @@ psp_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - psp_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, psp_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -759,19 +760,16 @@ psp_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: @@ -810,9 +808,6 @@ psp_save (GimpProcedure *procedure, } } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { gimp_image_delete (image); diff --git a/plug-ins/common/file-qoi.c b/plug-ins/common/file-qoi.c index c1d6f62419..e440f6c55c 100644 --- a/plug-ins/common/file-qoi.c +++ b/plug-ins/common/file-qoi.c @@ -76,7 +76,8 @@ static GimpValueArray * qoi_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, @@ -155,9 +156,9 @@ qoi_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - qoi_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, qoi_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -225,7 +226,8 @@ qoi_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; diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c index 8cb8be3fc4..452bb12082 100644 --- a/plug-ins/common/file-tga.c +++ b/plug-ins/common/file-tga.c @@ -185,7 +185,8 @@ static GimpValueArray * tga_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, @@ -277,9 +278,9 @@ tga_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - tga_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, tga_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -353,19 +354,16 @@ tga_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: @@ -413,9 +411,6 @@ tga_save (GimpProcedure *procedure, } } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { gimp_image_delete (image); diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c index 32fe1f27e7..32d6a4089f 100644 --- a/plug-ins/common/file-xwd.c +++ b/plug-ins/common/file-xwd.c @@ -170,7 +170,8 @@ static GimpValueArray * xwd_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, @@ -345,9 +346,9 @@ xwd_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - xwd_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, xwd_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "RGB, GRAY, INDEXED"); @@ -411,12 +412,13 @@ xwd_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); diff --git a/plug-ins/file-dds/dds.c b/plug-ins/file-dds/dds.c index 81e9d61522..063f1de800 100644 --- a/plug-ins/file-dds/dds.c +++ b/plug-ins/file-dds/dds.c @@ -81,7 +81,8 @@ static GimpValueArray * dds_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); #if 0 static GimpValueArray * dds_decode (GimpProcedure *procedure, @@ -175,9 +176,9 @@ dds_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - dds_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, dds_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "INDEXED, GRAY, RGB"); @@ -428,20 +429,17 @@ dds_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; - gdouble gamma; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpExportReturn export = GIMP_EXPORT_CANCEL; + GError *error = NULL; + gdouble gamma; gegl_init (NULL, NULL); - config = gimp_procedure_create_config (procedure); - gimp_procedure_config_begin_run (config, NULL, run_mode, args); - switch (run_mode) { case GIMP_RUN_INTERACTIVE: @@ -492,9 +490,6 @@ dds_save (GimpProcedure *procedure, g_free (drawables); } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - return gimp_procedure_new_return_values (procedure, status, error); } diff --git a/plug-ins/file-ico/ico.c b/plug-ins/file-ico/ico.c index 0e1db1ef6c..e4e48ed48b 100644 --- a/plug-ins/file-ico/ico.c +++ b/plug-ins/file-ico/ico.c @@ -95,7 +95,8 @@ static GimpValueArray * ico_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); static GimpValueArray * cur_save (GimpProcedure *procedure, GimpRunMode run_mode, @@ -103,7 +104,8 @@ static GimpValueArray * cur_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); static GimpValueArray * ani_save (GimpProcedure *procedure, GimpRunMode run_mode, @@ -111,7 +113,8 @@ static GimpValueArray * ani_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data); @@ -282,9 +285,9 @@ ico_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - ico_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, ico_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -307,9 +310,9 @@ ico_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_CUR_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - cur_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, cur_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -354,9 +357,9 @@ ico_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_ANI_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - ani_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, ani_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -566,7 +569,8 @@ ico_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data) { GimpPDBStatusType status; @@ -586,22 +590,19 @@ cur_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data) { - GimpProcedureConfig *config; - GimpPDBStatusType status; - GError *error = NULL; - gint32 *hot_spot_x = NULL; - gint32 *hot_spot_y = NULL; - gint n_hot_spot_x = 0; - gint n_hot_spot_y = 0; + GimpPDBStatusType status; + GError *error = NULL; + gint32 *hot_spot_x = NULL; + gint32 *hot_spot_y = NULL; + gint n_hot_spot_x = 0; + gint n_hot_spot_y = 0; gegl_init (NULL, NULL); - config = gimp_procedure_create_config (procedure); - gimp_procedure_config_begin_run (config, image, run_mode, args); - g_object_get (config, "n-hot-spot-x", &n_hot_spot_x, "n-hot-spot-y", &n_hot_spot_y, @@ -630,9 +631,6 @@ cur_save (GimpProcedure *procedure, g_free (hot_spot_y); } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - return gimp_procedure_new_return_values (procedure, status, error); } @@ -643,27 +641,24 @@ ani_save (GimpProcedure *procedure, gint n_drawables, GimpDrawable **drawables, GFile *file, - const GimpValueArray *args, + GimpMetadata *metadata, + GimpProcedureConfig *config, gpointer run_data) { - GimpProcedureConfig *config; - GimpPDBStatusType status; - GError *error = NULL; - gchar *inam = NULL; - gchar *iart = NULL; - gint jif_rate = 0; - gint32 *hot_spot_x = NULL; - gint32 *hot_spot_y = NULL; - gint n_hot_spot_x = 0; - gint n_hot_spot_y = 0; - AniFileHeader header; - AniSaveInfo ani_info; + GimpPDBStatusType status; + GError *error = NULL; + gchar *inam = NULL; + gchar *iart = NULL; + gint jif_rate = 0; + gint32 *hot_spot_x = NULL; + gint32 *hot_spot_y = NULL; + gint n_hot_spot_x = 0; + gint n_hot_spot_y = 0; + AniFileHeader header; + AniSaveInfo ani_info; gegl_init (NULL, NULL); - config = gimp_procedure_create_config (procedure); - gimp_procedure_config_begin_run (config, image, run_mode, args); - g_object_get (config, "cursor-name", &inam, "author-name", &iart, @@ -709,9 +704,6 @@ ani_save (GimpProcedure *procedure, memset (&ani_info, 0, sizeof (AniSaveInfo)); } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - return gimp_procedure_new_return_values (procedure, status, error); } diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c index cea189b9a2..7435fd2507 100644 --- a/plug-ins/file-sgi/sgi.c +++ b/plug-ins/file-sgi/sgi.c @@ -80,7 +80,8 @@ static GimpValueArray * sgi_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, @@ -161,9 +162,9 @@ sgi_create_procedure (GimpPlugIn *plug_in, } else if (! strcmp (name, SAVE_PROC)) { - procedure = gimp_save_procedure_new (plug_in, name, - GIMP_PDB_PROC_TYPE_PLUGIN, - sgi_save, NULL, NULL); + procedure = gimp_save_procedure_new2 (plug_in, name, + GIMP_PDB_PROC_TYPE_PLUGIN, + NULL, sgi_save, NULL, NULL); gimp_procedure_set_image_types (procedure, "*"); @@ -233,19 +234,16 @@ sgi_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: @@ -293,9 +291,6 @@ sgi_save (GimpProcedure *procedure, } } - gimp_procedure_config_end_run (config, status); - g_object_unref (config); - if (export == GIMP_EXPORT_EXPORT) { gimp_image_delete (image);