Преглед изворни кода

Local-local counters

Source commit: b3f979f18de56fc0c19cc43ae1eb259923471311
Martin Prikryl пре 5 година
родитељ
комит
9684e026c5
2 измењених фајлова са 28 додато и 1 уклоњено
  1. 4 0
      source/forms/CustomScpExplorer.cpp
  2. 24 1
      source/forms/ScpCommander.cpp

+ 4 - 0
source/forms/CustomScpExplorer.cpp

@@ -4002,6 +4002,10 @@ void __fastcall TCustomScpExplorerForm::DeleteFiles(TOperationSide Side,
     }
     else
     {
+      if (IsLocalBrowserMode())
+      {
+        Configuration->Usage->Inc(L"LocalLocalDeletes");
+      }
       TValueRestorer<TOperationSide> ProgressSideRestorer(FProgressSide);
       FProgressSide = FCurrentSide;
       try

+ 24 - 1
source/forms/ScpCommander.cpp

@@ -1697,7 +1697,7 @@ void __fastcall TScpCommanderForm::DDFakeFileInitDrag(TFileList * FileList,
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::LocalFileControlDDFileOperation(
-  TObject * /*Sender*/, int dwEffect, UnicodeString SourcePath,
+  TObject * Sender, int dwEffect, UnicodeString SourcePath,
   UnicodeString TargetPath, bool Paste, bool & DoOperation)
 {
   if (IsFileControl(DropSourceControl, osRemote) && !IsLocalBrowserMode())
@@ -1733,6 +1733,20 @@ void __fastcall TScpCommanderForm::LocalFileControlDDFileOperation(
       DoOperation = false;
     }
   }
+
+  if (IsLocalBrowserMode() &&
+      ((IsFileControl(Sender, osRemote) && IsFileControl(DropSourceControl, osLocal)) ||
+       (IsFileControl(Sender, osLocal) && IsFileControl(DropSourceControl, osRemote))))
+  {
+    if (dwEffect == DROPEFFECT_MOVE)
+    {
+      Configuration->Usage->Inc(L"LocalLocalMovesDragDropInterpanel");
+    }
+    else
+    {
+      Configuration->Usage->Inc(L"LocalLocalCopiesDragDropInterpanel");
+    }
+  }
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::RemoteFileControlDDFileOperationExecuted(
@@ -2678,6 +2692,15 @@ void TScpCommanderForm::LocalLocalCopy(
       FileOperator->Flags = FileOperator->Flags << foNoConfirmation;
     }
 
+    if (Move)
+    {
+      Configuration->Usage->Inc(L"LocalLocalMovesCommand");
+    }
+    else
+    {
+      Configuration->Usage->Inc(L"LocalLocalCopiesCommand");
+    }
+
     for (int Index = 0; Index < FileOperator->OperandFrom->Count; Index++)
     {
       UnicodeString SourcePath = FileOperator->OperandFrom->Strings[Index];