all: Don't warn about deprecated gtk_window_present usage

Avoid compilation warnings about internal users of gtk_window_present().
This commit is contained in:
Bastien Nocera 2018-07-25 17:42:26 +02:00
parent 8438880906
commit 5a6a7b50af
14 changed files with 44 additions and 5 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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
}
/**

View File

@ -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

View File

@ -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));
}

View File

@ -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

View File

@ -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
}

View File

@ -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;
}

View File

@ -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 *

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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);