mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
gtk/gtkprintoperation.c: Use accessor functions to access GtkWindow
This commit is contained in:
parent
54b8b51f43
commit
fb4661be6d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user