summaryrefslogtreecommitdiff
path: root/demos/print-editor/print-editor.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-10-23 08:32:39 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-10-23 08:57:46 -0400
commit6f46e95c754c71dc7051714925bdd312b6b6a62d (patch)
treed9a4124dea2b23efb05aa89c3418a9fbaaccdc7d /demos/print-editor/print-editor.c
parent799fb41937950e32cace797c142ac66e290b192b (diff)
downloadgtk+-deprecate-gtkdialog.tar.gz
Deprecate GtkDialogdeprecate-gtkdialog
GtkDialog API is archaic and over-complicated. What is needed for dialogs can typically achieved more easily by adding buttons directly to a window.
Diffstat (limited to 'demos/print-editor/print-editor.c')
-rw-r--r--demos/print-editor/print-editor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demos/print-editor/print-editor.c b/demos/print-editor/print-editor.c
index ca5d143d06..38f9f6fd54 100644
--- a/demos/print-editor/print-editor.c
+++ b/demos/print-editor/print-editor.c
@@ -525,7 +525,9 @@ activate_save_as (GSimpleAction *action,
"_Cancel", GTK_RESPONSE_CANCEL,
"_Save", GTK_RESPONSE_OK,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_show (dialog);
@@ -572,7 +574,9 @@ activate_open (GSimpleAction *action,
"_Cancel", GTK_RESPONSE_CANCEL,
"_Open", GTK_RESPONSE_OK,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_show (dialog);