summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-unix.c
diff options
context:
space:
mode:
authorMattthias Clasen <mclasen@redhat.com>2007-04-29 18:03:35 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-04-29 18:03:35 +0000
commit99e8b92b6afcdfd99966719cced69355ce34313b (patch)
treee30fc82b92f52adc30b86dc0fdd60970e11ddb78 /gtk/gtkprintoperation-unix.c
parentf4895bec7737583289be9f9ee3e28ed52da89012 (diff)
downloadgtk+-99e8b92b6afcdfd99966719cced69355ce34313b.tar.gz
Don't leak a file descriptor, and don't make the error dialog modal.
2007-04-29 Mattthias Clasen <mclasen@redhat.com> * gtk/gtkprintoperation-unix.c (_gtk_print_operation_platform_backend_launch_preview): Don't leak a file descriptor, and don't make the error dialog modal. (#421985, Morten Welinder) svn path=/trunk/; revision=17708
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r--gtk/gtkprintoperation-unix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index c65cfa5070..d254c5ffed 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -212,8 +212,6 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op,
if (!gtk_print_settings_to_file (print_settings, settings_filename, &error))
goto out;
- close (fd);
-
settings = gtk_settings_get_for_screen (screen);
g_object_get (settings, "gtk-print-preview-command", &preview_cmd, NULL);
@@ -235,6 +233,8 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op,
g_strfreev (argv);
out:
+ close (fd);
+
if (error != NULL)
{
GtkWidget *edialog;
@@ -245,7 +245,6 @@ _gtk_print_operation_platform_backend_launch_preview (GtkPrintOperation *op,
_("Error launching preview") /* FIXME better text */);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (edialog),
"%s", error->message);
- gtk_window_set_modal (GTK_WINDOW (edialog), TRUE);
g_signal_connect (edialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);