Browse Source

Naming consistency

(cherry picked from commit a255db644cff30eefe71762d3fed0644d152d71c)

Source commit: cb938dffd346dd4e94a85388f8874f422e2778fd
Martin Prikryl 5 năm trước cách đây
mục cha
commit
0854aece22

+ 2 - 2
source/core/FtpFileSystem.cpp

@@ -1813,8 +1813,8 @@ bool __fastcall TFTPFileSystem::IsCapable(int Capability) const
     case fcRemoteMove:
     case fcRemoveBOMUpload:
     case fcMoveToQueue:
-    case fsSkipTransfer:
-    case fsParallelTransfers:
+    case fcSkipTransfer:
+    case fcParallelTransfers:
       return true;
 
     case fcPreservingTimestampUpload:

+ 2 - 2
source/core/S3FileSystem.cpp

@@ -649,8 +649,8 @@ bool __fastcall TS3FileSystem::IsCapable(int Capability) const
     case fcRename:
     case fcRemoteMove:
     case fcMoveToQueue:
-    case fsSkipTransfer:
-    case fsParallelTransfers:
+    case fcSkipTransfer:
+    case fcParallelTransfers:
       return true;
 
     case fcPreservingTimestampUpload:

+ 2 - 2
source/core/ScpFileSystem.cpp

@@ -460,8 +460,8 @@ bool __fastcall TSCPFileSystem::IsCapable(int Capability) const
     case fcLocking:
     case fcPreservingTimestampDirs:
     case fcResumeSupport:
-    case fsSkipTransfer:
-    case fsParallelTransfers: // does not implement cpNoRecurse
+    case fcSkipTransfer:
+    case fcParallelTransfers: // does not implement cpNoRecurse
       return false;
 
     case fcChangePassword:

+ 1 - 1
source/core/SessionInfo.h

@@ -45,7 +45,7 @@ enum TFSCapability { fcUserGroupListing, fcModeChanging, fcGroupChanging,
   fcModeChangingUpload, fcPreservingTimestampUpload, fcShellAnyCommand,
   fcSecondaryShell, fcRemoveCtrlZUpload, fcRemoveBOMUpload, fcMoveToQueue,
   fcLocking, fcPreservingTimestampDirs, fcResumeSupport,
-  fcChangePassword, fsSkipTransfer, fsParallelTransfers, fsBackgroundTransfers,
+  fcChangePassword, fcSkipTransfer, fcParallelTransfers, fcBackgroundTransfers,
   fcCount };
 //---------------------------------------------------------------------------
 struct TFileSystemInfo

+ 2 - 2
source/core/SftpFileSystem.cpp

@@ -2067,8 +2067,8 @@ bool __fastcall TSFTPFileSystem::IsCapable(int Capability) const
 
     case fcMoveToQueue:
     case fcResumeSupport:
-    case fsSkipTransfer:
-    case fsParallelTransfers:
+    case fcSkipTransfer:
+    case fcParallelTransfers:
       return !FTerminal->IsEncryptingFiles();
 
     case fcRename:

+ 2 - 2
source/core/Terminal.cpp

@@ -1946,7 +1946,7 @@ bool __fastcall TTerminal::GetIsCapable(TFSCapability Capability) const
   {
     switch (Capability)
     {
-      case fsBackgroundTransfers:
+      case fcBackgroundTransfers:
         return !IsEncryptingFiles();
 
       default:
@@ -6638,7 +6638,7 @@ bool __fastcall TTerminal::CanParallel(
 {
   return
     (ParallelOperation != NULL) &&
-    FFileSystem->IsCapable(fsParallelTransfers) &&
+    FFileSystem->IsCapable(fcParallelTransfers) &&
     // parallel transfer is not implemented for operations needed to be done on a folder
     // after all its files are processed
     FLAGCLEAR(Params, cpDelete) &&

+ 2 - 2
source/core/WebDAVFileSystem.cpp

@@ -553,8 +553,8 @@ bool __fastcall TWebDAVFileSystem::IsCapable(int Capability) const
     // Only to make double-click on file edit/open the file,
     // instead of trying to open it as directory
     case fcResolveSymlink:
-    case fsSkipTransfer:
-    case fsParallelTransfers:
+    case fcSkipTransfer:
+    case fcParallelTransfers:
     case fcRemoteCopy:
       return true;
 

+ 5 - 5
source/forms/CustomScpExplorer.cpp

@@ -1126,7 +1126,7 @@ bool __fastcall TCustomScpExplorerForm::CopyParamDialog(
       ToTemp;
     Options |=
       FLAGMASK(ToTemp, coTemp) |
-      FLAGMASK(!Terminal->IsCapable[fsBackgroundTransfers], coDisableQueue) |
+      FLAGMASK(!Terminal->IsCapable[fcBackgroundTransfers], coDisableQueue) |
       coDoNotShowAgain;
     TUsableCopyParamAttrs UsableCopyParamAttrs = Terminal->UsableCopyParamAttrs(Params);
     int CopyParamAttrs = (Direction == tdToRemote ?
@@ -1172,7 +1172,7 @@ bool __fastcall TCustomScpExplorerForm::CopyParamDialog(
     }
   }
 
-  if (Result && CopyParam.Queue && !ToTemp && Terminal->IsCapable[fsBackgroundTransfers])
+  if (Result && CopyParam.Queue && !ToTemp && Terminal->IsCapable[fcBackgroundTransfers])
   {
 
     Configuration->Usage->Inc(L"TransfersOnBackground");
@@ -1409,7 +1409,7 @@ UnicodeString __fastcall TCustomScpExplorerForm::GetToolbarsButtonsStr()
 void __fastcall TCustomScpExplorerForm::CreateProgressForm(TSynchronizeProgress * SynchronizeProgress)
 {
   DebugAssert(FProgressForm == NULL);
-  bool AllowSkip = (Terminal != NULL) ? Terminal->IsCapable[fsSkipTransfer] : false;
+  bool AllowSkip = (Terminal != NULL) ? Terminal->IsCapable[fcSkipTransfer] : false;
   FProgressForm = new TProgressForm(Application, (FTransferResumeList != NULL), AllowSkip, SynchronizeProgress);
 
   FProgressForm->DeleteLocalToRecycleBin =
@@ -3146,7 +3146,7 @@ void __fastcall TCustomScpExplorerForm::CustomExecuteFile(TOperationSide Side,
         TNotifyEvent OnSaveAll = NULL;
         TAnyModifiedEvent OnAnyModified = NULL;
         // Edited files are uploaded in background queue, what we do not support with encrypted files
-        if (Terminal->IsCapable[fsBackgroundTransfers])
+        if (Terminal->IsCapable[fcBackgroundTransfers])
         {
           OnFileChanged = FEditorManager->FileChanged;
           OnSaveAll = SaveAllInternalEditors;
@@ -8602,7 +8602,7 @@ void __fastcall TCustomScpExplorerForm::UpdateControls()
     RemoteDriveView->Color = RemoteDirView->Color;
     RemoteDriveView->Font->Color = RemoteDirView->Font->Color;
 
-    QueueView3->Enabled = HasTerminal && Terminal->IsCapable[fsBackgroundTransfers];
+    QueueView3->Enabled = HasTerminal && Terminal->IsCapable[fcBackgroundTransfers];
     QueueView3->Color = QueueView3->Enabled ? GetWindowColor() : DisabledPanelColor();
     QueueView3->Font->Color =  GetWindowTextColor(QueueView3->Color);
     QueueLabelUpdateStatus();

+ 4 - 4
source/forms/NonVisual.cpp

@@ -196,7 +196,7 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
     ScpExplorer->Terminal->IsCapable[fcLocking])
   // local selected operation
   UPD(LocalCopyAction, HasTerminal && EnabledLocalSelectedOperation)
-  UPD(LocalCopyQueueAction, HasTerminal && EnabledLocalSelectedOperation && ScpExplorer->Terminal->IsCapable[fsBackgroundTransfers])
+  UPD(LocalCopyQueueAction, HasTerminal && EnabledLocalSelectedOperation && ScpExplorer->Terminal->IsCapable[fcBackgroundTransfers])
   UPD(LocalCopyNonQueueAction, HasTerminal && EnabledLocalSelectedOperation)
   UPD(LocalRenameAction, EnabledLocalSelectedOperation)
   UPD(LocalEditAction, EnabledLocalSelectedFileOperation && !WinConfiguration->DisableOpenEdit)
@@ -208,12 +208,12 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
   UPD(LocalNewFileAction, !WinConfiguration->DisableOpenEdit)
   // local focused operation
   UPD(LocalCopyFocusedAction, HasTerminal && EnabledLocalFocusedOperation)
-  UPD(LocalCopyFocusedQueueAction, HasTerminal && EnabledLocalFocusedOperation && ScpExplorer->Terminal->IsCapable[fsBackgroundTransfers])
+  UPD(LocalCopyFocusedQueueAction, HasTerminal && EnabledLocalFocusedOperation && ScpExplorer->Terminal->IsCapable[fcBackgroundTransfers])
   UPD(LocalCopyFocusedNonQueueAction, HasTerminal && EnabledLocalFocusedOperation)
   UPD(LocalMoveFocusedAction, HasTerminal && EnabledLocalFocusedOperation)
   // remote selected operation
   UPD(RemoteCopyAction, EnabledRemoteSelectedOperation)
-  UPD(RemoteCopyQueueAction, EnabledRemoteSelectedOperation && ScpExplorer->Terminal->IsCapable[fsBackgroundTransfers])
+  UPD(RemoteCopyQueueAction, EnabledRemoteSelectedOperation && ScpExplorer->Terminal->IsCapable[fcBackgroundTransfers])
   UPD(RemoteCopyNonQueueAction, EnabledRemoteSelectedOperation)
   UPD(RemoteRenameAction, EnabledRemoteSelectedOperation &&
     ScpExplorer->Terminal->IsCapable[fcRename])
@@ -226,7 +226,7 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
   UPD(RemoteAddEditLinkAction2, ScpExplorer->CanAddEditLink(osRemote))
   // remote focused operation
   UPD(RemoteCopyFocusedAction, EnabledRemoteFocusedOperation)
-  UPD(RemoteCopyFocusedQueueAction, EnabledRemoteFocusedOperation && ScpExplorer->Terminal->IsCapable[fsBackgroundTransfers])
+  UPD(RemoteCopyFocusedQueueAction, EnabledRemoteFocusedOperation && ScpExplorer->Terminal->IsCapable[fcBackgroundTransfers])
   UPD(RemoteCopyFocusedNonQueueAction, EnabledRemoteFocusedOperation)
   UPD(RemoteMoveFocusedAction, EnabledRemoteFocusedOperation)
   UPD(RemoteMoveToFocusedAction, EnabledFocusedOperation &&