[gimp/samm/gimp-2-10-print-focus] Forgot to assign window to the gtk_print_operation_run
- From: Alex Samorukov <asamorukov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/samm/gimp-2-10-print-focus] Forgot to assign window to the gtk_print_operation_run
- Date: Wed, 15 Jan 2020 14:33:40 +0000 (UTC)
commit e70b2f6eab524bd3952cd1f6f88b4e12a172c762
Author: Alex Samorukov <samm net-art cz>
Date: Wed Jan 15 14:33:22 2020 +0000
Forgot to assign window to the gtk_print_operation_run
plug-ins/print/print.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/print/print.c b/plug-ins/print/print.c
index 89cd5e27f8..fbb2813553 100644
--- a/plug-ins/print/print.c
+++ b/plug-ins/print/print.c
@@ -212,6 +212,7 @@ print_image (gint32 image_ID,
GtkPrintOperationResult result;
gint32 layer;
PrintData data;
+ GtkWidget * printwindow;
#ifndef EMBED_PAGE_SETUP
gchar *temp_proc;
#endif
@@ -263,11 +264,12 @@ print_image (gint32 image_ID,
if (interactive)
{
gimp_ui_init (PLUG_IN_BINARY, FALSE);
+ printwindow = NULL;
#ifdef GDK_WINDOWING_QUARTZ
/* create top level window and make it transient to use correct monitor */
- GtkWidget * printwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ printwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gimp_window_set_transient (GTK_WINDOW (printwindow));
- gtk_widget_show(printwindow);
+ gtk_widget_show (printwindow);
#endif
g_signal_connect_swapped (operation, "end-print",
G_CALLBACK (print_settings_save),
@@ -285,7 +287,10 @@ print_image (gint32 image_ID,
result = gtk_print_operation_run (operation,
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
- NULL, error);
+ printwindow, error);
+
+ if (printwindow)
+ gtk_widget_destroy(printwindow);
if (result == GTK_PRINT_OPERATION_RESULT_APPLY ||
result == GTK_PRINT_OPERATION_RESULT_IN_PROGRESS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]