mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 00:11:29 +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)
|
if (!handled)
|
||||||
{
|
{
|
||||||
GtkWidget *error_dialog;
|
GtkWidget *error_dialog;
|
||||||
|
GtkWindowGroup *group;
|
||||||
|
|
||||||
error_dialog = gtk_message_dialog_new (parent,
|
error_dialog = gtk_message_dialog_new (parent,
|
||||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_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),
|
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (error_dialog),
|
||||||
_("The most probable reason is that a temporary file could not be created."));
|
_("The most probable reason is that a temporary file could not be created."));
|
||||||
|
|
||||||
if (parent && parent->group)
|
if (parent)
|
||||||
gtk_window_group_add_window (parent->group, GTK_WINDOW (error_dialog));
|
{
|
||||||
|
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_signal_connect (error_dialog, "response",
|
||||||
G_CALLBACK (gtk_widget_destroy), NULL);
|
G_CALLBACK (gtk_widget_destroy), NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user