gtk/gtkprintoperation.c: Use accessor functions to access GtkWindow

This commit is contained in:
Javier Jardón 2010-08-17 15:14:31 +02:00
parent 54b8b51f43
commit fb4661be6d

View File

@ -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);