Browse Source

Unused code

Source commit: 1b3521d7aaf2008d3d584cdc10adadacb60df970
Martin Prikryl 7 years ago
parent
commit
785d12b806

+ 5 - 16
source/forms/Progress.cpp

@@ -79,17 +79,6 @@ __fastcall TProgressForm::TProgressForm(TComponent * AOwner, bool AllowMoveToQue
   FPendingSkip = false;
   UseSystemSettings(this);
 
-  if (CustomWinConfiguration->OperationProgressOnTop)
-  {
-    FOperationProgress = TopProgress;
-    FFileProgress = BottomProgress;
-  }
-  else
-  {
-    FOperationProgress = BottomProgress;
-    FFileProgress = TopProgress;
-  }
-
   FOnceDoneItems.Add(odoIdle, IdleOnceDoneItem);
   FOnceDoneItems.Add(odoDisconnect, DisconnectOnceDoneItem);
   FOnceDoneItems.Add(odoSuspend, SuspendOnceDoneItem);
@@ -210,7 +199,7 @@ void __fastcall TProgressForm::UpdateControls()
 
     CancelItem->Caption = CancelCaption;
 
-    TopProgress->Style = IsIndeterminateOperation(FData.Operation) ? pbstMarquee : pbstNormal;
+    OperationProgress->Style = IsIndeterminateOperation(FData.Operation) ? pbstMarquee : pbstNormal;
 
     FFrameAnimation.Init(AnimationPaintBox, Animation);
     FFrameAnimation.Start();
@@ -272,8 +261,8 @@ void __fastcall TProgressForm::UpdateControls()
     FPendingSkip = false;
   }
   int OverallProgress = FData.OverallProgress();
-  FOperationProgress->Position = OverallProgress;
-  FOperationProgress->Hint = IsIndeterminateOperation(FData.Operation) ? UnicodeString() : FORMAT(L"%d%%", (OverallProgress));
+  OperationProgress->Position = OverallProgress;
+  OperationProgress->Hint = IsIndeterminateOperation(FData.Operation) ? UnicodeString() : FORMAT(L"%d%%", (OverallProgress));
   Caption = FormatFormCaption(this, ProgressStr(&FData));
 
   if (TransferOperation)
@@ -296,8 +285,8 @@ void __fastcall TProgressForm::UpdateControls()
     TimeElapsedLabel->Caption = FormatDateTimeSpan(Configuration->TimeFormat, FData.TimeElapsed());
     BytesTransferredLabel->Caption = FormatBytes(FData.TotalTransferred);
     CPSLabel->Caption = FORMAT(L"%s/s", (FormatBytes(FData.CPS())));
-    FFileProgress->Position = FData.TransferProgress();
-    FFileProgress->Hint = FORMAT(L"%d%%", (FFileProgress->Position));
+    FileProgress->Position = FData.TransferProgress();
+    FileProgress->Hint = FORMAT(L"%d%%", (FileProgress->Position));
   }
 }
 //---------------------------------------------------------------------

+ 2 - 2
source/forms/Progress.dfm

@@ -74,7 +74,7 @@ object ProgressForm: TProgressForm
       Anchors = [akLeft, akTop, akRight]
       AutoSize = False
     end
-    object TopProgress: TProgressBar
+    object OperationProgress: TProgressBar
       Left = 0
       Top = 42
       Width = 302
@@ -181,7 +181,7 @@ object ProgressForm: TProgressForm
       Anchors = [akTop, akRight]
       Caption = 'Speed:'
     end
-    object BottomProgress: TProgressBar
+    object FileProgress: TProgressBar
       Left = 0
       Top = 37
       Width = 302

+ 2 - 4
source/forms/Progress.h

@@ -33,7 +33,7 @@ __published:
   TPathLabel *FileLabel;
   TLabel *TargetLabel;
   TPathLabel *TargetPathLabel;
-  TProgressBar *TopProgress;
+  TProgressBar *OperationProgress;
   TPanel *TransferPanel;
   TLabel *Label3;
   TLabel *TimeElapsedLabel;
@@ -43,7 +43,7 @@ __published:
   TLabel *BytesTransferredLabel;
   TLabel *Label12;
   TLabel *CPSLabel;
-  TProgressBar *BottomProgress;
+  TProgressBar *FileProgress;
   TTimer *UpdateTimer;
   TLabel *TimeLeftLabelLabel;
   TLabel *TimeLeftLabel;
@@ -101,8 +101,6 @@ private:
   bool FDeleteToRecycleBin;
   bool FReadOnly;
   unsigned long FCPSLimit;
-  TProgressBar * FOperationProgress;
-  TProgressBar * FFileProgress;
   TDateTime FStarted;
   int FSinceLastUpdate;
   bool FModalBeginHooked;

+ 0 - 1
source/windows/CustomWinConfiguration.cpp

@@ -118,7 +118,6 @@ void __fastcall TCustomWinConfiguration::Default()
   FLoginDialog.WindowSize = FormatDefaultWindowSize(640, 430);
   FLoginDialog.SiteSearch = ssSiteName;
   FConfirmExitOnCompletion = true;
-  FOperationProgressOnTop = true;
   FSessionColors = L"";
   FCopyShortCutHintShown = false;
   FHttpForWebDAV = false;

+ 0 - 2
source/windows/CustomWinConfiguration.h

@@ -56,7 +56,6 @@ private:
   TInterface FDefaultInterface;
   bool FCanApplyInterfaceImmediately;
   bool FConfirmExitOnCompletion;
-  bool FOperationProgressOnTop;
   UnicodeString FSessionColors;
   bool FCopyShortCutHintShown;
   bool FHttpForWebDAV;
@@ -102,7 +101,6 @@ public:
   __property TConsoleWinConfiguration ConsoleWin = { read = FConsoleWin, write = SetConsoleWin };
   __property TLoginDialogConfiguration LoginDialog = { read = FLoginDialog, write = SetLoginDialog };
   __property bool ConfirmExitOnCompletion  = { read=FConfirmExitOnCompletion, write=SetConfirmExitOnCompletion };
-  __property bool OperationProgressOnTop  = { read=FOperationProgressOnTop, write=FOperationProgressOnTop };
   __property UnicodeString SessionColors  = { read=FSessionColors, write=FSessionColors };
   __property bool CopyShortCutHintShown  = { read=FCopyShortCutHintShown, write=FCopyShortCutHintShown };
   __property bool UseMasterPassword = { read = GetUseMasterPassword };