mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Adding more startup sequence counter steps (Y, Q, V, Z, a) around F
(previous steps added in aee26917)
Source commit: b93e0f99f5dfce22f9bb9e1451ba11040ad05355
This commit is contained in:
@@ -118,3 +118,15 @@ bool __fastcall TDirView::TryGetLastPath(UnicodeString Drive, UnicodeString & Pa
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDirView::CreateWnd()
|
||||
{
|
||||
#ifndef DESIGN_ONLY
|
||||
UnicodeString StartupSequenceTag = Name.SubString(1, 1);
|
||||
AddStartupSequence(L"Z" + StartupSequenceTag);
|
||||
#endif
|
||||
TDirViewInt::CreateWnd();
|
||||
#ifndef DESIGN_ONLY
|
||||
AddStartupSequence(L"a" + StartupSequenceTag);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ protected:
|
||||
virtual void __fastcall IconUpdateDequeue(int Index);
|
||||
virtual void __fastcall PathChanged();
|
||||
virtual bool __fastcall TryGetLastPath(UnicodeString Drive, UnicodeString & Path);
|
||||
virtual void __fastcall CreateWnd();
|
||||
|
||||
private:
|
||||
std::set<int> FIconUpdateSet;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <Common.h>
|
||||
#include "DriveView.h"
|
||||
#include "IEDriveInfo.h"
|
||||
#include "DirView.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -56,3 +57,15 @@ bool __fastcall TDriveView::GetNextDriveStatus(int & Iterator, UnicodeString * D
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TDriveView::CreateWnd()
|
||||
{
|
||||
#ifndef DESIGN_ONLY
|
||||
UnicodeString StartupSequenceTag = Name.SubString(1, 1);
|
||||
AddStartupSequence(L"Q" + StartupSequenceTag);
|
||||
#endif
|
||||
TDriveViewInt::CreateWnd();
|
||||
#ifndef DESIGN_ONLY
|
||||
AddStartupSequence(L"V" + StartupSequenceTag);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ protected:
|
||||
std::unique_ptr<TStringList> FDriveStatus;
|
||||
|
||||
virtual bool __fastcall GetNextDriveStatus(int & Iterator, UnicodeString * Drive, TDriveStatus *& Status);
|
||||
virtual void __fastcall CreateWnd();
|
||||
|
||||
private:
|
||||
TDriveStatus * GetDriveStatus(int Index);
|
||||
|
||||
@@ -4533,4 +4533,19 @@ TStrings * ProcessFeatures(TStrings * Features, const UnicodeString & AFeaturesO
|
||||
}
|
||||
return Result.release();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
static TDateTime LastStartupStartupSequence(Now());
|
||||
UnicodeString StartupSequence;
|
||||
//---------------------------------------------------------------------------
|
||||
int TensOfSecondBetween(TDateTime ANow, TDateTime AThen)
|
||||
{
|
||||
return static_cast<int>(MilliSecondsBetween(ANow, AThen) / 100);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void AddStartupSequence(const UnicodeString & Tag)
|
||||
{
|
||||
int SequenceTensOfSecond = TensOfSecondBetween(Now(), LastStartupStartupSequence);
|
||||
LastStartupStartupSequence = Now();
|
||||
AddToList(StartupSequence, FORMAT(L"%s:%d", (Tag, SequenceTensOfSecond)), L",");
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@@ -225,6 +225,9 @@ NORETURN void NotSupported();
|
||||
NORETURN void NotImplemented();
|
||||
UnicodeString GetDividerLine();
|
||||
TStrings * ProcessFeatures(TStrings * Features, const UnicodeString & FeaturesOverride);
|
||||
int TensOfSecondBetween(TDateTime ANow, TDateTime AThen);
|
||||
extern UnicodeString StartupSequence;
|
||||
void AddStartupSequence(const UnicodeString & Tag);
|
||||
//---------------------------------------------------------------------------
|
||||
struct TSearchRecSmart : public TSearchRec
|
||||
{
|
||||
|
||||
@@ -10732,6 +10732,7 @@ void __fastcall TCustomScpExplorerForm::CreateWnd()
|
||||
FQueueDragDropFilesEx->OnDragEnter = QueueDDDragEnter;
|
||||
FQueueDragDropFilesEx->OnDragLeave = QueueDDDragLeave;
|
||||
}
|
||||
AddStartupSequence(L"Y");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TCustomScpExplorerForm::DestroyWnd()
|
||||
|
||||
@@ -560,7 +560,6 @@ UnicodeString DumpCallstackFileName(int ProcessId);
|
||||
void CheckConfigurationForceSave();
|
||||
void InterfaceStarted();
|
||||
void InterfaceStartDontMeasure();
|
||||
void AddStartupSequence(const UnicodeString & Tag);
|
||||
//---------------------------------------------------------------------------
|
||||
#define HIDDEN_WINDOW_NAME L"WinSCPHiddenWindow3"
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -474,8 +474,6 @@ void __fastcall TStartupThread::Execute()
|
||||
//---------------------------------------------------------------------------
|
||||
static TStartupThread * StartupThread(new TStartupThread());
|
||||
static TDateTime Started(Now());
|
||||
static TDateTime LastStartupStartupSequence(Now());
|
||||
static UnicodeString StartupSequence;
|
||||
static int LifetimeRuns = -1;
|
||||
//---------------------------------------------------------------------------
|
||||
void InterfaceStartDontMeasure()
|
||||
@@ -484,18 +482,6 @@ void InterfaceStartDontMeasure()
|
||||
StartupThread->Terminate();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TensOfSecondBetween(TDateTime ANow, TDateTime AThen)
|
||||
{
|
||||
return static_cast<int>(MilliSecondsBetween(ANow, AThen) / 100);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void AddStartupSequence(const UnicodeString & Tag)
|
||||
{
|
||||
int SequenceTensOfSecond = TensOfSecondBetween(Now(), LastStartupStartupSequence);
|
||||
LastStartupStartupSequence = Now();
|
||||
AddToList(StartupSequence, FORMAT(L"%s:%d", (Tag, SequenceTensOfSecond)), L",");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void InterfaceStarted()
|
||||
{
|
||||
if (Started != TDateTime())
|
||||
|
||||
Reference in New Issue
Block a user