Commit 5d7183ee authored by Bastien Nocera's avatar Bastien Nocera Committed by Matthias Clasen

all: Don't warn about deprecated gtk_window_present usage

Avoid compilation warnings about internal users of gtk_window_present().
parent 2ca4a3cb
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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 ();
......
......@@ -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
}
/**
......
......@@ -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
}
/**
......
......@@ -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));
}
......
......@@ -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
......
......@@ -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
}
......
......@@ -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;
}
......
......@@ -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 *
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment