Selaa lähdekoodia

Bug 1783: Allow turning off asynchronous loading of icons

https://winscp.net/tracker/1783

Source commit: 6f1b4dd7a9001222a63cc235163fdab2202ce8c9
Martin Prikryl 6 vuotta sitten
vanhempi
sitoutus
cd04173de9

+ 1 - 0
source/forms/ScpCommander.cpp

@@ -638,6 +638,7 @@ void __fastcall TScpCommanderForm::ConfigurationChanged()
   LocalDriveView->NaturalOrderNumericalSorting = WinConfiguration->NaturalOrderNumericalSorting;
 
   LocalDirView->TimeoutShellIconRetrieval = WinConfiguration->TimeoutShellIconRetrieval;
+  LocalDirView->UseIconUpdateThread = WinConfiguration->UseIconUpdateThread;
 
   if (LocalDirView->RowSelect != WinConfiguration->FullRowSelect)
   {

+ 7 - 0
source/windows/WinConfiguration.cpp

@@ -624,6 +624,7 @@ void __fastcall TWinConfiguration::Default()
   HonorDrivePolicy = true;
   TimeoutShellOperations = true;
   TimeoutShellIconRetrieval = false;
+  UseIconUpdateThread = true;
   AllowWindowPrint = false;
 
   FEditor.Font.FontName = DefaultFixedWidthFontName;
@@ -1026,6 +1027,7 @@ THierarchicalStorage * TWinConfiguration::CreateScpStorage(bool & SessionList)
     KEY(String,   FExtensionsShortCuts); \
     KEY(Bool,     TimeoutShellOperations); \
     KEY(Bool,     TimeoutShellIconRetrieval); \
+    KEY(Bool,     UseIconUpdateThread); \
     KEY(Bool,     AllowWindowPrint); \
   ); \
   BLOCK(L"Interface\\Editor", CANCREATE, \
@@ -2684,6 +2686,11 @@ void __fastcall TWinConfiguration::SetTimeoutShellIconRetrieval(bool value)
   SET_CONFIG_PROPERTY(TimeoutShellIconRetrieval);
 }
 //---------------------------------------------------------------------------
+void __fastcall TWinConfiguration::SetUseIconUpdateThread(bool value)
+{
+  SET_CONFIG_PROPERTY(UseIconUpdateThread);
+}
+//---------------------------------------------------------------------------
 void __fastcall TWinConfiguration::SetAllowWindowPrint(bool value)
 {
   SET_CONFIG_PROPERTY(AllowWindowPrint);

+ 3 - 0
source/windows/WinConfiguration.h

@@ -454,6 +454,7 @@ private:
   int FRunsSinceLastTip;
   bool FLockedInterface;
   bool FTimeoutShellIconRetrieval;
+  bool FUseIconUpdateThread;
   bool FAllowWindowPrint;
   int FDontDecryptPasswords;
   int FMasterPasswordSession;
@@ -563,6 +564,7 @@ private:
   bool __fastcall GetTimeoutShellOperations();
   void __fastcall SetTimeoutShellOperations(bool value);
   void __fastcall SetTimeoutShellIconRetrieval(bool value);
+  void __fastcall SetUseIconUpdateThread(bool value);
   void __fastcall SetAllowWindowPrint(bool value);
   int __fastcall GetLocaleCompletenessTreshold();
 
@@ -749,6 +751,7 @@ public:
   __property bool LockedInterface = { read = FLockedInterface, write = SetLockedInterface };
   __property bool TimeoutShellOperations = { read = GetTimeoutShellOperations, write = SetTimeoutShellOperations };
   __property bool TimeoutShellIconRetrieval = { read = FTimeoutShellIconRetrieval, write = SetTimeoutShellIconRetrieval };
+  __property bool UseIconUpdateThread = { read = FUseIconUpdateThread, write = SetUseIconUpdateThread };
   __property bool AllowWindowPrint = { read = FAllowWindowPrint, write = SetAllowWindowPrint };
   __property LCID DefaultLocale = { read = FDefaultLocale };
   __property int LocaleCompletenessTreshold = { read = GetLocaleCompletenessTreshold };