Index: screenshot-xfer.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gnome-screenshot/screenshot-xfer.c,v
retrieving revision 1.4
diff -u -p -r1.4 screenshot-xfer.c
--- screenshot-xfer.c	21 Dec 2005 13:34:20 -0000	1.4
+++ screenshot-xfer.c	24 Dec 2005 01:04:17 -0000
@@ -71,7 +71,6 @@ handle_transfer_ok (const GnomeVFSXferPr
 	  transfer_info->delete_target = TRUE;
 	}
 
-      gtk_main_quit ();
       return 0;
     }
 
@@ -193,9 +208,15 @@ handle_transfer_overwrite (const GnomeVF
   response = gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy (dialog);
   if (response == GTK_RESPONSE_OK)
-    return GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE;
+    {
+      transfer_info->canceled = FALSE;
+      return GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE;
+    }
   else
-    return GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP;
+    {
+      transfer_info->canceled = TRUE;
+      return GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP;
+    }
 
   if (need_timeout)
     add_timeout (transfer_info);
@@ -276,6 +297,9 @@ screenshot_xfer_uri (GnomeVFSURI *source
 
   if (transfer_info->delete_target)
     ;/* try to delete the target, iff it started writing */
+
+  if (transfer_info->canceled == TRUE)
+    return GNOME_VFS_ERROR_CANCELLED;
 
   return GNOME_VFS_OK;
 }
