Browse Source

Adding three more startup sequence counter steps between H and O and W and U

Source commit: f507c60fa2a9c468fb24f77968e0830474948418
Martin Prikryl 1 year ago
parent
commit
aee2691762
2 changed files with 8 additions and 4 deletions
  1. 6 3
      source/forms/ScpCommander.cpp
  2. 2 1
      source/forms/ScpCommander.h

+ 6 - 3
source/forms/ScpCommander.cpp

@@ -388,7 +388,7 @@ void __fastcall TScpCommanderForm::DoShow()
   // is finally connected
   UpdateControls();
 
-  DoLocalDefaultDirectory(OtherLocalDirView, WinConfiguration->ScpCommander.OtherLocalPanelLastPath);
+  DoLocalDefaultDirectory(OtherLocalDirView, WinConfiguration->ScpCommander.OtherLocalPanelLastPath, L"P");
 
   // If we do not call SetFocus on any control before DoShow,
   // no control will get focused on Login dialog
@@ -607,6 +607,7 @@ void __fastcall TScpCommanderForm::StartingWithoutSession()
 
   AddStartupSequence(L"H");
   LocalDefaultDirectory();
+  AddStartupSequence(L"K");
 }
 //---------------------------------------------------------------------------
 void TScpCommanderForm::RestoreSessionLocalDirView(
@@ -707,7 +708,8 @@ void __fastcall TScpCommanderForm::SessionChanged(bool Replaced)
   }
 }
 //---------------------------------------------------------------------------
-void __fastcall TScpCommanderForm::DoLocalDefaultDirectory(TDirView * DirView, const UnicodeString & LastPath)
+void TScpCommanderForm::DoLocalDefaultDirectory(
+  TDirView * DirView, const UnicodeString & LastPath, const UnicodeString & StartupSequenceTag)
 {
   bool DocumentsDir = true;
   if (!LastPath.IsEmpty())
@@ -724,6 +726,7 @@ void __fastcall TScpCommanderForm::DoLocalDefaultDirectory(TDirView * DirView, c
 
   if (DocumentsDir)
   {
+    AddStartupSequence(StartupSequenceTag);
     try
     {
       DirView->HomeDirectory = L"";
@@ -747,7 +750,7 @@ void __fastcall TScpCommanderForm::DoLocalDefaultDirectory(TDirView * DirView, c
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::LocalDefaultDirectory()
 {
-  DoLocalDefaultDirectory(LocalDirView, WinConfiguration->ScpCommander.LocalPanel.LastPath);
+  DoLocalDefaultDirectory(LocalDirView, WinConfiguration->ScpCommander.LocalPanel.LastPath, L"L");
 }
 //---------------------------------------------------------------------------
 void __fastcall TScpCommanderForm::ConfigurationChanged()

+ 2 - 1
source/forms/ScpCommander.h

@@ -562,7 +562,8 @@ private:
   void __fastcall UpdateToolbar2ItemCaption(TTBCustomItem * Item);
   void __fastcall SetShortcuts();
   void __fastcall UpdatePanelsPathLabelsStatus();
-  void __fastcall DoLocalDefaultDirectory(TDirView * DirView, const UnicodeString & LastPath);
+  void DoLocalDefaultDirectory(
+    TDirView * DirView, const UnicodeString & LastPath, const UnicodeString & StartupSequenceTag);
   void __fastcall LocalDefaultDirectory();
   TOperationSide __fastcall GetOtherSize(TOperationSide Side);
   void __fastcall DoLocalDirViewContextPopup(TOperationSide Side, TPoint & MousePos, bool & Handled);