Browse Source

Bug 2117: Increase maximal number of transfer at the same time

https://winscp.net/tracker/2117

Source commit: fa15cd0df44ef4ac314530c59781a929d4055476
Martin Prikryl 3 years ago
parent
commit
ef367b9c1f

+ 2 - 0
source/forms/Preferences.cpp

@@ -130,6 +130,8 @@ __fastcall TPreferencesDialog::TPreferencesDialog(
 
   AutomaticIniFileStorageLabel->Caption = ExpandEnvironmentVariables(Configuration->GetAutomaticIniFileStorageName(false));
 
+  QueueTransferLimitEdit->MaxValue = WinConfiguration->QueueTransferLimitMax;
+
   if (IsUWP())
   {
     UpdatesSheet->Caption = LoadStr(PREFERENCES_STATISTICS_CAPTION);

+ 7 - 0
source/windows/WinConfiguration.cpp

@@ -626,6 +626,7 @@ void __fastcall TWinConfiguration::Default()
   UseIconUpdateThread = true;
   AllowWindowPrint = false;
   StoreTransition = stInit;
+  QueueTransferLimitMax = 9;
   FirstRun = StandardDatestamp();
 
   FEditor.Font.FontName = DefaultFixedWidthFontName;
@@ -1080,6 +1081,7 @@ THierarchicalStorage * TWinConfiguration::CreateScpStorage(bool & SessionList)
     KEY(Bool,     UseIconUpdateThread); \
     KEY(Bool,     AllowWindowPrint); \
     KEY(Integer,  StoreTransition); \
+    KEY(Integer,  QueueTransferLimitMax); \
     KEY(String,   FirstRun); \
   ); \
   BLOCK(L"Interface\\Editor", CANCREATE, \
@@ -2766,6 +2768,11 @@ void TWinConfiguration::SetStoreTransition(TStoreTransition value)
   SET_CONFIG_PROPERTY(StoreTransition);
 }
 //---------------------------------------------------------------------------
+void TWinConfiguration::SetQueueTransferLimitMax(int value)
+{
+  SET_CONFIG_PROPERTY(QueueTransferLimitMax);
+}
+//---------------------------------------------------------------------------
 void TWinConfiguration::SetFirstRun(const UnicodeString & value)
 {
   SET_CONFIG_PROPERTY(FirstRun);

+ 3 - 0
source/windows/WinConfiguration.h

@@ -473,6 +473,7 @@ private:
   bool FUseIconUpdateThread;
   bool FAllowWindowPrint;
   TStoreTransition FStoreTransition;
+  int FQueueTransferLimitMax;
   UnicodeString FFirstRun;
   int FDontDecryptPasswords;
   int FMasterPasswordSession;
@@ -591,6 +592,7 @@ private:
   void __fastcall SetUseIconUpdateThread(bool value);
   void __fastcall SetAllowWindowPrint(bool value);
   void SetStoreTransition(TStoreTransition value);
+  void SetQueueTransferLimitMax(int value);
   void SetFirstRun(const UnicodeString & value);
   int __fastcall GetLocaleCompletenessTreshold();
 
@@ -791,6 +793,7 @@ public:
   __property bool UseIconUpdateThread = { read = FUseIconUpdateThread, write = SetUseIconUpdateThread };
   __property bool AllowWindowPrint = { read = FAllowWindowPrint, write = SetAllowWindowPrint };
   __property TStoreTransition StoreTransition = { read = FStoreTransition, write = SetStoreTransition };
+  __property int QueueTransferLimitMax = { read = FQueueTransferLimitMax, write = SetQueueTransferLimitMax };
   __property UnicodeString FirstRun = { read = FFirstRun, write = SetFirstRun };
   __property LCID DefaultLocale = { read = FDefaultLocale };
   __property int LocaleCompletenessTreshold = { read = GetLocaleCompletenessTreshold };