From 25e6ba48e72157d0cee42a1a639398d368239baf Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Jan 2014 11:41:03 -0500 Subject: [PATCH] Update all internal users of alternative button order We'll keep this code around for now to not regress on Windows, but avoid deprecation warnings. --- gtk/gtkfilechooserbutton.c | 2 ++ gtk/gtkfilechooserdefault.c | 2 ++ gtk/gtkfontchooserdialog.c | 3 ++- gtk/gtkmessagedialog.c | 4 ++++ gtk/gtkmountoperation.c | 3 ++- gtk/gtkpagesetupunixdialog.c | 3 ++- gtk/gtkprintunixdialog.c | 2 ++ 7 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index 3cd560fd1a..21e19eb8ab 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -810,10 +810,12 @@ gtk_file_chooser_button_constructor (GType type, gtk_dialog_set_default_response (GTK_DIALOG (priv->dialog), GTK_RESPONSE_ACCEPT); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (priv->dialog), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_file_chooser_button_set_title (button, _(DEFAULT_TITLE)); } diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index c7529849b4..2095d1fdf4 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -5442,10 +5442,12 @@ confirm_dialog_should_accept_filename (GtkFileChooserDefault *impl, gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_RESPONSE_ACCEPT); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); if (gtk_window_has_group (toplevel)) diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c index 8627fe5c5f..124fb10b1b 100644 --- a/gtk/gtkfontchooserdialog.c +++ b/gtk/gtkfontchooserdialog.c @@ -151,11 +151,12 @@ gtk_font_chooser_dialog_init (GtkFontChooserDialog *fontchooserdiag) priv = fontchooserdiag->priv; gtk_widget_init_template (GTK_WIDGET (fontchooserdiag)); - +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (fontchooserdiag), GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS _gtk_font_chooser_set_delegate (GTK_FONT_CHOOSER (fontchooserdiag), GTK_FONT_CHOOSER (priv->fontchooser)); diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 9dfd7eca7e..3eddff6e30 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -899,10 +899,12 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog, gtk_dialog_add_button (dialog, _("_Yes"), GTK_RESPONSE_YES); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_YES, GTK_RESPONSE_NO, -1); +G_GNUC_END_IGNORE_DEPRECATIONS break; case GTK_BUTTONS_OK_CANCEL: @@ -912,10 +914,12 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog, gtk_dialog_add_button (dialog, _("_OK"), GTK_RESPONSE_OK); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS break; default: diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index 87c7479e3e..850ac821e1 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -532,11 +532,12 @@ G_GNUC_END_IGNORE_DEPRECATIONS _("Co_nnect"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); - +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (dialog, GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS /* Build contents */ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 00f74b3cef..4288b8d9c5 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -213,11 +213,12 @@ gtk_page_setup_unix_dialog_init (GtkPageSetupUnixDialog *dialog) /* Load data */ _gtk_print_load_custom_papers (priv->custom_paper_list); load_print_backends (dialog); - +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_OK, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS } static void diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 763775c547..1bc7617268 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -684,10 +684,12 @@ error_dialogs (GtkPrintUnixDialog *print_dialog, add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_RESPONSE_ACCEPT); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT, GTK_RESPONSE_CANCEL, -1); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);