From fb4661be6d5fa6166ffe22b762f37d1f168303fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 17 Aug 2010 15:14:31 +0200 Subject: [PATCH] gtk/gtkprintoperation.c: Use accessor functions to access GtkWindow --- gtk/gtkprintoperation.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c index 85ecf0ef29..69c542c7f5 100644 --- a/gtk/gtkprintoperation.c +++ b/gtk/gtkprintoperation.c @@ -2924,6 +2924,7 @@ print_pages (GtkPrintOperation *op, if (!handled) { GtkWidget *error_dialog; + GtkWindowGroup *group; error_dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, @@ -2934,8 +2935,12 @@ 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.")); - if (parent && parent->group) - gtk_window_group_add_window (parent->group, GTK_WINDOW (error_dialog)); + if (parent) + { + group = gtk_window_get_group (parent); + if (group) + gtk_window_group_add_window (group, GTK_WINDOW (error_dialog)); + } g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);