pkgsrc/misc/gnome-utils/patches/patch-ac

33 lines
1.3 KiB
Text

$NetBSD: patch-ac,v 1.9 2007/09/20 00:02:44 wiz Exp $
--- gnome-screenshot/screenshot-save.c.orig 2007-03-10 14:19:50.000000000 +0100
+++ gnome-screenshot/screenshot-save.c
@@ -115,7 +115,8 @@ read_pipe_from_child (GIOChannel *sour
status = g_io_channel_read_line (source, &error_message, NULL, NULL, NULL);
- if (status == G_IO_STATUS_NORMAL)
+ if (status == G_IO_STATUS_NORMAL
+ && error_message != NULL && strcmp (error_message, "OK") != 0)
{
message = g_strdup_printf ("Unable to save the screenshot to disk:\n\n%s", error_message);
dialog = gtk_message_dialog_new (NULL, 0,
@@ -226,8 +227,7 @@ screenshot_save_start (GdkPixbuf *pix
ERROR_MESSAGE,
strlen (ERROR_MESSAGE));
}
- /* By closing the pipe, we let the main process know that we're
- * done saving it. */
+ write (pipe_from_child[1], "OK", strlen ("OK"));
close (pipe_from_child[1]);
read (parent_exit_notification[0], &c, 1);
@@ -243,7 +243,7 @@ screenshot_save_start (GdkPixbuf *pix
channel = g_io_channel_unix_new (pipe_from_child[0]);
g_io_add_watch (channel,
- G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
+ G_IO_IN | G_IO_ERR | G_IO_NVAL,
read_pipe_from_child,
NULL);
g_io_channel_unref (channel);