[gtk/gtk-3-24] all: Don't warn about deprecated gtk_window_present usage
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] all: Don't warn about deprecated gtk_window_present usage
- Date: Fri, 22 Feb 2019 23:39:07 +0000 (UTC)
commit 5d7183ee0c2687e76b7030baa7db48b2ff097866
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 | 7 ++++++-
gtk/gtk-builder-tool.c | 2 ++
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 ++
15 files changed, 49 insertions(+), 6 deletions(-)
---
diff --git a/gtk/a11y/gtkiconviewaccessible.c b/gtk/a11y/gtkiconviewaccessible.c
index e8a3aa780f..4fbc1d18d0 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 32a51ec93f..adad462064 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_window (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 13f22b2eab..d1cf7da80f 100644
--- a/gtk/a11y/gtkwidgetaccessible.c
+++ b/gtk/a11y/gtkwidgetaccessible.c
@@ -647,8 +647,13 @@ gtk_widget_accessible_grab_focus (AtkComponent *component)
gdk_x11_get_server_time (gtk_widget_get_window (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/gtk-builder-tool.c b/gtk/gtk-builder-tool.c
index 31592d512d..38b73bc235 100644
--- a/gtk/gtk-builder-tool.c
+++ b/gtk/gtk-builder-tool.c
@@ -995,7 +995,9 @@ preview_file (const char *filename,
g_object_unref (widget);
}
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_window_present (GTK_WINDOW (window));
+ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_main ();
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index fe4ae24b55..9a0017544a 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -1003,7 +1003,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;
@@ -2436,7 +2438,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 a990ad5c63..b2b6f8b502 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -591,7 +591,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
}
/**
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 42a8abb84e..19c1770154 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -2738,7 +2738,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 cf1d97b31d..5801f4891a 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -653,7 +653,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 0964c516bc..ed62162a7f 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -1152,7 +1152,9 @@ gtk_font_button_clicked (GtkButton *button)
gtk_font_chooser_set_font_desc (font_dialog, font_button->priv->font_desc);
}
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_window_present (GTK_WINDOW (font_button->priv->font_dialog));
+ G_GNUC_END_IGNORE_DEPRECATIONS
}
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 5659e47c40..8952afa455 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -793,7 +793,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 47579a6f08..054b0e4277 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 5dfdfe7e71..ab976b0d9b 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -735,8 +735,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
{
@@ -1038,8 +1040,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 329a07aeaf..e682f569c0 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -2955,7 +2955,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 7259999e28..1d29fd6fc4 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -3335,7 +3335,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 1a954f1dc7..6ce5aff113 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -12790,7 +12790,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]