[gtk/wip/hadess/window-present-docs: 3/5] all: Don't warn about deprecated gtk_window_present usage



commit 5a6a7b50af31826d342dbdb81901415f3b8f9356
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jul 25 17:42:26 2018 +0200

    all: Don't warn about deprecated gtk_window_present usage
    
    Avoid compilation warnings about internal users of gtk_window_present().

 gtk/a11y/gtkiconviewaccessible.c | 6 +++++-
 gtk/a11y/gtktreeviewaccessible.c | 6 +++++-
 gtk/a11y/gtkwidgetaccessible.c   | 3 +++
 gtk/gtkaboutdialog.c             | 4 ++++
 gtk/gtkcolorbutton.c             | 2 ++
 gtk/gtkfilechooserbutton.c       | 6 +++++-
 gtk/gtkfilechoosernative.c       | 2 ++
 gtk/gtkfontbutton.c              | 2 ++
 gtk/gtkpagesetupunixdialog.c     | 2 ++
 gtk/gtkprinteroptionwidget.c     | 2 ++
 gtk/gtkprintoperation-unix.c     | 8 ++++++--
 gtk/gtkprintoperation.c          | 2 ++
 gtk/gtkprintunixdialog.c         | 2 ++
 gtk/gtkwindow.c                  | 2 ++
 14 files changed, 44 insertions(+), 5 deletions(-)
---
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index 1cebf28df6..5eab1dbdf8 100644
--- a/gtk/a11y/gtkiconviewaccessible.c
+++ b/gtk/a11y/gtkiconviewaccessible.c
@@ -626,7 +626,11 @@ gtk_icon_view_item_accessible_grab_focus (AtkComponent *component)
   _gtk_icon_view_set_cursor_item (GTK_ICON_VIEW (item->widget), item->item, NULL);
   toplevel = gtk_widget_get_toplevel (GTK_WIDGET (item->widget));
   if (gtk_widget_is_toplevel (toplevel))
-    gtk_window_present (GTK_WINDOW (toplevel));
+    {
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+      gtk_window_present (GTK_WINDOW (toplevel));
+      G_GNUC_END_IGNORE_DEPRECATIONS
+    }
 
   return TRUE;
 }
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 6a27578540..79008638e4 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -1179,7 +1179,11 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent,
                                           gdk_x11_get_server_time (gtk_widget_get_surface (widget)));
           else
 #endif
-            gtk_window_present (GTK_WINDOW (toplevel));
+            {
+              G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+              gtk_window_present (GTK_WINDOW (toplevel));
+              G_GNUC_END_IGNORE_DEPRECATIONS
+            }
         }
 
       return TRUE;
diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c
index 69a205f508..ebdee94276 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -608,9 +608,12 @@ gtk_widget_accessible_grab_focus (AtkComponent *component)
       gtk_window_present_with_time (GTK_WINDOW (toplevel),
       gdk_x11_get_server_time (gtk_widget_get_surface (widget)));
 #else
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_window_present (GTK_WINDOW (toplevel));
+      G_GNUC_END_IGNORE_DEPRECATIONS
 #endif
     }
+
   return TRUE;
 }
 
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index ab344cc71b..1105a966e9 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -1002,7 +1002,9 @@ gtk_about_dialog_activate_link (GtkAboutDialog *about,
       g_signal_connect (dialog, "response",
                         G_CALLBACK (gtk_widget_destroy), NULL);
 
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_window_present (GTK_WINDOW (dialog));
+      G_GNUC_END_IGNORE_DEPRECATIONS
     }
 
   return TRUE;
@@ -2409,7 +2411,9 @@ gtk_show_about_dialog (GtkWindow   *parent,
 
     }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 /**
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 7b764d9957..0c8abded61 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -555,7 +555,9 @@ gtk_color_button_clicked (GtkButton *b,
 
   gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (priv->cs_dialog), &priv->rgba);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (priv->cs_dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 3d41a1f233..f7d4e3d49a 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2705,7 +2705,11 @@ open_dialog (GtkFileChooserButton *button)
 
   gtk_widget_set_sensitive (priv->combo_box, FALSE);
   if (priv->dialog)
-    gtk_window_present (GTK_WINDOW (priv->dialog));
+    {
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+      gtk_window_present (GTK_WINDOW (priv->dialog));
+      G_GNUC_END_IGNORE_DEPRECATIONS
+    }
   else
     gtk_native_dialog_show (GTK_NATIVE_DIALOG (priv->native));
 }
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c
index b6c65b449b..aec8cb9df9 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -623,7 +623,9 @@ show_dialog (GtkFileChooserNative *self)
                     G_CALLBACK (dialog_update_preview_cb),
                     self);
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (self->dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static void
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 4617ed12d3..3d87ffb103 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -995,7 +995,9 @@ gtk_font_button_clicked (GtkButton *button,
       gtk_font_chooser_set_font_desc (font_dialog, priv->font_desc);
     }
 
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (priv->font_dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 5bcd37a6bb..5549fe71c4 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -787,7 +787,9 @@ paper_size_changed (GtkComboBox            *combo_box,
           /* And show the custom paper dialog */
           custom_paper_dialog = _gtk_custom_paper_unix_dialog_new (GTK_WINDOW (dialog), NULL);
           g_signal_connect (custom_paper_dialog, "response", G_CALLBACK (custom_paper_dialog_response_cb), 
dialog);
+          G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_window_present (GTK_WINDOW (custom_paper_dialog));
+          G_GNUC_END_IGNORE_DEPRECATIONS
 
           return;
         }
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index a81168247b..6ca97ce35f 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -573,7 +573,9 @@ filesave_choose_cb (GtkWidget              *button,
   g_signal_connect (dialog, "response",
                     G_CALLBACK (dialog_response_callback), widget);
   gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 }
 
 static gchar *
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index 85cc171805..8e15763b67 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -729,8 +729,10 @@ gtk_print_operation_unix_run_dialog_async (GtkPrintOperation          *op,
 
       g_signal_connect (pd, "response", 
                        G_CALLBACK (handle_print_response), rdata);
-      
+
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_window_present (GTK_WINDOW (pd));
+      G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else
     {
@@ -1025,8 +1027,10 @@ gtk_print_run_page_setup_dialog_async (GtkWindow            *parent,
 
   g_signal_connect (dialog, "response",
                    G_CALLBACK (handle_page_setup_response), rdata);
- 
+
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (dialog));
+  G_GNUC_END_IGNORE_DEPRECATIONS
  }
 
 struct _PrinterFinder 
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index c18d3d2d78..3c6b01937c 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -2852,7 +2852,9 @@ handle_progress_response (GtkWidget *dialog,
 static gboolean
 show_progress_timeout (PrintPagesData *data)
 {
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_window_present (GTK_WINDOW (data->progress));
+  G_GNUC_END_IGNORE_DEPRECATIONS
 
   data->op->priv->show_progress_timeout_id = 0;
 
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 7dc8c37202..9b36ce9dd1 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -3312,7 +3312,9 @@ paper_size_changed (GtkComboBox        *combo_box,
           /* And show the custom paper dialog */
           custom_paper_dialog = _gtk_custom_paper_unix_dialog_new (GTK_WINDOW (dialog), _("Manage Custom 
Sizes"));
           g_signal_connect (custom_paper_dialog, "response", G_CALLBACK (custom_paper_dialog_response_cb), 
dialog);
+          G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           gtk_window_present (GTK_WINDOW (custom_paper_dialog));
+          G_GNUC_END_IGNORE_DEPRECATIONS
 
           return;
         }
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index a9cd0945c1..3da5073c08 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -10405,7 +10405,9 @@ gtk_window_set_debugging (gboolean enable,
 
   if (enable)
     {
+      G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gtk_window_present (GTK_WINDOW (inspector_window));
+      G_GNUC_END_IGNORE_DEPRECATIONS
       if (dialog)
         gtk_widget_show (dialog);
 


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