summaryrefslogtreecommitdiff
path: root/demos/node-editor
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/node-editor
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/node-editor')
-rw-r--r--demos/node-editor/node-editor-window.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c
index 25cf11b48d..519ae48d36 100644
--- a/demos/node-editor/node-editor-window.c
+++ b/demos/node-editor/node-editor-window.c
@@ -578,7 +578,10 @@ show_open_filechooser (NodeEditorWindow *self)
"_Load", GTK_RESPONSE_ACCEPT,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
GFile *cwd = g_file_new_for_path (".");
@@ -654,7 +657,10 @@ save_cb (GtkWidget *button,
"_Save", GTK_RESPONSE_ACCEPT,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
GFile *cwd = g_file_new_for_path (".");
@@ -773,7 +779,10 @@ export_image_cb (GtkWidget *button,
"_Save", GTK_RESPONSE_ACCEPT,
NULL);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
g_signal_connect (dialog, "response", G_CALLBACK (export_image_response_cb), texture);
gtk_widget_show (dialog);