[gimp] plug-ins: Port file plug-ins to new export API
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] plug-ins: Port file plug-ins to new export API
- Date: Tue, 21 Jul 2009 14:04:51 +0000 (UTC)
commit 19fe919dcea79d5b5693c5e5688ec0209dcea6a6
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Jul 21 14:10:29 2009 +0200
plug-ins: Port file plug-ins to new export API
plug-ins/common/file-aa.c | 20 +++-----------------
plug-ins/common/file-cel.c | 2 +-
plug-ins/common/file-csource.c | 20 +++-----------------
plug-ins/common/file-dicom.c | 2 +-
plug-ins/common/file-gbr.c | 20 +++-----------------
plug-ins/common/file-gif-save.c | 20 +++-----------------
plug-ins/common/file-gih.c | 20 +++-----------------
plug-ins/common/file-header.c | 2 +-
plug-ins/common/file-html-table.c | 18 ++----------------
plug-ins/common/file-mng.c | 20 +++-----------------
plug-ins/common/file-pat.c | 20 +++-----------------
plug-ins/common/file-pcx.c | 2 +-
plug-ins/common/file-pix.c | 2 +-
plug-ins/common/file-png.c | 20 +++-----------------
plug-ins/common/file-pnm.c | 26 ++++++--------------------
plug-ins/common/file-ps.c | 21 +++------------------
plug-ins/common/file-psp.c | 20 +++-----------------
plug-ins/common/file-raw.c | 18 ++----------------
plug-ins/common/file-sunras.c | 20 +++-----------------
plug-ins/common/file-tga.c | 20 +++-----------------
plug-ins/common/file-tiff-save.c | 20 +++-----------------
plug-ins/common/file-xbm.c | 20 +++-----------------
plug-ins/common/file-xmc.c | 21 +++------------------
plug-ins/common/file-xpm.c | 20 +++-----------------
plug-ins/common/file-xwd.c | 2 +-
plug-ins/file-bmp/bmp-write.c | 18 ++----------------
plug-ins/file-bmp/bmp.c | 3 +--
plug-ins/file-fits/fits.c | 2 +-
plug-ins/file-fli/fli-gimp.c | 20 +++-----------------
plug-ins/file-ico/ico-dialog.c | 20 ++++----------------
plug-ins/file-jpeg/jpeg-save.c | 19 +++----------------
plug-ins/file-jpeg/jpeg.c | 2 +-
plug-ins/file-psd/psd-save.c | 2 +-
plug-ins/file-psd/psd.c | 2 +-
plug-ins/file-sgi/sgi.c | 20 +++-----------------
plug-ins/file-xjt/xjt.c | 18 ++----------------
36 files changed, 86 insertions(+), 436 deletions(-)
---
diff --git a/plug-ins/common/file-aa.c b/plug-ins/common/file-aa.c
index 7a86991..f88bca0 100644
--- a/plug-ins/common/file-aa.c
+++ b/plug-ins/common/file-aa.c
@@ -159,7 +159,7 @@ 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, "AA",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
@@ -345,25 +345,11 @@ aa_dialog (gint selected)
gint i;
/* Create the actual window. */
- dialog = gimp_dialog_new (_("Save as Text"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Text"), PLUG_IN_BINARY, SAVE_PROC);
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
index d4c42fe..02f80a3 100644
--- a/plug-ins/common/file-cel.c
+++ b/plug-ins/common/file-cel.c
@@ -217,7 +217,7 @@ 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, "CEL",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
GIMP_EXPORT_CAN_HANDLE_INDEXED
diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c
index 7f6a76a..5dcb5bf 100644
--- a/plug-ins/common/file-csource.c
+++ b/plug-ins/common/file-csource.c
@@ -170,7 +170,7 @@ run (const gchar *name,
gimp_ui_init (PLUG_IN_BINARY, FALSE);
- export = gimp_export_image (&image_ID, &drawable_ID, "C Source",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA ));
@@ -656,25 +656,11 @@ run_save_dialog (Config *config)
GtkObject *adj;
gboolean run;
- dialog = gimp_dialog_new (_("Save as C-Source"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("C-Source"), PLUG_IN_BINARY, SAVE_PROC);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_container_add (GTK_CONTAINER (gimp_export_dialog_get_content_area (dialog)),
vbox);
gtk_widget_show (vbox);
diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c
index 833db93..4e894ce 100644
--- a/plug-ins/common/file-dicom.c
+++ b/plug-ins/common/file-dicom.c
@@ -236,7 +236,7 @@ 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, "DICOM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY);
if (export == GIMP_EXPORT_CANCEL)
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index 4380ce5..bc1a747 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -238,7 +238,7 @@ 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, "GBR",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA);
@@ -728,28 +728,14 @@ save_dialog (void)
GtkObject *adj;
gboolean run;
- dialog = gimp_dialog_new (_("Save as Brush"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Brush"), PLUG_IN_BINARY, SAVE_PROC);
/* The main table */
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-gif-save.c b/plug-ins/common/file-gif-save.c
index 7162e49..b166914 100644
--- a/plug-ins/common/file-gif-save.c
+++ b/plug-ins/common/file-gif-save.c
@@ -215,7 +215,7 @@ 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, "GIF",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
@@ -1005,25 +1005,11 @@ save_dialog (gint32 image_ID)
gimp_image_get_layers (image_ID, &nlayers);
- dialog = gimp_dialog_new (_("Save as GIF"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("GIF"), PLUG_IN_BINARY, SAVE_PROC);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_container_add (GTK_CONTAINER (gimp_export_dialog_get_content_area (dialog)),
main_vbox);
gtk_widget_show (main_vbox);
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index f33a67c..cbd9637 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -294,7 +294,7 @@ 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, "GIH",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
@@ -859,28 +859,14 @@ gih_save_dialog (gint32 image_ID)
gint32 nlayers;
gboolean run;
- dialog = gimp_dialog_new (_("Save as Brush Pipe"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Brush Pipe"), PLUG_IN_BINARY, SAVE_PROC);
/* The main table */
table = gtk_table_new (8, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-header.c b/plug-ins/common/file-header.c
index 3ee7b41..583a123 100644
--- a/plug-ins/common/file-header.c
+++ b/plug-ins/common/file-header.c
@@ -118,7 +118,7 @@ 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, "Header",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
if (export == GIMP_EXPORT_CANCEL)
diff --git a/plug-ins/common/file-html-table.c b/plug-ins/common/file-html-table.c
index e1c9bdb..dd7e03f 100644
--- a/plug-ins/common/file-html-table.c
+++ b/plug-ins/common/file-html-table.c
@@ -405,25 +405,11 @@ save_dialog (gint32 image_ID)
gimp_ui_init (PLUG_IN_BINARY, FALSE);
- dialog = gimp_dialog_new (_("Save as HTML table"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("HTML table"), PLUG_IN_BINARY, SAVE_PROC);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
main_vbox, TRUE, TRUE, 0);
if (gimp_image_width (image_ID) * gimp_image_height (image_ID) > 4096)
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index 2ad773b..4ce53e0 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -1283,25 +1283,11 @@ mng_save_dialog (gint32 image_id)
gint num_layers;
gboolean run;
- dialog = gimp_dialog_new (_("Save as MNG"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("MNG"), PLUG_IN_BINARY, SAVE_PROC);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_container_add (GTK_CONTAINER (gimp_export_dialog_get_content_area (dialog)),
main_vbox);
frame = gimp_frame_new (_("MNG Options"));
@@ -1601,7 +1587,7 @@ run (const gchar *name,
gimp_procedural_db_get_data (SAVE_PROC, &mng_data);
gimp_ui_init (PLUG_IN_BINARY, FALSE);
- export = gimp_export_image (&image_id, &drawable_id, "MNG",
+ export = gimp_export_image (&image_id, &drawable_id, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index b4d2977..f6d5e1e 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -208,7 +208,7 @@ 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, "PAT",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA);
@@ -524,27 +524,13 @@ save_dialog (void)
GtkWidget *entry;
gboolean run;
- dialog = gimp_dialog_new (_("Save as Pattern"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Pattern"), PLUG_IN_BINARY, SAVE_PROC);
/* The main table */
table = gtk_table_new (1, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c
index b54dce2..72d4b3e 100644
--- a/plug-ins/common/file-pcx.c
+++ b/plug-ins/common/file-pcx.c
@@ -210,7 +210,7 @@ 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, "PCX",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c
index 2f80be9..692580a 100644
--- a/plug-ins/common/file-pix.c
+++ b/plug-ins/common/file-pix.c
@@ -229,7 +229,7 @@ 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, "PIX",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY));
if (export == GIMP_EXPORT_CANCEL)
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index f070661..7192fd1 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -433,7 +433,7 @@ 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, "PNG",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
@@ -1781,21 +1781,7 @@ save_dialog (gint32 image_ID,
GtkWidget *button;
GimpParasite *parasite;
- dialog = gimp_dialog_new (_("Save as PNG"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("PNG"), PLUG_IN_BINARY, SAVE_PROC);
g_signal_connect (dialog, "response",
G_CALLBACK (save_dialog_response),
@@ -1808,7 +1794,7 @@ save_dialog (gint32 image_ID,
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index e245258..f0c3b0a 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -373,25 +373,25 @@ run (const gchar *name,
if (strcmp (name, PNM_SAVE_PROC) == 0)
{
- export = gimp_export_image (&image_ID, &drawable_ID, "PNM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
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, "PBM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
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, "PGM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_GRAY);
}
else
{
- export = gimp_export_image (&image_ID, &drawable_ID, "PPM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_INDEXED);
}
@@ -1181,21 +1181,7 @@ save_dialog (void)
GtkWidget *frame;
gboolean run;
- dialog = gimp_dialog_new (_("Save as PNM"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, PNM_SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("PNM"), PLUG_IN_BINARY, PNM_SAVE_PROC);
/* file save type */
frame = gimp_int_radio_group_new (TRUE, _("Data formatting"),
@@ -1207,7 +1193,7 @@ save_dialog (void)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, FALSE, TRUE, 0);
gtk_widget_show (frame);
diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c
index ba84323..82e3c7f 100644
--- a/plug-ins/common/file-ps.c
+++ b/plug-ins/common/file-ps.c
@@ -883,8 +883,7 @@ 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,
- psvals.eps ? "EPS" : "PostScript",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
@@ -3326,26 +3325,12 @@ save_dialog (void)
vals = g_new (SaveDialogVals, 1);
vals->level = (psvals.level > 1);
- dialog = gimp_dialog_new (_("Save as PostScript"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PS_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("PostScript"), PLUG_IN_BINARY, SAVE_PS_PROC);
/* Main hbox */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
hbox, FALSE, FALSE, 0);
main_vbox[0] = main_vbox[1] = NULL;
diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c
index a347fa5..38b03ac 100644
--- a/plug-ins/common/file-psp.c
+++ b/plug-ins/common/file-psp.c
@@ -636,21 +636,7 @@ save_dialog (void)
GtkWidget *frame;
gint run;
- dialog = gimp_dialog_new (_("Save as PSP"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("PSP"), PLUG_IN_BINARY, SAVE_PROC);
/* file save type */
frame = gimp_int_radio_group_new (TRUE, _("Data Compression"),
@@ -664,7 +650,7 @@ save_dialog (void)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, FALSE, TRUE, 0);
gtk_widget_show (frame);
@@ -1948,7 +1934,7 @@ 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, "PSP",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
diff --git a/plug-ins/common/file-raw.c b/plug-ins/common/file-raw.c
index b630a12..83d044e 100644
--- a/plug-ins/common/file-raw.c
+++ b/plug-ins/common/file-raw.c
@@ -1226,25 +1226,11 @@ save_dialog (const gchar *filename,
gimp_ui_init (PLUG_IN_BINARY, TRUE);
- dialog = gimp_dialog_new (_("Raw Image Save"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Raw Image"), PLUG_IN_BINARY, SAVE_PROC);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
main_vbox, FALSE, FALSE, 0);
gtk_widget_show (main_vbox);
diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c
index 560de91..0f66ddb 100644
--- a/plug-ins/common/file-sunras.c
+++ b/plug-ins/common/file-sunras.c
@@ -295,7 +295,7 @@ 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, "SUNRAS",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
@@ -1625,21 +1625,7 @@ save_dialog (void)
GtkWidget *frame;
gboolean run;
- dialog = gimp_dialog_new (_("Save as SUNRAS"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("SUNRAS"), PLUG_IN_BINARY, SAVE_PROC);
/* file save type */
frame = gimp_int_radio_group_new (TRUE, _("Data Formatting"),
@@ -1652,7 +1638,7 @@ save_dialog (void)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c
index 736a764..5ec0109 100644
--- a/plug-ins/common/file-tga.c
+++ b/plug-ins/common/file-tga.c
@@ -330,7 +330,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
- export = gimp_export_image (&image_ID, &drawable_ID, "TGA",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
@@ -1364,25 +1364,11 @@ save_dialog (void)
GtkWidget *hbox;
gboolean run;
- dialog = gimp_dialog_new (_("Save as TGA"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("TGA"), PLUG_IN_BINARY, SAVE_PROC);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
diff --git a/plug-ins/common/file-tiff-save.c b/plug-ins/common/file-tiff-save.c
index 03b3d9f..f8751af 100644
--- a/plug-ins/common/file-tiff-save.c
+++ b/plug-ins/common/file-tiff-save.c
@@ -250,7 +250,7 @@ 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, "TIFF",
+ export = gimp_export_image (&image, &drawable, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
@@ -1058,25 +1058,11 @@ save_dialog (gboolean has_alpha,
GtkWidget *g4;
gboolean run;
- dialog = gimp_dialog_new (_("Save as TIFF"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("TIFF"), PLUG_IN_BINARY, SAVE_PROC);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
vbox, FALSE, TRUE, 0);
/* compression */
diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c
index 81a00f2..c528a3a 100644
--- a/plug-ins/common/file-xbm.c
+++ b/plug-ins/common/file-xbm.c
@@ -286,7 +286,7 @@ 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, "XBM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_BITMAP |
GIMP_EXPORT_CAN_HANDLE_ALPHA);
@@ -1182,26 +1182,12 @@ save_dialog (gint32 drawable_ID)
GtkObject *adj;
gboolean run;
- dialog = gimp_dialog_new (_("Save as XBM"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("XBM"), PLUG_IN_BINARY, SAVE_PROC);
/* parameter settings */
frame = gimp_frame_new (_("XBM Options"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c
index 1894bb7..67ca8b0 100644
--- a/plug-ins/common/file-xmc.c
+++ b/plug-ins/common/file-xmc.c
@@ -493,7 +493,7 @@ 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, "XMC",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
GIMP_EXPORT_CAN_HANDLE_LAYERS |
@@ -1054,29 +1054,14 @@ save_dialog (const gint32 image_ID, GimpParamRegion *hotspotRange)
gboolean run;
g_value_init (&val, G_TYPE_DOUBLE);
- dialog = gimp_dialog_new (_("Save as X11 Mouse Cursor"), /* title */
- PLUG_IN_BINARY, /* role */
- NULL, 0, /* parent flags */
- gimp_standard_help_func, /* help func */
- SAVE_PROC, /* help id */
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("X11 Mouse Cursor"), PLUG_IN_BINARY, SAVE_PROC);
/*
* parameter settings
*/
frame = gimp_frame_new (_("XMC Options"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c
index f6873cd..b0e32cd 100644
--- a/plug-ins/common/file-xpm.c
+++ b/plug-ins/common/file-xpm.c
@@ -257,7 +257,7 @@ run (const gchar *name,
{
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
- export = gimp_export_image (&image_ID, &drawable_ID, "XPM",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
@@ -801,26 +801,12 @@ save_dialog (void)
GtkObject *scale_data;
gboolean run;
- dialog = gimp_dialog_new (_("Save as XPM"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("XPM"), PLUG_IN_BINARY, SAVE_PROC);
table = gtk_table_new (1, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
index 1f71aeb..f19879d 100644
--- a/plug-ins/common/file-xwd.c
+++ b/plug-ins/common/file-xwd.c
@@ -356,7 +356,7 @@ 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, "XWD",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c
index 7e08cff..e88f5b2 100644
--- a/plug-ins/file-bmp/bmp-write.c
+++ b/plug-ins/file-bmp/bmp-write.c
@@ -789,27 +789,13 @@ save_dialog (gint channels)
GSList *group;
gboolean run;
- dialog = gimp_dialog_new (_("Save as BMP"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("BMP"), PLUG_IN_BINARY, SAVE_PROC);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
vbox_main = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 12);
- gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_container_add (GTK_CONTAINER (gimp_export_dialog_get_content_area (dialog)),
vbox_main);
gtk_widget_show (vbox_main);
diff --git a/plug-ins/file-bmp/bmp.c b/plug-ins/file-bmp/bmp.c
index 5aa08f3..3b1a284 100644
--- a/plug-ins/file-bmp/bmp.c
+++ b/plug-ins/file-bmp/bmp.c
@@ -222,12 +222,11 @@ run (const gchar *name,
case GIMP_RUN_WITH_LAST_VALS:
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, "BMP",
+ 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));
-
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 a4c92c3..b2bd553 100644
--- a/plug-ins/file-fits/fits.c
+++ b/plug-ins/file-fits/fits.c
@@ -280,7 +280,7 @@ 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, "FITS",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED));
diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c
index 2f4bbaf..6307e3a 100644
--- a/plug-ins/file-fli/fli-gimp.c
+++ b/plug-ins/file-fli/fli-gimp.c
@@ -351,7 +351,7 @@ 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, "FLI",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_INDEXED |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA |
@@ -910,27 +910,13 @@ save_dialog (gint32 image_id)
from_frame = 1;
to_frame = nframes;
- dialog = gimp_dialog_new (_("GFLI 1.3 - Save framestack"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("GFLI 1.3"), PLUG_IN_BINARY, SAVE_PROC);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
table, FALSE, FALSE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/file-ico/ico-dialog.c b/plug-ins/file-ico/ico-dialog.c
index 26c1690..041fc56 100644
--- a/plug-ins/file-ico/ico-dialog.c
+++ b/plug-ins/file-ico/ico-dialog.c
@@ -50,21 +50,9 @@ ico_dialog_new (IcoSaveInfo *info)
GtkWidget *scrolledwindow;
GtkWidget *warning;
- dialog = gimp_dialog_new (_("Save as Windows Icon"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, "plug-in-winicon",
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("Windows Icon"),
+ PLUG_IN_BINARY,
+ "plug-in-winicon");
/* We store an array that holds each icon's requested bit depth
with the dialog. It's queried when the dialog is closed so the
@@ -78,7 +66,7 @@ ico_dialog_new (IcoSaveInfo *info)
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
main_vbox, TRUE, TRUE, 0);
gtk_widget_show (main_vbox);
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index 35bebc0..e4c9434 100644
--- a/plug-ins/file-jpeg/jpeg-save.c
+++ b/plug-ins/file-jpeg/jpeg-save.c
@@ -828,19 +828,7 @@ save_dialog (void)
gchar *text;
- dialog = gimp_dialog_new (_("Save as JPEG"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
+ dialog = gimp_export_dialog_new (_("JPEG"), PLUG_IN_BINARY, SAVE_PROC);
g_signal_connect (dialog, "response",
G_CALLBACK (save_dialog_response),
@@ -850,11 +838,10 @@ save_dialog (void)
NULL);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gimp_window_set_transient (GTK_WINDOW (dialog));
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
@@ -1180,7 +1167,7 @@ save_dialog (void)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c
index a57c33d..e1a1d27 100644
--- a/plug-ins/file-jpeg/jpeg.c
+++ b/plug-ins/file-jpeg/jpeg.c
@@ -290,7 +290,7 @@ 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, "JPEG",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY));
switch (export)
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index a2dd761..d91c07a 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -271,7 +271,7 @@ 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, "PSD",
+ export = gimp_export_image (&image_id, &drawable_id, NULL,
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 5174894..4560122 100644
--- a/plug-ins/file-psd/psd.c
+++ b/plug-ins/file-psd/psd.c
@@ -248,7 +248,7 @@ 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, "PSD",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_INDEXED |
diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c
index 5c9913b..f982736 100644
--- a/plug-ins/file-sgi/sgi.c
+++ b/plug-ins/file-sgi/sgi.c
@@ -199,7 +199,7 @@ 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, "SGI",
+ export = gimp_export_image (&image_ID, &drawable_ID, NULL,
(GIMP_EXPORT_CAN_HANDLE_RGB |
GIMP_EXPORT_CAN_HANDLE_GRAY |
GIMP_EXPORT_CAN_HANDLE_ALPHA));
@@ -625,21 +625,7 @@ save_dialog (void)
GtkWidget *frame;
gboolean run;
- dialog = gimp_dialog_new (_("Save as SGI"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, SAVE_PROC,
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dialog));
+ dialog = gimp_export_dialog_new (_("SGI"), PLUG_IN_BINARY, SAVE_PROC);
frame = gimp_int_radio_group_new (TRUE, _("Compression type"),
G_CALLBACK (gimp_radio_button_update),
@@ -655,7 +641,7 @@ save_dialog (void)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dialog)),
frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
diff --git a/plug-ins/file-xjt/xjt.c b/plug-ins/file-xjt/xjt.c
index f07be5d..deaba7c 100644
--- a/plug-ins/file-xjt/xjt.c
+++ b/plug-ins/file-xjt/xjt.c
@@ -860,27 +860,13 @@ save_dialog (void)
gimp_ui_init (PLUG_IN_BINARY, FALSE);
- dlg = gimp_dialog_new (_("Save as XJT"), PLUG_IN_BINARY,
- NULL, 0,
- gimp_standard_help_func, "file-xjt-save",
-
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
-
- NULL);
-
- gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
- GTK_RESPONSE_OK,
- GTK_RESPONSE_CANCEL,
- -1);
-
- gimp_window_set_transient (GTK_WINDOW (dlg));
+ dlg = gimp_export_dialog_new (_("XJT"), PLUG_IN_BINARY, "file-xjt-save");
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dlg))),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_content_area (dlg)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]