[gtk+/dialogs: 25/25] Avoid remaining deprecation warnings



commit 1b8107001219aea3204d8ee7abe112de766c181e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 15 05:29:57 2014 -0500

    Avoid remaining deprecation warnings
    
    These should eventually be investigated and cleaned up.
    For now, just silence them.

 gtk/gtkfilechooserbutton.c   |    2 ++
 gtk/gtkfilechooserdefault.c  |    2 ++
 gtk/gtkmessagedialog.c       |   25 +++++++++++--------------
 gtk/gtkmountoperation.c      |    2 ++
 gtk/gtkrecentchooserdialog.c |    4 ++++
 5 files changed, 21 insertions(+), 14 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/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 7ce8274..29615ec 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -318,7 +318,9 @@ gtk_message_dialog_init (GtkMessageDialog *dialog)
 
   gtk_widget_init_template (GTK_WIDGET (dialog));
   gtk_message_dialog_style_updated (GTK_WIDGET (dialog));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+G_GNUC_END_IGNORE_DEPRECATIONS
   gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_EXPAND);
 }
 
@@ -873,6 +875,7 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog,
 {
   GtkDialog* dialog = GTK_DIALOG (message_dialog);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   switch (buttons)
     {
     case GTK_BUTTONS_NONE:
@@ -881,29 +884,24 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog,
 
     case GTK_BUTTONS_OK:
       gtk_dialog_add_button (dialog,
-                             _("_OK"),
-                             GTK_RESPONSE_OK);
+                             _("_OK"), GTK_RESPONSE_OK);
       break;
 
     case GTK_BUTTONS_CLOSE:
       gtk_dialog_add_button (dialog,
-                             _("_Close"),
-                             GTK_RESPONSE_CLOSE);
+                             _("_Close"), GTK_RESPONSE_CLOSE);
       break;
 
     case GTK_BUTTONS_CANCEL:
       gtk_dialog_add_button (dialog,
-                             _("_Cancel"),
-                             GTK_RESPONSE_CANCEL);
+                             _("_Cancel"), GTK_RESPONSE_CANCEL);
       break;
 
     case GTK_BUTTONS_YES_NO:
       gtk_dialog_add_button (dialog,
-                             _("_No"),
-                             GTK_RESPONSE_NO);
+                             _("_No"), GTK_RESPONSE_NO);
       gtk_dialog_add_button (dialog,
-                             _("_Yes"),
-                             GTK_RESPONSE_YES);
+                             _("_Yes"), GTK_RESPONSE_YES);
       gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
                                               GTK_RESPONSE_YES,
                                               GTK_RESPONSE_NO,
@@ -912,11 +910,9 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog,
 
     case GTK_BUTTONS_OK_CANCEL:
       gtk_dialog_add_button (dialog,
-                             _("_Cancel"),
-                             GTK_RESPONSE_CANCEL);
+                             _("_Cancel"), GTK_RESPONSE_CANCEL);
       gtk_dialog_add_button (dialog,
-                             _("_OK"),
-                             GTK_RESPONSE_OK);
+                             _("_OK"), GTK_RESPONSE_OK);
       gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
                                               GTK_RESPONSE_OK,
                                               GTK_RESPONSE_CANCEL,
@@ -927,6 +923,7 @@ gtk_message_dialog_add_buttons (GtkMessageDialog* message_dialog,
       g_warning ("Unknown GtkButtonsType");
       break;
     } 
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   g_object_notify (G_OBJECT (message_dialog), "buttons");
 }
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index 6e63fa3..7ff1f33 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -520,7 +520,9 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
   priv->dialog = dialog;
 
   content_area = gtk_dialog_get_content_area (dialog);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   action_area = gtk_dialog_get_action_area (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /* Set the dialog up with HIG properties */
   gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c
index 9adc857..4cdb558 100644
--- a/gtk/gtkrecentchooserdialog.c
+++ b/gtk/gtkrecentchooserdialog.c
@@ -130,7 +130,9 @@ gtk_recent_chooser_dialog_init (GtkRecentChooserDialog *dialog)
   dialog->priv = priv;
 
   content_area = gtk_dialog_get_content_area (rc_dialog);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   action_area = gtk_dialog_get_action_area (rc_dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   gtk_container_set_border_width (GTK_CONTAINER (rc_dialog), 5);
   gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
@@ -156,7 +158,9 @@ gtk_recent_chooser_item_activated_cb (GtkRecentChooser *chooser,
   if (gtk_window_activate_default (GTK_WINDOW (dialog)))
     return;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   action_area = gtk_dialog_get_action_area (rc_dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
   children = gtk_container_get_children (GTK_CONTAINER (action_area));
   
   for (l = children; l; l = l->next)


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