From cf988e7d76b4e59c6ebc808a389315cf102faaee Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 10 Nov 2013 00:18:48 +0100 Subject: [PATCH] plug-ins: pass the format's name again in calls to gimp_export_image() and clean up the formatting of the call and the lines around it. Now we can check the various (disabled) export options for regressions again by changing a single line in gimp_export_image(). (cherry picked from commit 03df8c6af4ec4e5d547e9fff46d0710b3c262c58) --- plug-ins/common/file-aa.c | 10 ++++++---- plug-ins/common/file-cel.c | 11 ++++++----- plug-ins/common/file-csource.c | 6 +++--- plug-ins/common/file-dicom.c | 4 ++-- plug-ins/common/file-gbr.c | 8 +++++--- plug-ins/common/file-gif-save.c | 2 +- plug-ins/common/file-gih.c | 4 +++- plug-ins/common/file-header.c | 8 +++++--- plug-ins/common/file-mng.c | 17 +++++++++-------- plug-ins/common/file-pat.c | 6 ++++-- plug-ins/common/file-pcx.c | 9 +++++---- plug-ins/common/file-pix.c | 8 +++++--- plug-ins/common/file-png.c | 11 ++++++----- plug-ins/common/file-pnm.c | 8 ++++---- plug-ins/common/file-ps.c | 11 +++++++---- plug-ins/common/file-psp.c | 4 +++- plug-ins/common/file-sunras.c | 10 ++++++---- plug-ins/common/file-tga.c | 11 ++++++----- plug-ins/common/file-tiff-save.c | 12 +++++++----- plug-ins/common/file-xbm.c | 3 ++- plug-ins/common/file-xmc.c | 12 +++++++----- plug-ins/common/file-xpm.c | 11 ++++++----- plug-ins/common/file-xwd.c | 10 ++++++---- plug-ins/file-bmp/bmp.c | 16 ++++++++++------ plug-ins/file-fits/fits.c | 30 ++++++++++++++++-------------- plug-ins/file-fli/fli-gimp.c | 4 +++- plug-ins/file-jpeg/jpeg.c | 8 +++++--- plug-ins/file-psd/psd-save.c | 3 ++- plug-ins/file-psd/psd.c | 4 +++- plug-ins/file-sgi/sgi.c | 10 ++++++---- 30 files changed, 159 insertions(+), 112 deletions(-) diff --git a/plug-ins/common/file-aa.c b/plug-ins/common/file-aa.c index 1a08cf16f5..a42077f05a 100644 --- a/plug-ins/common/file-aa.c +++ b/plug-ins/common/file-aa.c @@ -160,10 +160,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_ALPHA )); + + export = gimp_export_image (&image_ID, &drawable_ID, "AA", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c index f1aed6f67a..d74b6363fb 100644 --- a/plug-ins/common/file-cel.c +++ b/plug-ins/common/file-cel.c @@ -237,11 +237,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_ALPHA | - GIMP_EXPORT_CAN_HANDLE_INDEXED - )); + + export = gimp_export_image (&image_ID, &drawable_ID, "CEL", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_ALPHA | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c index 3d505d8e5e..aa6dd048ba 100644 --- a/plug-ins/common/file-csource.c +++ b/plug-ins/common/file-csource.c @@ -172,9 +172,9 @@ run (const gchar *name, gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_ALPHA )); + export = gimp_export_image (&image_ID, &drawable_ID, "C Source", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_ALPHA); if (export == GIMP_EXPORT_CANCEL) { diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c index ea9abb5f0b..a03c952037 100644 --- a/plug-ins/common/file-dicom.c +++ b/plug-ins/common/file-dicom.c @@ -229,10 +229,10 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "DICOM", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c index 18768a05e6..4b7e7c3d06 100644 --- a/plug-ins/common/file-gbr.c +++ b/plug-ins/common/file-gbr.c @@ -239,10 +239,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_RGB | + + export = gimp_export_image (&image_ID, &drawable_ID, "GBR", + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c index 37b2ce0f12..ac967e962e 100644 --- a/plug-ins/common/file-gif-save.c +++ b/plug-ins/common/file-gif-save.c @@ -281,7 +281,7 @@ run (const gchar *name, if (gsvals.as_animation) capabilities |= GIMP_EXPORT_CAN_HANDLE_LAYERS; - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "GIF", capabilities); if (export == GIMP_EXPORT_CANCEL) diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c index 283de93eae..df1db893ab 100644 --- a/plug-ins/common/file-gih.c +++ b/plug-ins/common/file-gih.c @@ -295,11 +295,13 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "GIH", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-header.c b/plug-ins/common/file-header.c index e8e2269b1c..827065c87b 100644 --- a/plug-ins/common/file-header.c +++ b/plug-ins/common/file-header.c @@ -119,9 +119,11 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + + export = gimp_export_image (&image_ID, &drawable_ID, "Header", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c index 6a9a4a7dc9..c05bc52e37 100644 --- a/plug-ins/common/file-mng.c +++ b/plug-ins/common/file-mng.c @@ -1639,18 +1639,19 @@ run (const gchar *name, gint32 drawable_id = param[2].data.d_int32; GimpExportReturn export = GIMP_EXPORT_IGNORE; - if ((run_mode == GIMP_RUN_INTERACTIVE) - || (run_mode == GIMP_RUN_WITH_LAST_VALS)) + if (run_mode == GIMP_RUN_INTERACTIVE || + run_mode == GIMP_RUN_WITH_LAST_VALS) { gimp_procedural_db_get_data (SAVE_PROC, &mng_data); gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_id, &drawable_id, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED | - GIMP_EXPORT_CAN_HANDLE_ALPHA | - GIMP_EXPORT_CAN_HANDLE_LAYERS)); + + export = gimp_export_image (&image_id, &drawable_id, "MNG", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_ALPHA | + GIMP_EXPORT_CAN_HANDLE_LAYERS); } if (export == GIMP_EXPORT_CANCEL) diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c index 7c12dc0acb..26d7e0578c 100644 --- a/plug-ins/common/file-pat.c +++ b/plug-ins/common/file-pat.c @@ -209,10 +209,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "PAT", GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c index 2666979f49..09f737eb79 100644 --- a/plug-ins/common/file-pcx.c +++ b/plug-ins/common/file-pcx.c @@ -211,10 +211,11 @@ run (const gchar *name, case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + export = gimp_export_image (&image_ID, &drawable_ID, "PCX", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c index 6b258e115e..5e267a028a 100644 --- a/plug-ins/common/file-pix.c +++ b/plug-ins/common/file-pix.c @@ -230,9 +230,11 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY)); + + export = gimp_export_image (&image_ID, &drawable_ID, "PIX", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c index 4e590a926c..885c77ae78 100644 --- a/plug-ins/common/file-png.c +++ b/plug-ins/common/file-png.c @@ -450,11 +450,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED | - GIMP_EXPORT_CAN_HANDLE_ALPHA)); + + export = gimp_export_image (&image_ID, &drawable_ID, "PNG", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_ALPHA); if (export == GIMP_EXPORT_CANCEL) { diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c index f47054d087..52a6e981b0 100644 --- a/plug-ins/common/file-pnm.c +++ b/plug-ins/common/file-pnm.c @@ -374,25 +374,25 @@ run (const gchar *name, if (strcmp (name, PNM_SAVE_PROC) == 0) { - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "PNM", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED); } else if (strcmp (name, PBM_SAVE_PROC) == 0) { - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "PBM", GIMP_EXPORT_CAN_HANDLE_BITMAP); pbm = TRUE; /* gimp has no mono image type so hack it */ } else if (strcmp (name, PGM_SAVE_PROC) == 0) { - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "PGM", GIMP_EXPORT_CAN_HANDLE_GRAY); } else { - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + export = gimp_export_image (&image_ID, &drawable_ID, "PPM", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_INDEXED); } diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c index 399f984e61..6bd59c9a49 100644 --- a/plug-ins/common/file-ps.c +++ b/plug-ins/common/file-ps.c @@ -862,10 +862,13 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + + export = gimp_export_image (&image_ID, &drawable_ID, + psvals.eps ? "EPS" : "PostScript", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c index 5c8982a75a..ac0fff78f0 100644 --- a/plug-ins/common/file-psp.c +++ b/plug-ins/common/file-psp.c @@ -1948,12 +1948,14 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "PSP", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c index 8dfc6a5cef..f072a22fa2 100644 --- a/plug-ins/common/file-sunras.c +++ b/plug-ins/common/file-sunras.c @@ -296,10 +296,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + + export = gimp_export_image (&image_ID, &drawable_ID, "SUNRAS", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c index 82ced38d78..9fdd351095 100644 --- a/plug-ins/common/file-tga.c +++ b/plug-ins/common/file-tga.c @@ -331,11 +331,12 @@ run (const gchar *name, { case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED | - GIMP_EXPORT_CAN_HANDLE_ALPHA )); + export = gimp_export_image (&image_ID, &drawable_ID, "TGA", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-tiff-save.c b/plug-ins/common/file-tiff-save.c index 7f8316d214..012d71ed4d 100644 --- a/plug-ins/common/file-tiff-save.c +++ b/plug-ins/common/file-tiff-save.c @@ -252,11 +252,13 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image, &drawable, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED | - GIMP_EXPORT_CAN_HANDLE_ALPHA )); + + export = gimp_export_image (&image, &drawable, "TIFF", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c index bd6111957f..cdf30eaf90 100644 --- a/plug-ins/common/file-xbm.c +++ b/plug-ins/common/file-xbm.c @@ -287,7 +287,8 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "XBM", GIMP_EXPORT_CAN_HANDLE_BITMAP | GIMP_EXPORT_CAN_HANDLE_ALPHA); diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c index 7a8c9b4889..a75c8fbde3 100644 --- a/plug-ins/common/file-xmc.c +++ b/plug-ins/common/file-xmc.c @@ -486,11 +486,13 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_ALPHA | - GIMP_EXPORT_CAN_HANDLE_LAYERS | - GIMP_EXPORT_NEEDS_ALPHA)); + + export = gimp_export_image (&image_ID, &drawable_ID, "XMC", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_ALPHA | + GIMP_EXPORT_CAN_HANDLE_LAYERS | + GIMP_EXPORT_NEEDS_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { *nreturn_vals = 1; diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c index 2a8ed674ee..df75e54325 100644 --- a/plug-ins/common/file-xpm.c +++ b/plug-ins/common/file-xpm.c @@ -258,11 +258,12 @@ run (const gchar *name, { case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED | - GIMP_EXPORT_CAN_HANDLE_ALPHA )); + export = gimp_export_image (&image_ID, &drawable_ID, "XPM", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c index f91d75773a..3240f7e053 100644 --- a/plug-ins/common/file-xwd.c +++ b/plug-ins/common/file-xwd.c @@ -359,10 +359,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + + export = gimp_export_image (&image_ID, &drawable_ID, "XWD", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/file-bmp/bmp.c b/plug-ins/file-bmp/bmp.c index 3b1a2842a6..6c1d328343 100644 --- a/plug-ins/file-bmp/bmp.c +++ b/plug-ins/file-bmp/bmp.c @@ -220,13 +220,17 @@ run (const gchar *name, /* fallthrough */ case GIMP_RUN_WITH_LAST_VALS: - if (run_mode == GIMP_RUN_WITH_LAST_VALS) lastvals = TRUE; + if (run_mode == GIMP_RUN_WITH_LAST_VALS) + lastvals = TRUE; + gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_ALPHA | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); + + export = gimp_export_image (&image_ID, &drawable_ID, "BMP", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_ALPHA | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/file-fits/fits.c b/plug-ins/file-fits/fits.c index 90a38d82c3..48a212388a 100644 --- a/plug-ins/file-fits/fits.c +++ b/plug-ins/file-fits/fits.c @@ -277,20 +277,22 @@ run (const gchar *name, /* eventually export the image */ switch (run_mode) - { - case GIMP_RUN_INTERACTIVE: - case GIMP_RUN_WITH_LAST_VALS: - gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_INDEXED)); - if (export == GIMP_EXPORT_CANCEL) - { - values[0].data.d_status = GIMP_PDB_CANCEL; - return; - } - break; + { + case GIMP_RUN_INTERACTIVE: + case GIMP_RUN_WITH_LAST_VALS: + gimp_ui_init (PLUG_IN_BINARY, FALSE); + + export = gimp_export_image (&image_ID, &drawable_ID, "FITS", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED); + + if (export == GIMP_EXPORT_CANCEL) + { + values[0].data.d_status = GIMP_PDB_CANCEL; + return; + } + break; default: break; } diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c index b324250c1c..e3843eb5db 100644 --- a/plug-ins/file-fli/fli-gimp.c +++ b/plug-ins/file-fli/fli-gimp.c @@ -351,11 +351,13 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "FLI", GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c index 9f0d06908e..466fa3a784 100644 --- a/plug-ins/file-jpeg/jpeg.c +++ b/plug-ins/file-jpeg/jpeg.c @@ -293,9 +293,11 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY)); + + export = gimp_export_image (&image_ID, &drawable_ID, "JPEG", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY); + switch (export) { case GIMP_EXPORT_EXPORT: diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c index 2103feefc7..35cfaf27b8 100644 --- a/plug-ins/file-psd/psd-save.c +++ b/plug-ins/file-psd/psd-save.c @@ -272,7 +272,8 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_id, &drawable_id, NULL, + + export = gimp_export_image (&image_id, &drawable_id, "PSD", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | diff --git a/plug-ins/file-psd/psd.c b/plug-ins/file-psd/psd.c index 97668e121c..50b6355dbe 100644 --- a/plug-ins/file-psd/psd.c +++ b/plug-ins/file-psd/psd.c @@ -248,13 +248,15 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, + + export = gimp_export_image (&image_ID, &drawable_ID, "PSD", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS | GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL; diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c index 1f7ca44c10..007084b21b 100644 --- a/plug-ins/file-sgi/sgi.c +++ b/plug-ins/file-sgi/sgi.c @@ -200,10 +200,12 @@ run (const gchar *name, case GIMP_RUN_INTERACTIVE: case GIMP_RUN_WITH_LAST_VALS: gimp_ui_init (PLUG_IN_BINARY, FALSE); - export = gimp_export_image (&image_ID, &drawable_ID, NULL, - (GIMP_EXPORT_CAN_HANDLE_RGB | - GIMP_EXPORT_CAN_HANDLE_GRAY | - GIMP_EXPORT_CAN_HANDLE_ALPHA)); + + export = gimp_export_image (&image_ID, &drawable_ID, "SGI", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_ALPHA); + if (export == GIMP_EXPORT_CANCEL) { values[0].data.d_status = GIMP_PDB_CANCEL;