[gtk+] Update all internal users of alternative button order



commit 25e6ba48e72157d0cee42a1a639398d368239baf
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 17 11:41:03 2014 -0500

    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 3cd560f..21e19eb 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 c752984..2095d1f 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 8627fe5..124fb10 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 9dfd7ec..3eddff6 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 87c7479..850ac82 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 00f74b3..4288b8d 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 763775c..1bc7617 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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]