summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--demos/gtk-demo/spinner.c2
-rw-r--r--demos/widget-factory/widget-factory.c2
-rw-r--r--docs/reference/gtk/migrating-4to5.md8
-rw-r--r--examples/bp/bloatpad.c2
-rw-r--r--gtk/deprecated/gtkappchooserdialog.h2
-rw-r--r--gtk/deprecated/gtkcolorchooserdialog.h2
-rw-r--r--gtk/deprecated/gtkdialog.c (renamed from gtk/gtkdialog.c)2
-rw-r--r--gtk/deprecated/gtkdialog.h (renamed from gtk/gtkdialog.h)24
-rw-r--r--gtk/deprecated/gtkdialogprivate.h (renamed from gtk/gtkdialogprivate.h)0
-rw-r--r--gtk/deprecated/gtkfilechooserdialog.h2
-rw-r--r--gtk/deprecated/gtkfontchooserdialog.h2
-rw-r--r--gtk/deprecated/gtkmessagedialog.h2
-rw-r--r--gtk/deprecated/meson.build2
-rw-r--r--gtk/gtk.h2
-rw-r--r--gtk/gtkalertdialog.c2
-rw-r--r--gtk/gtkcolorchooserdialog.c4
-rw-r--r--gtk/gtkcustompaperunixdialog.c9
-rw-r--r--gtk/gtkfilechooserdialog.c2
-rw-r--r--gtk/gtkfilechoosernativeportal.c2
-rw-r--r--gtk/gtkfiledialog.c2
-rw-r--r--gtk/gtkfontchooserdialog.c2
-rw-r--r--gtk/gtkfontchooserwidget.c2
-rw-r--r--gtk/gtkinfobar.c2
-rw-r--r--gtk/gtkmessagedialog.c2
-rw-r--r--gtk/gtkmountoperation.c18
-rw-r--r--gtk/gtkpagesetupunixdialog.c5
-rw-r--r--gtk/gtkprintbackend.c4
-rw-r--r--gtk/gtkprintunixdialog.c4
-rw-r--r--gtk/gtkwindow.c2
-rw-r--r--gtk/meson.build2
-rw-r--r--tests/testlockbutton.c2
-rw-r--r--tests/testwindowsize.c2
-rw-r--r--testsuite/a11y/dialog.c2
34 files changed, 91 insertions, 35 deletions
diff --git a/NEWS b/NEWS
index eba0eaba0b..2483703d06 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ feedback on our plans.
* GtkMessageDialog has been deprecated and
replaced by a new async dialog API
+* GtkDialog has been deprecated
+
* GtkColorChooser, GtkFontChooser, GtkFileChooser
interfaces and their implementations have been
deprecated. A new family of async dialog APIs
diff --git a/demos/gtk-demo/spinner.c b/demos/gtk-demo/spinner.c
index 925f02576e..8cd6b76680 100644
--- a/demos/gtk-demo/spinner.c
+++ b/demos/gtk-demo/spinner.c
@@ -35,6 +35,7 @@ do_spinner (GtkWidget *do_widget)
if (!window)
{
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
window = gtk_dialog_new_with_buttons ("Spinner",
GTK_WINDOW (do_widget),
0,
@@ -48,6 +49,7 @@ do_spinner (GtkWidget *do_widget)
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
+G_GNUC_END_IGNORE_DEPRECATIONS
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_widget_set_margin_start (vbox, 5);
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index b41283d10f..bf64d3845c 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -1467,7 +1467,9 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
if (response == GTK_RESPONSE_CANCEL)
return;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
box = gtk_widget_get_first_child (gtk_dialog_get_content_area (GTK_DIALOG (dialog)));
+G_GNUC_END_IGNORE_DEPRECATIONS
g_assert (GTK_IS_FLOW_BOX (box));
children = gtk_flow_box_get_selected_children (GTK_FLOW_BOX (box));
diff --git a/docs/reference/gtk/migrating-4to5.md b/docs/reference/gtk/migrating-4to5.md
index 2025d66304..14c37f70f1 100644
--- a/docs/reference/gtk/migrating-4to5.md
+++ b/docs/reference/gtk/migrating-4to5.md
@@ -89,3 +89,11 @@ There are also equivalents for some of the 'button' widgets:
Like the Chooser interfaces, GtkMessageDialog has been replaced by
a new async API that will be more convenient, in particular for
language binding. The new API is [class@Gtk.AlertDialog].
+
+## GtkDialog is going away
+
+After gtk_dialog_run() was removed, the usefulness of GtkDialog
+is much reduced, and it has awkward, archaice APIs. Therefore,
+it is dropped. The recommended replacement is to just create
+your own window and add buttons as required, either in the header
+or elsewhere.
diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c
index c930a453f7..0054d77a67 100644
--- a/examples/bp/bloatpad.c
+++ b/examples/bp/bloatpad.c
@@ -1,6 +1,8 @@
#include <stdlib.h>
#include <gtk/gtk.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
typedef struct
{
GtkApplication parent_instance;
diff --git a/gtk/deprecated/gtkappchooserdialog.h b/gtk/deprecated/gtkappchooserdialog.h
index 80e926932a..5844810ba2 100644
--- a/gtk/deprecated/gtkappchooserdialog.h
+++ b/gtk/deprecated/gtkappchooserdialog.h
@@ -29,7 +29,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
#include <gio/gio.h>
G_BEGIN_DECLS
diff --git a/gtk/deprecated/gtkcolorchooserdialog.h b/gtk/deprecated/gtkcolorchooserdialog.h
index a5d0f4ef86..d2bcfe7682 100644
--- a/gtk/deprecated/gtkcolorchooserdialog.h
+++ b/gtk/deprecated/gtkcolorchooserdialog.h
@@ -22,7 +22,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
G_BEGIN_DECLS
diff --git a/gtk/gtkdialog.c b/gtk/deprecated/gtkdialog.c
index d824222b0d..3f843d1766 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/deprecated/gtkdialog.c
@@ -43,6 +43,8 @@
#include "gtktypebuiltins.h"
#include "gtksizegroup.h"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* GtkDialog:
*
diff --git a/gtk/gtkdialog.h b/gtk/deprecated/gtkdialog.h
index 4530d518e8..89f2e509cd 100644
--- a/gtk/gtkdialog.h
+++ b/gtk/deprecated/gtkdialog.h
@@ -127,51 +127,51 @@ struct _GtkDialogClass
GDK_AVAILABLE_IN_ALL
GType gtk_dialog_get_type (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget* gtk_dialog_new (void);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget* gtk_dialog_new_with_buttons (const char *title,
GtkWindow *parent,
GtkDialogFlags flags,
const char *first_button_text,
...) G_GNUC_NULL_TERMINATED;
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_dialog_add_action_widget (GtkDialog *dialog,
GtkWidget *child,
int response_id);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget* gtk_dialog_add_button (GtkDialog *dialog,
const char *button_text,
int response_id);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_dialog_add_buttons (GtkDialog *dialog,
const char *first_button_text,
...) G_GNUC_NULL_TERMINATED;
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_dialog_set_response_sensitive (GtkDialog *dialog,
int response_id,
gboolean setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_dialog_set_default_response (GtkDialog *dialog,
int response_id);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget* gtk_dialog_get_widget_for_response (GtkDialog *dialog,
int response_id);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
int gtk_dialog_get_response_for_widget (GtkDialog *dialog,
GtkWidget *widget);
/* Emit response signal */
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_dialog_response (GtkDialog *dialog,
int response_id);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget * gtk_dialog_get_content_area (GtkDialog *dialog);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
GtkWidget * gtk_dialog_get_header_bar (GtkDialog *dialog);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkDialog, g_object_unref)
diff --git a/gtk/gtkdialogprivate.h b/gtk/deprecated/gtkdialogprivate.h
index 1c32daa80c..1c32daa80c 100644
--- a/gtk/gtkdialogprivate.h
+++ b/gtk/deprecated/gtkdialogprivate.h
diff --git a/gtk/deprecated/gtkfilechooserdialog.h b/gtk/deprecated/gtkfilechooserdialog.h
index 40cab7da13..e9403dfec0 100644
--- a/gtk/deprecated/gtkfilechooserdialog.h
+++ b/gtk/deprecated/gtkfilechooserdialog.h
@@ -23,7 +23,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
#include <gtk/deprecated/gtkfilechooser.h>
G_BEGIN_DECLS
diff --git a/gtk/deprecated/gtkfontchooserdialog.h b/gtk/deprecated/gtkfontchooserdialog.h
index ca1d9e4a1f..af5c4fb830 100644
--- a/gtk/deprecated/gtkfontchooserdialog.h
+++ b/gtk/deprecated/gtkfontchooserdialog.h
@@ -22,7 +22,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
G_BEGIN_DECLS
diff --git a/gtk/deprecated/gtkmessagedialog.h b/gtk/deprecated/gtkmessagedialog.h
index afbe0319f8..74be977199 100644
--- a/gtk/deprecated/gtkmessagedialog.h
+++ b/gtk/deprecated/gtkmessagedialog.h
@@ -29,7 +29,7 @@
#error "Only <gtk/gtk.h> can be included directly."
#endif
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
#include <gtk/gtkenums.h>
G_BEGIN_DECLS
diff --git a/gtk/deprecated/meson.build b/gtk/deprecated/meson.build
index 5c1ef2dad5..4749be6085 100644
--- a/gtk/deprecated/meson.build
+++ b/gtk/deprecated/meson.build
@@ -23,6 +23,7 @@ gtk_deprecated_sources = [
'deprecated/gtkcolorchooser.c',
'deprecated/gtkcombobox.c',
'deprecated/gtkcomboboxtext.c',
+ 'deprecated/gtkdialog.c',
'deprecated/gtkentrycompletion.c',
'deprecated/gtkfilechooser.c',
'deprecated/gtkfontbutton.c',
@@ -71,6 +72,7 @@ gtk_deprecated_headers = [
'deprecated/gtkcolorchooserwidget.h',
'deprecated/gtkcombobox.h',
'deprecated/gtkcomboboxtext.h',
+ 'deprecated/gtkdialog.h',
'deprecated/gtkentrycompletion.h',
'deprecated/gtkfilechooser.h',
'deprecated/gtkfilechooserdialog.h',
diff --git a/gtk/gtk.h b/gtk/gtk.h
index d66cc2073d..10c03f3086 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -97,7 +97,7 @@
#include <gtk/gtkcustomlayout.h>
#include <gtk/gtkcustomsorter.h>
#include <gtk/gtkdebug.h>
-#include <gtk/gtkdialog.h>
+#include <gtk/deprecated/gtkdialog.h>
#include <gtk/gtkdialogerror.h>
#include <gtk/gtkdirectorylist.h>
#include <gtk/gtkdragicon.h>
diff --git a/gtk/gtkalertdialog.c b/gtk/gtkalertdialog.c
index 4048c6bb1f..db853ebe46 100644
--- a/gtk/gtkalertdialog.c
+++ b/gtk/gtkalertdialog.c
@@ -663,6 +663,7 @@ gtk_alert_dialog_choose (GtkAlertDialog *self,
g_return_if_fail (GTK_IS_ALERT_DIALOG (self));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
window = g_object_new (GTK_TYPE_MESSAGE_DIALOG,
"transient-for", parent,
"destroy-with-parent", TRUE,
@@ -689,6 +690,7 @@ gtk_alert_dialog_choose (GtkAlertDialog *self,
gtk_dialog_set_default_response (GTK_DIALOG (window), 0);
self->cancel_return = 0;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
task = g_task_new (self, cancellable, callback, user_data);
g_task_set_source_tag (task, gtk_alert_dialog_choose);
diff --git a/gtk/gtkcolorchooserdialog.c b/gtk/gtkcolorchooserdialog.c
index 0833e7958d..a5af33fe4b 100644
--- a/gtk/gtkcolorchooserdialog.c
+++ b/gtk/gtkcolorchooserdialog.c
@@ -17,8 +17,8 @@
#include "config.h"
-#include "gtkdialog.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialog.h"
+#include "deprecated/gtkdialogprivate.h"
#include "gtkbutton.h"
#include "gtkbox.h"
#include "gtkprivate.h"
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index 08238d3642..1bc2a64d93 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -37,7 +37,7 @@
#include "gtkcustompaperunixdialog.h"
#include "gtkprintbackendprivate.h"
#include "gtkprintutils.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#define LEGACY_CUSTOM_PAPER_FILENAME ".gtk-custom-papers"
#define CUSTOM_PAPER_FILENAME "custom-papers"
@@ -283,7 +283,9 @@ gtk_custom_paper_unix_dialog_init (GtkCustomPaperUnixDialog *dialog)
GListModel *full_list;
GtkFilter *filter;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (dialog));
+G_GNUC_END_IGNORE_DEPRECATIONS
dialog->print_backends = NULL;
@@ -318,6 +320,7 @@ gtk_custom_paper_unix_dialog_constructed (GObject *object)
G_OBJECT_CLASS (gtk_custom_paper_unix_dialog_parent_class)->constructed (object);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_object_get (object, "use-header-bar", &use_header, NULL);
if (!use_header)
{
@@ -326,6 +329,7 @@ gtk_custom_paper_unix_dialog_constructed (GObject *object)
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (object), GTK_RESPONSE_CLOSE);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
@@ -847,7 +851,10 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog)
GtkSelectionModel *model;
GtkListItemFactory *factory;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
content_area = gtk_dialog_get_content_area (cpu_dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index cb63d8c101..050d006bcb 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -31,7 +31,7 @@
#include "gtksettings.h"
#include "gtktogglebutton.h"
#include "gtkheaderbar.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#include "gtklabel.h"
#include "gtkfilechooserentry.h"
#include "gtkbox.h"
diff --git a/gtk/gtkfilechoosernativeportal.c b/gtk/gtkfilechoosernativeportal.c
index e1eee90e10..530e63cff0 100644
--- a/gtk/gtkfilechoosernativeportal.c
+++ b/gtk/gtkfilechoosernativeportal.c
@@ -23,7 +23,7 @@
#include "gtknativedialogprivate.h"
#include "gtkprivate.h"
-#include "gtkdialog.h"
+#include "deprecated/gtkdialog.h"
#include "gtkfilechooserprivate.h"
#include "gtksizerequest.h"
#include "gtktypebuiltins.h"
diff --git a/gtk/gtkfiledialog.c b/gtk/gtkfiledialog.c
index 353ea32d20..d04598b996 100644
--- a/gtk/gtkfiledialog.c
+++ b/gtk/gtkfiledialog.c
@@ -21,7 +21,7 @@
#include "gtkfiledialog.h"
-#include "gtkdialog.h"
+#include "deprecated/gtkdialog.h"
#include "deprecated/gtkfilechoosernative.h"
#include "gtkdialogerror.h"
#include <glib/gi18n-lib.h>
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index fc640ce540..f7ddea7ebb 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -32,7 +32,7 @@
#include "gtkprivate.h"
#include "gtkwidget.h"
#include "gtksettings.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#include "gtktogglebutton.h"
#include "gtkheaderbar.h"
#include "gtkactionable.h"
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index fb73a5376a..8b71e18078 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -48,7 +48,7 @@
#include "gtktextview.h"
#include "gtkwidgetprivate.h"
#include "gtksettings.h"
-#include "gtkdialog.h"
+#include "deprecated/gtkdialog.h"
#include "gtkgestureclick.h"
#include "gtkeventcontrollerscroll.h"
#include "gtkroot.h"
diff --git a/gtk/gtkinfobar.c b/gtk/gtkinfobar.c
index 788077305e..82b27a9931 100644
--- a/gtk/gtkinfobar.c
+++ b/gtk/gtkinfobar.c
@@ -38,7 +38,7 @@
#include "gtklabel.h"
#include "gtkbutton.h"
#include "gtkenums.h"
-#include "gtkdialog.h"
+#include "deprecated/gtkdialog.h"
#include "gtkrevealer.h"
#include "gtkprivate.h"
#include "gtktypebuiltins.h"
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 07e2c0e2c2..304bf3c301 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -29,7 +29,7 @@
#include "gtkbox.h"
#include "gtkbuildable.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#include <glib/gi18n-lib.h>
#include "gtklabel.h"
#include "gtkprivate.h"
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index b20824053f..d103e0aea1 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -45,7 +45,7 @@
#include "gtkicontheme.h"
#include "gtkmain.h"
#include "gtksettings.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#include "gtkpopover.h"
#include "gtksnapshot.h"
#include "gdktextureprivate.h"
@@ -468,9 +468,11 @@ pw_dialog_verify_input (GtkEditable *editable,
gboolean is_valid;
is_valid = pw_dialog_input_is_valid (operation);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_response_sensitive (GTK_DIALOG (priv->dialog),
GTK_RESPONSE_OK,
is_valid);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static void
@@ -493,9 +495,11 @@ pw_dialog_anonymous_toggled (GtkWidget *widget,
gtk_widget_set_sensitive (GTK_WIDGET (l->data), !priv->anonymous);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_response_sensitive (GTK_DIALOG (priv->dialog),
GTK_RESPONSE_OK,
is_valid);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
@@ -593,6 +597,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
priv->dialog = dialog;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
content_area = gtk_dialog_get_content_area (dialog);
gtk_window_set_resizable (window, FALSE);
@@ -604,6 +609,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
_("Co_nnect"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
+G_GNUC_END_IGNORE_DEPRECATIONS
/* Build contents */
@@ -794,7 +800,11 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
g_signal_emit_by_name (priv->anonymous_toggle, "toggled");
}
else if (! pw_dialog_input_is_valid (operation))
- gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
+ {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, FALSE);
+G_GNUC_END_IGNORE_DEPRECATIONS
+ }
g_object_notify (G_OBJECT (operation), "is-showing");
@@ -1459,13 +1469,17 @@ create_show_processes_dialog (GtkMountOperation *op,
primary = g_strndup (message, primary - message);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog = gtk_dialog_new ();
+G_GNUC_END_IGNORE_DEPRECATIONS
if (priv->parent_window != NULL)
gtk_window_set_transient_for (GTK_WINDOW (dialog), priv->parent_window);
gtk_window_set_title (GTK_WINDOW (dialog), "");
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+G_GNUC_END_IGNORE_DEPRECATIONS
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_widget_set_margin_top (vbox, 12);
gtk_widget_set_margin_bottom (vbox, 12);
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 399d38f29d..a78bbc13d9 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -35,7 +35,7 @@
#include "gtkprintbackendprivate.h"
#include "gtkpapersize.h"
#include "gtkprintutils.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
/**
* GtkPageSetupUnixDialog:
@@ -276,12 +276,15 @@ gtk_page_setup_unix_dialog_init (GtkPageSetupUnixDialog *dialog)
dialog->print_backends = NULL;
gtk_widget_init_template (GTK_WIDGET (dialog));
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (dialog));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_Apply"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+G_GNUC_END_IGNORE_DEPRECATIONS
dialog->page_setup_list = g_list_store_new (GTK_TYPE_PAGE_SETUP);
dialog->custom_paper_list = g_list_store_new (GTK_TYPE_PAGE_SETUP);
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index c24ad6603f..0b0cdef17d 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -633,12 +633,14 @@ request_password (GtkPrintBackend *backend,
priv->auth_info = g_new0 (char *, length + 1);
priv->store_auth_info = FALSE;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dialog = gtk_dialog_new_with_buttons ( _("Authentication"), NULL, GTK_DIALOG_MODAL,
_("_Cancel"), GTK_RESPONSE_CANCEL,
_("_OK"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+G_GNUC_END_IGNORE_DEPRECATIONS
main_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -665,7 +667,9 @@ request_password (GtkPrintBackend *backend,
g_free (markup);
/* Packing */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_box_append (GTK_BOX (content_area), main_box);
gtk_box_append (GTK_BOX (main_box), icon);
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index dd950c31ff..30ac3d8a43 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -52,11 +52,13 @@
#include <glib/gi18n-lib.h>
#include "gtkprivate.h"
#include "gtktypebuiltins.h"
-#include "gtkdialogprivate.h"
+#include "deprecated/gtkdialogprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcsscolorvalueprivate.h"
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/**
* GtkPrintUnixDialog:
*
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d5141c10b6..a7cbde18bc 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6142,7 +6142,6 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
"application to break or crash."));
area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (dialog));
-G_GNUC_END_IGNORE_DEPRECATIONS
check = gtk_check_button_new_with_label (_("Don’t show this message again"));
gtk_widget_set_margin_start (check, 10);
gtk_widget_show (check);
@@ -6154,6 +6153,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_object_set_data (G_OBJECT (inspector_window), "warning_dialog", dialog);
gtk_widget_show (dialog);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
if (select)
diff --git a/gtk/meson.build b/gtk/meson.build
index d31f1f9d33..648d56cea9 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -199,7 +199,6 @@ gtk_public_sources = files([
'gtkcustomfilter.c',
'gtkcustomlayout.c',
'gtkcustomsorter.c',
- 'gtkdialog.c',
'gtkdialogerror.c',
'gtkdirectorylist.c',
'gtkdragicon.c',
@@ -455,7 +454,6 @@ gtk_public_headers = files([
'gtkcustomlayout.h',
'gtkcustomsorter.h',
'gtkdebug.h',
- 'gtkdialog.h',
'gtkdialogerror.h',
'gtkdirectorylist.h',
'gtkdragicon.h',
diff --git a/tests/testlockbutton.c b/tests/testlockbutton.c
index ff7599b65f..88665bc3b8 100644
--- a/tests/testlockbutton.c
+++ b/tests/testlockbutton.c
@@ -19,6 +19,8 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
/* a fake permission implementation */
#define G_TYPE_TEST_PERMISSION (g_test_permission_get_type ())
diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c
index f61669b204..f280ba2158 100644
--- a/tests/testwindowsize.c
+++ b/tests/testwindowsize.c
@@ -1,6 +1,8 @@
/* gcc -g -Wall -O2 -o dialog-test dialog-test.c `pkg-config --cflags --libs gtk4` */
#include <gtk/gtk.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static GtkWidget *window;
static GtkWidget *width_chars_spin;
static GtkWidget *max_width_chars_spin;
diff --git a/testsuite/a11y/dialog.c b/testsuite/a11y/dialog.c
index b24933c9ce..cd1a7bc65d 100644
--- a/testsuite/a11y/dialog.c
+++ b/testsuite/a11y/dialog.c
@@ -1,5 +1,7 @@
#include <gtk/gtk.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void
dialog_role (void)
{