[gimp/export-dialog-cleanup-tmp: 3/3] plug-ins: Port PNG, TIFF, BMP and JPEG to new export dialog API
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp/export-dialog-cleanup-tmp: 3/3] plug-ins: Port PNG, TIFF, BMP and JPEG to new export dialog API
- Date: Tue, 14 Jul 2009 10:39:52 +0000 (UTC)
commit b1602bbffb8003e76ddfc3e09415a59bee9e1ac5
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Jul 14 12:27:26 2009 +0200
plug-ins: Port PNG, TIFF, BMP and JPEG to new export dialog API
plug-ins/common/file-png.c | 20 ++++----------------
plug-ins/common/file-tiff-save.c | 18 ++----------------
plug-ins/file-bmp/bmp-write.c | 18 ++----------------
plug-ins/file-jpeg/jpeg-save.c | 19 +++----------------
4 files changed, 11 insertions(+), 64 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 8ebde1a..e3e2780 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1781,21 +1781,9 @@ 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 +1796,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 (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_container (dialog)),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
diff --git a/plug-ins/common/file-tiff-save.c b/plug-ins/common/file-tiff-save.c
index 70d61a9..d675c9c 100644
--- a/plug-ins/common/file-tiff-save.c
+++ b/plug-ins/common/file-tiff-save.c
@@ -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 (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_container (dialog)),
vbox, FALSE, TRUE, 0);
/* compression */
diff --git a/plug-ins/file-bmp/bmp-write.c b/plug-ins/file-bmp/bmp-write.c
index cb5f8cd..0a9a97f 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 (dialog)->vbox), vbox_main);
+ gtk_container_add (GTK_CONTAINER (gimp_export_dialog_get_container (dialog)), vbox_main);
gtk_widget_show (vbox_main);
toggle = gtk_check_button_new_with_mnemonic (_("_Run-Length Encoded"));
diff --git a/plug-ins/file-jpeg/jpeg-save.c b/plug-ins/file-jpeg/jpeg-save.c
index dffd49a..f6fee81 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 (dialog)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_container (dialog)), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
table = gtk_table_new (1, 3, FALSE);
@@ -1179,7 +1166,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 (dialog)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gimp_export_dialog_get_container (dialog)), vbox, TRUE, TRUE, 0);
gtk_widget_show (vbox);
tabledefaults = gtk_table_new (1, 3, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]