Commit 5156b791 authored by Sven Neumann's avatar Sven Neumann
Browse files

more action_area beautifiction


--Sven
parent bc899c0c
Fri Nov 26 21:55:07 MET 1999 Sven Neumann <sven@gimp.org>
* plug-ins/common/aa.c
* plug-ins/common/gbr.c
* plug-ins/common/gicon.c
* plug-ins/common/gpb.c
* plug-ins/common/gtm.c
* plug-ins/common/hrz.c
* plug-ins/common/pat.c
* plug-ins/common/pnm.c
* plug-ins/common/sunras.c
* plug-ins/common/tga.c
* plug-ins/common/tiff.c
* plug-ins/fits/fits.c
* plug-ins/fp/fp_gtk.c
* plug-ins/maze/maze_face.c
* plug-ins/rcm/rcm_dialog.c
* plug-ins/sgi/sgi.c
* plug-ins/xjt/xjt.c: more action_area beautification
Fri Nov 26 19:03:07 CET 1999 Sven Neumann <sven@gimp.org> Fri Nov 26 19:03:07 CET 1999 Sven Neumann <sven@gimp.org>
* plug-ins/common/mail.c: modified the dialog layout a bit * plug-ins/common/mail.c: modified the dialog layout a bit
......
...@@ -336,6 +336,7 @@ static gint ...@@ -336,6 +336,7 @@ static gint
type_dialog (int selected) type_dialog (int selected)
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *toggle; GtkWidget *toggle;
GtkWidget *frame; GtkWidget *frame;
...@@ -349,24 +350,30 @@ type_dialog (int selected) ...@@ -349,24 +350,30 @@ type_dialog (int selected)
gtk_signal_connect(GTK_OBJECT(dlg), "destroy", gtk_signal_connect(GTK_OBJECT(dlg), "destroy",
(GtkSignalFunc) type_dialog_close_callback, NULL); (GtkSignalFunc) type_dialog_close_callback, NULL);
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) type_dialog_ok_callback, dlg); (GtkSignalFunc) type_dialog_ok_callback,
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, dlg);
TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel"); button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT(button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) type_dialog_cancel_callback, (GtkSignalFunc) type_dialog_cancel_callback,
GTK_OBJECT(dlg)); dlg);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->action_area), button, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
TRUE, TRUE, 0); gtk_widget_show (button);
gtk_widget_show(button);
/* file save type */ /* file save type */
frame = gtk_frame_new ("Data Formatting"); frame = gtk_frame_new ("Data Formatting");
......
...@@ -435,6 +435,7 @@ static gint ...@@ -435,6 +435,7 @@ static gint
save_dialog (void) save_dialog (void)
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *label; GtkWidget *label;
GtkWidget *entry; GtkWidget *entry;
...@@ -448,23 +449,30 @@ save_dialog (void) ...@@ -448,23 +449,30 @@ save_dialog (void)
(GtkSignalFunc) close_callback, NULL); (GtkSignalFunc) close_callback, NULL);
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT(button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) ok_callback, (GtkSignalFunc) ok_callback,
dlg); dlg);
gtk_box_pack_start (GTK_BOX(GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel"); button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object(GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button); gtk_widget_show (button);
/* The main table */ /* The main table */
/* Set its size (y, x) */ /* Set its size (y, x) */
table = gtk_table_new(2, 2, FALSE); table = gtk_table_new(2, 2, FALSE);
......
...@@ -422,6 +422,7 @@ static gint ...@@ -422,6 +422,7 @@ static gint
save_dialog () save_dialog ()
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *label; GtkWidget *label;
GtkWidget *entry; GtkWidget *entry;
...@@ -434,22 +435,29 @@ save_dialog () ...@@ -434,22 +435,29 @@ save_dialog ()
(GtkSignalFunc) close_callback, NULL); (GtkSignalFunc) close_callback, NULL);
/* Action area */ /* Action area */
button = gtk_button_new_with_label("OK"); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
gtk_signal_connect(GTK_OBJECT(button), "clicked", hbbox = gtk_hbutton_box_new ();
(GtkSignalFunc) ok_callback, gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
dlg); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_show (hbbox);
gtk_widget_grab_default(button);
gtk_widget_show(button); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label("Cancel"); gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); (GtkSignalFunc) ok_callback,
gtk_signal_connect_object(GTK_OBJECT(button), "clicked", dlg);
(GtkSignalFunc) gtk_widget_destroy, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_OBJECT(dlg)); gtk_widget_grab_default (button);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_show (button);
gtk_widget_show(button);
button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* The main table */ /* The main table */
/* Set its size (y, x) */ /* Set its size (y, x) */
......
...@@ -287,6 +287,7 @@ static void ...@@ -287,6 +287,7 @@ static void
common_save_dialog (GtkWidget *dlg, common_save_dialog (GtkWidget *dlg,
GtkWidget *table) GtkWidget *table)
{ {
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *label; GtkWidget *label;
GtkObject *adjustment; GtkObject *adjustment;
...@@ -295,11 +296,19 @@ common_save_dialog (GtkWidget *dlg, ...@@ -295,11 +296,19 @@ common_save_dialog (GtkWidget *dlg,
GtkWidget *entry; GtkWidget *entry;
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) ok_callback, dlg); (GtkSignalFunc) ok_callback,
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); dlg);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
...@@ -308,13 +317,12 @@ common_save_dialog (GtkWidget *dlg, ...@@ -308,13 +317,12 @@ common_save_dialog (GtkWidget *dlg,
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button); gtk_widget_show (button);
gtk_table_set_row_spacings (GTK_TABLE (table), 10); gtk_table_set_row_spacings (GTK_TABLE (table), 10);
gtk_table_set_col_spacings (GTK_TABLE (table), 10); gtk_table_set_col_spacings (GTK_TABLE (table), 10);
/* /*
* Spacing: __ * Spacing: __
*/ */
......
...@@ -326,6 +326,7 @@ save_image (char *filename, ...@@ -326,6 +326,7 @@ save_image (char *filename,
static gint save_dialog () static gint save_dialog ()
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *frame; GtkWidget *frame;
GtkWidget *table; GtkWidget *table;
...@@ -370,23 +371,28 @@ static gint save_dialog () ...@@ -370,23 +371,28 @@ static gint save_dialog ()
gtk_tooltips_set_colors (tips,&tips_bg,&tips_fg); gtk_tooltips_set_colors (tips,&tips_bg,&tips_fg);
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) save_ok_callback, (GtkSignalFunc) save_ok_callback,
dlg); dlg);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
button = gtk_button_new_with_label ("Cancel"); button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
/* HTML Page Options */ /* HTML Page Options */
......
/* The GIMP -- an image manipulation program /* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis * Copyright (C) 1995 Spencer Kimball and Peter Mattis
* HRZ reading and writing code Copyright (C) 1996 Albert Cahalan * HRZ reading and writing code Copyright (C) 1996 Albert Cahalan
...@@ -513,6 +514,7 @@ static gint ...@@ -513,6 +514,7 @@ static gint
save_dialog () save_dialog ()
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
dlg = gtk_dialog_new (); dlg = gtk_dialog_new ();
...@@ -523,12 +525,19 @@ save_dialog () ...@@ -523,12 +525,19 @@ save_dialog ()
NULL); NULL);
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) save_ok_callback, (GtkSignalFunc) save_ok_callback,
dlg); dlg);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
...@@ -537,11 +546,9 @@ save_dialog () ...@@ -537,11 +546,9 @@ save_dialog ()
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button); gtk_widget_show (button);
gtk_widget_show (dlg);
gtk_main (); gtk_main ();
gdk_flush (); gdk_flush ();
......
...@@ -388,6 +388,7 @@ static gint ...@@ -388,6 +388,7 @@ static gint
save_dialog () save_dialog ()
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *label; GtkWidget *label;
GtkWidget *entry; GtkWidget *entry;
...@@ -400,23 +401,30 @@ save_dialog () ...@@ -400,23 +401,30 @@ save_dialog ()
(GtkSignalFunc) close_callback, NULL); (GtkSignalFunc) close_callback, NULL);
/* Action area */ /* Action area */
button = gtk_button_new_with_label("OK"); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
gtk_signal_connect(GTK_OBJECT(button), "clicked", hbbox = gtk_hbutton_box_new ();
(GtkSignalFunc) ok_callback, gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
dlg); gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_show (hbbox);
gtk_widget_grab_default(button);
gtk_widget_show(button); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
button = gtk_button_new_with_label("Cancel"); gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); (GtkSignalFunc) ok_callback,
gtk_signal_connect_object(GTK_OBJECT(button), "clicked", dlg);
(GtkSignalFunc) gtk_widget_destroy, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
GTK_OBJECT(dlg)); gtk_widget_grab_default (button);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_show (button);
gtk_widget_show(button);
button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
/* The main table */ /* The main table */
/* Set its size (y, x) */ /* Set its size (y, x) */
table = gtk_table_new(1, 2, FALSE); table = gtk_table_new(1, 2, FALSE);
......
...@@ -897,6 +897,7 @@ static gint ...@@ -897,6 +897,7 @@ static gint
save_dialog () save_dialog ()
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *toggle; GtkWidget *toggle;
GtkWidget *frame; GtkWidget *frame;
...@@ -913,12 +914,19 @@ save_dialog () ...@@ -913,12 +914,19 @@ save_dialog ()
NULL); NULL);
/* Action area */ /* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK"); button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) save_ok_callback, (GtkSignalFunc) save_ok_callback,
dlg); dlg);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
...@@ -927,7 +935,7 @@ save_dialog () ...@@ -927,7 +935,7 @@ save_dialog ()
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_widget_show (button); gtk_widget_show (button);
/* file save type */ /* file save type */
......
...@@ -1602,6 +1602,7 @@ save_dialog (void) ...@@ -1602,6 +1602,7 @@ save_dialog (void)
{ {
GtkWidget *dlg; GtkWidget *dlg;
GtkWidget *hbbox;
GtkWidget *button; GtkWidget *button;
GtkWidget *toggle; GtkWidget *toggle;
GtkWidget *frame; GtkWidget *frame;
...@@ -1618,23 +1619,28 @@ save_dialog (void) ...@@ -1618,23 +1619,28 @@ save_dialog (void)
NULL); NULL);
/* Action area */ /* Action area */
button = gtk_button_new_with_label (_("OK")); gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);
hbbox = gtk_hbutton_box_new ();
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (dlg)->action_area), hbbox, FALSE, FALSE, 0);
gtk_widget_show (hbbox);
button = gtk_button_new_with_label ("OK");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked", gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) save_ok_callback, (GtkSignalFunc) save_ok_callback,
dlg); dlg);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
TRUE, TRUE, 0);
gtk_widget_grab_default (button); gtk_widget_grab_default (button);
gtk_widget_show (button); gtk_widget_show (button);
button = gtk_button_new_with_label (_("Cancel")); button = gtk_button_new_with_label ("Cancel");
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) gtk_widget_destroy, (GtkSignalFunc) gtk_widget_destroy,
GTK_OBJECT (dlg)); GTK_OBJECT (dlg));
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
TRUE, TRUE, 0);
gtk_widget_show (button); gtk_widget_show (button);
/* file save type */ /* file save type */
......
...@@ -1430,6 +1430,7 @@ static gint ...@@ -1430,6 +1430,7 @@ static gint
save_dialog () save_dialog ()