diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-10-29 10:36:29 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-10-29 13:31:41 -0400 |
commit | 66b062a9761ca86130658adb66e929b3c5acb7ba (patch) | |
tree | 7be067c23b2d2ef328cd02c118b465fe1ec1caf1 /gtk/gtkprintoperation.c | |
parent | 15572b01833910a3b65edcc28eaa28968847fe71 (diff) | |
download | gtk+-66b062a9761ca86130658adb66e929b3c5acb7ba.tar.gz |
Deprecate GtkMessageDialog
It is getting replaced by GtkAlertDialog
This commit only moves the header to deprecated/,
and keeps the implementation in gtk/, since it will
eventually be salvaged into a private, dialog-free
widget.
Diffstat (limited to 'gtk/gtkprintoperation.c')
-rw-r--r-- | gtk/gtkprintoperation.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 399faf328d..a2f0a3d7bd 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -29,7 +29,7 @@ #include "gtkmarshalers.h" #include <glib/gi18n-lib.h> #include "gtkprivate.h" -#include "gtkmessagedialog.h" +#include "deprecated/gtkmessagedialog.h" #include "gtkwindowgroup.h" #include "gtktypebuiltins.h" @@ -2848,15 +2848,17 @@ print_pages (GtkPrintOperation *op, { GtkWidget *progress; - progress = gtk_message_dialog_new (parent, 0, - GTK_MESSAGE_OTHER, - GTK_BUTTONS_CANCEL, - _("Preparing")); - g_signal_connect (progress, "response", - G_CALLBACK (handle_progress_response), op); - - priv->show_progress_timeout_id = - g_timeout_add (SHOW_PROGRESS_TIME, +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + progress = gtk_message_dialog_new (parent, 0, + GTK_MESSAGE_OTHER, + GTK_BUTTONS_CANCEL, + _("Preparing")); +G_GNUC_END_IGNORE_DEPRECATIONS + g_signal_connect (progress, "response", + G_CALLBACK (handle_progress_response), op); + + priv->show_progress_timeout_id = + g_timeout_add (SHOW_PROGRESS_TIME, (GSourceFunc) show_progress_timeout, data); gdk_source_set_static_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout"); @@ -2878,6 +2880,7 @@ print_pages (GtkPrintOperation *op, { GtkWidget *error_dialog; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS error_dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, @@ -2886,6 +2889,7 @@ print_pages (GtkPrintOperation *op, gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (error_dialog), _("The most probable reason is that a temporary file could not be created.")); +G_GNUC_END_IGNORE_DEPRECATIONS if (parent && gtk_window_has_group (parent)) gtk_window_group_add_window (gtk_window_get_group (parent), |