changeset 795:ca59edd1b04d

2006-8-2 Brian Masney <masneyb@gftp.org> * src/uicommon/gftpui.c (gftpui_common_add_file_transfer) - don't prompt the user about what to do with the file(s) that already exist if the overwrite_default option is enabled. This option is disabled by default. (closes #336232)
author masneyb
date Wed, 02 Aug 2006 22:50:21 +0000
parents 93cc3b620118
children 419443feddac
files ChangeLog src/uicommon/gftpui.c
diffstat 2 files changed, 24 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 31 12:32:24 2006 +0000
+++ b/ChangeLog	Wed Aug 02 22:50:21 2006 +0000
@@ -1,3 +1,9 @@
+2006-8-2 Brian Masney <masneyb@gftp.org>
+	* src/uicommon/gftpui.c (gftpui_common_add_file_transfer) - don't
+	prompt the user about what to do with the file(s) that already exist if
+	the overwrite_default option is enabled. This option is disabled by
+	default. (closes #336232)
+
 2006-7-29 Brian Masney <masneyb@gftp.org>
 	* src/gtk/gftp-gtk.c src/gtk/transfer.c - removed some unnecessary
 	updates to the toolbar
@@ -3522,7 +3528,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.462 2006/07/29 14:56:36 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.463 2006/08/02 22:50:21 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/src/uicommon/gftpui.c	Mon Jul 31 12:32:24 2006 +0000
+++ b/src/uicommon/gftpui.c	Wed Aug 02 22:50:21 2006 +0000
@@ -1139,24 +1139,29 @@
                                  void *fromuidata, void *touidata,
                                  GList * files)
 {
-  intptr_t append_transfers, one_transfer;
+  intptr_t append_transfers, one_transfer, overwrite_default;
   GList * templist, *curfle;
   gftp_transfer * tdata;
   gftp_file * tempfle;
   int show_dialog;
   
-  for (templist = files; templist != NULL; templist = templist->next)
-    { 
-      tempfle = templist->data;
-      if (tempfle->startsize > 0)
-        break;
+  gftp_lookup_request_option (fromreq, "overwrite_default", &overwrite_default);
+  gftp_lookup_request_option (fromreq, "append_transfers", &append_transfers);
+  gftp_lookup_request_option (fromreq, "one_transfer", &one_transfer);
+
+  if (!overwrite_default)
+    {
+      for (templist = files; templist != NULL; templist = templist->next)
+        { 
+          tempfle = templist->data;
+          if (tempfle->startsize > 0)
+            break;
+        }
+
+      show_dialog = templist != NULL;
     }
-  show_dialog = templist != NULL;
-  
-  gftp_lookup_request_option (fromreq, "append_transfers",
-                              &append_transfers);
-  gftp_lookup_request_option (fromreq, "one_transfer",
-                              &one_transfer);
+  else
+    show_dialog = 0;
 
   tdata = NULL;
   if (append_transfers && one_transfer && !show_dialog)