Commit 8c83ddc0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

Applied a patch from Patrice Tremblay that makes (almost) all dialogs obey

2005-02-08  Sven Neumann  <sven@gimp.org>

	Applied a patch from Patrice Tremblay that makes (almost) all
	dialogs obey the "gtk-alternative-button-order" setting
	(bug #166678). Changes too many files to list them all...
parent 2d38ab6a
2005-02-08 Sven Neumann <sven@gimp.org>
Applied a patch from Patrice Tremblay that makes (almost) all
dialogs obey the "gtk-alternative-button-order" setting
(bug #166678). Changes too many files to list them all...
2005-02-08 Sven Neumann <sven@gimp.org>
* tools/gimp-remote.c: add the gtk+ options to the GOptionContext.
......
......@@ -115,6 +115,11 @@ channel_options_dialog_new (GimpImage *gimage,
(GWeakNotify) g_free,
options);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (options->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox), hbox);
......
......@@ -129,6 +129,11 @@ convert_dialog_new (GimpImage *gimage,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_resizable (GTK_WINDOW (dialog->dialog), FALSE);
g_object_weak_ref (G_OBJECT (dialog->dialog),
......
......@@ -81,6 +81,11 @@ file_open_dialog_new (Gimp *gimp)
G_CALLBACK (file_open_dialog_response),
gimp);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
return dialog;
}
......
......@@ -83,6 +83,11 @@ file_open_location_dialog_new (Gimp *gimp)
G_CALLBACK (file_open_location_response),
gimp);
gtk_dialog_set_alternative_button_order (GTK_DIALOG(dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
......
......@@ -79,6 +79,11 @@ file_save_dialog_new (Gimp *gimp)
GTK_STOCK_SAVE,
GIMP_HELP_FILE_SAVE);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
uri = g_object_get_data (G_OBJECT (gimp), "gimp-file-save-last-uri");
if (uri)
......@@ -191,6 +196,11 @@ file_save_overwrite (GtkWidget *save_dialog,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dialog, "response",
G_CALLBACK (file_save_overwrite_response),
overwrite_data);
......
......@@ -91,6 +91,12 @@ grid_dialog_new (GimpImage *gimage,
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GRID_RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dialog, "response",
G_CALLBACK (grid_dialog_response),
dialog);
......
......@@ -74,6 +74,11 @@ image_merge_layers_dialog_new (GimpImage *image,
g_object_weak_ref (G_OBJECT (dialog->dialog),
(GWeakNotify) g_free, dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
frame = gimp_int_radio_group_new (TRUE, _("Final, Merged Layer should be:"),
G_CALLBACK (gimp_radio_button_update),
&dialog->merge_type, dialog->merge_type,
......
......@@ -112,6 +112,12 @@ image_new_dialog_new (Gimp *gimp)
G_CALLBACK (image_new_response),
dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
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 (dialog->dialog)->vbox),
......
......@@ -177,6 +177,11 @@ image_scale_confirm_dialog (ImageScaleDialog *dialog)
G_CALLBACK (image_scale_confirm_response),
dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (widget),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
return widget;
}
......
......@@ -75,6 +75,11 @@ layer_add_mask_dialog_new (GimpLayer *layer,
g_object_weak_ref (G_OBJECT (dialog->dialog),
(GWeakNotify) g_free, dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog->dialog)->vbox), vbox);
......
......@@ -97,6 +97,11 @@ layer_options_dialog_new (GimpImage *gimage,
(GWeakNotify) g_free,
options);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (options->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->dialog)->vbox),
......
......@@ -117,6 +117,11 @@ offset_dialog_new (GimpDrawable *drawable,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_resizable (GTK_WINDOW (dialog->dialog), FALSE);
g_object_weak_ref (G_OBJECT (dialog->dialog),
......
......@@ -182,6 +182,11 @@ palette_import_dialog_new (Gimp *gimp)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (import_dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (import_dialog->dialog, "response",
G_CALLBACK (palette_import_response),
import_dialog);
......
......@@ -1200,6 +1200,11 @@ prefs_dialog_new (Gimp *gimp,
G_CALLBACK (prefs_response),
dialog);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
......
......@@ -119,6 +119,12 @@ print_size_dialog_new (GimpImage *image,
G_CALLBACK (print_size_dialog_response),
private);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
private->image = image;
private->callback = callback;
private->user_data = user_data;
......
......@@ -109,6 +109,11 @@ quit_dialog_new (Gimp *gimp)
G_CALLBACK (quit_dialog_container_changed),
box, 0);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
preview_size = gimp->config->layer_preview_size;
rows = CLAMP (gimp_container_num_children (images), 3, 6);
......
......@@ -143,6 +143,12 @@ resize_dialog_new (GimpViewable *viewable,
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
private = g_new0 (ResizeDialog, 1);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_free, private);
......
......@@ -75,6 +75,11 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
screen = gtk_widget_get_screen (dialog);
ruler_width = gdk_screen_get_width (screen);
......
......@@ -122,6 +122,12 @@ scale_dialog_new (GimpViewable *viewable,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
private = g_new0 (ScaleDialog, 1);
......
......@@ -109,6 +109,12 @@ stroke_dialog_new (GimpItem *item,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
g_signal_connect (dialog, "response",
......
......@@ -91,6 +91,11 @@ template_options_dialog_new (Gimp *gimp,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (options->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_weak_ref (G_OBJECT (options->dialog),
(GWeakNotify) g_free, options);
......
......@@ -615,6 +615,11 @@ user_install_dialog_run (const gchar *alternate_system_gimprc,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dialog, "response",
G_CALLBACK (user_install_response),
gimprc);
......
......@@ -58,6 +58,11 @@ vectors_export_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_screen (GTK_WINDOW (dialog->dialog),
gtk_widget_get_screen (parent));
......
......@@ -62,6 +62,11 @@ vectors_import_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_window_set_screen (GTK_WINDOW (dialog->dialog),
gtk_widget_get_screen (parent));
......
......@@ -87,6 +87,11 @@ vectors_options_dialog_new (GimpImage *gimage,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (options->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_object_weak_ref (G_OBJECT (options->dialog),
(GWeakNotify) g_free,
options);
......
......@@ -554,6 +554,12 @@ explorer_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_ABOUT,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
top_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (top_hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), top_hbox,
......
......@@ -968,6 +968,11 @@ main_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (appwin),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (appwin)->vbox), main_hbox,
......
......@@ -1376,6 +1376,11 @@ main_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (appwin),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (appwin)->vbox), main_hbox,
......
......@@ -560,6 +560,11 @@ save_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
......
......@@ -404,6 +404,11 @@ alienmap2_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -693,6 +693,11 @@ palette_dialog (const gchar *title)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), palette_file);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
......
......@@ -1192,6 +1192,11 @@ CML_explorer_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
CML_preview_defer = TRUE;
hbox = gtk_hbox_new (FALSE, 12);
......
......@@ -351,6 +351,11 @@ aa_dialog (gint selected)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
......
......@@ -405,6 +405,11 @@ align_layers_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
table = gtk_table_new (7, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
......
......@@ -397,6 +397,11 @@ lens_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -235,6 +235,11 @@ blinds_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -354,6 +354,11 @@ borderaverage_dialog (gint32 image_ID,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -842,6 +842,11 @@ bumpmap_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
paned = gtk_hpaned_new ();
gtk_container_set_border_width (GTK_CONTAINER (paned), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), paned);
......
......@@ -814,6 +814,11 @@ cartoon_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -505,6 +505,11 @@ cm_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -316,6 +316,11 @@ checkerboard_dialog (gint32 image_ID,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
/* Get the image resolution and unit */
gimp_image_get_resolution (image_ID, &xres, &yres);
unit = gimp_image_get_unit (image_ID);
......
......@@ -264,6 +264,11 @@ colorify_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -383,6 +383,11 @@ color_to_alpha_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -1283,6 +1283,11 @@ compose_dialog (const gchar *compose_type,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
/* parameter settings */
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
......
......@@ -884,6 +884,12 @@ dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (dlg, "response",
G_CALLBACK (response_callback),
NULL);
......
......@@ -641,6 +641,11 @@ run_save_dialog (Config *config)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), vbox);
......
......@@ -275,6 +275,11 @@ cubism_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
main_vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), main_vbox);
......
......@@ -1245,6 +1245,11 @@ bender_new_dialog (GimpDrawable *drawable)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (cd->shell),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
g_signal_connect (cd->shell, "response",
G_CALLBACK (bender_response),
cd);
......
......@@ -1232,6 +1232,11 @@ decompose_dialog (void)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dlg),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
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 (dlg)->vbox), main_vbox,