mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Opening new local-local tab
Source commit: e07f42b5def5b0781880caadaecb14d8b077b24a
This commit is contained in:
@@ -4856,6 +4856,11 @@ void __fastcall TCustomScpExplorerForm::NewSession(const UnicodeString & Session
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void TCustomScpExplorerForm::NewTab(TOperationSide)
|
||||
{
|
||||
NewSession();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
UnicodeString __fastcall TCustomScpExplorerForm::SaveHiddenDuplicateSession(TSessionData * SessionData)
|
||||
{
|
||||
UnicodeString SessionName = StoredSessions->HiddenPrefix + ManagedSession->SessionData->SessionName;
|
||||
@@ -6846,12 +6851,11 @@ void __fastcall TCustomScpExplorerForm::SessionListChanged()
|
||||
}
|
||||
else
|
||||
{
|
||||
TabSheet->ImageIndex = FNewSessionTabImageIndex;
|
||||
TabSheet->Tag = 0; // not really needed
|
||||
TabSheet->Shadowed = false;
|
||||
TabSheet->ShowCloseButton = false;
|
||||
// We know that we are at the last page, otherwise we could not call this (it assumes that new session tab is the last one)
|
||||
UpdateNewSessionTab();
|
||||
UpdateNewTabTab();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6863,16 +6867,16 @@ void __fastcall TCustomScpExplorerForm::SessionListChanged()
|
||||
SessionsPageControl->ActivePageIndex = ActiveSessionIndex;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TCustomScpExplorerForm::UpdateNewSessionTab()
|
||||
void __fastcall TCustomScpExplorerForm::UpdateNewTabTab()
|
||||
{
|
||||
TTabSheet * TabSheet = SessionsPageControl->Pages[SessionsPageControl->PageCount - 1];
|
||||
|
||||
DebugAssert(TabSheet->ImageIndex == 0);
|
||||
|
||||
TabSheet->Caption =
|
||||
WinConfiguration->SelectiveToolbarText ?
|
||||
StripHotkey(StripTrailingPunctuation(NonVisualDataModule->NewSessionAction->Caption)) :
|
||||
UnicodeString();
|
||||
TabSheet->ImageIndex = GetNewTabTabImageIndex(osCurrent);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
TManagedTerminal * __fastcall TCustomScpExplorerForm::GetSessionTabSession(TTabSheet * TabSheet)
|
||||
@@ -6940,14 +6944,14 @@ bool __fastcall TCustomScpExplorerForm::SessionTabSwitched()
|
||||
{
|
||||
try
|
||||
{
|
||||
NewSession();
|
||||
NewTab();
|
||||
}
|
||||
__finally
|
||||
{
|
||||
SessionListChanged();
|
||||
}
|
||||
|
||||
FSessionsPageControlNewSessionTime = Now();
|
||||
FSessionsPageControlNewTabTime = Now();
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
@@ -10027,7 +10031,7 @@ void __fastcall TCustomScpExplorerForm::SessionsPageControlMouseDown(
|
||||
// when user clicks the "+", we get mouse down only after the session
|
||||
// is closed, when new session tab is already on X:Y, so dragging
|
||||
// starts, prevent that
|
||||
if (MilliSecondsBetween(Now(), FSessionsPageControlNewSessionTime) > 500)
|
||||
if (MilliSecondsBetween(Now(), FSessionsPageControlNewTabTime) > 500)
|
||||
{
|
||||
TTerminal * Terminal = GetSessionTabSession(SessionsPageControl->Pages[Index]);
|
||||
if (Terminal != NULL)
|
||||
@@ -10207,12 +10211,35 @@ int __fastcall TCustomScpExplorerForm::AddFixedSessionImage(int GlyphsSourceInde
|
||||
void __fastcall TCustomScpExplorerForm::AddFixedSessionImages()
|
||||
{
|
||||
FSessionColors->SetSize(GlyphsModule->ExplorerImages->Width, GlyphsModule->ExplorerImages->Height);
|
||||
FNewSessionTabImageIndex = AddFixedSessionImage(NonVisualDataModule->NewSessionAction->ImageIndex);
|
||||
FNewRemoteTabTabImageIndex = AddFixedSessionImage(NonVisualDataModule->NewRemoteTabAction->ImageIndex);
|
||||
FNewLocalTabTabImageIndex = AddFixedSessionImage(NonVisualDataModule->NewLocalTabAction->ImageIndex);
|
||||
FSessionTabImageIndex = AddFixedSessionImage(SiteImageIndex);
|
||||
FSessionColorMaskImageIndex = AddFixedSessionImage(SiteColorMaskImageIndex);
|
||||
FLocalBrowserTabImageIndex = AddFixedSessionImage(LocalBrowserImageIndex);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TCustomScpExplorerForm::GetNewTabActionImageIndex()
|
||||
{
|
||||
return NonVisualDataModule->NewRemoteTabAction->ImageIndex;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TCustomScpExplorerForm::GetNewTabTabImageIndex(TOperationSide Side)
|
||||
{
|
||||
switch (Side)
|
||||
{
|
||||
case osLocal:
|
||||
return FNewLocalTabTabImageIndex;
|
||||
|
||||
case osRemote:
|
||||
case osCurrent:
|
||||
return FNewRemoteTabTabImageIndex;
|
||||
|
||||
default:
|
||||
DebugFail();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TCustomScpExplorerForm::CollectItemsWithTextDisplayMode(TWinControl * Control)
|
||||
{
|
||||
for (int Index = 0; Index < Control->ControlCount; Index++)
|
||||
@@ -10287,10 +10314,7 @@ bool __fastcall TCustomScpExplorerForm::UpdateToolbarDisplayMode()
|
||||
++i;
|
||||
}
|
||||
|
||||
if (Result)
|
||||
{
|
||||
UpdateNewSessionTab();
|
||||
}
|
||||
UpdateNewTabTab();
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,8 @@ private:
|
||||
int FTransferListHoverIndex;
|
||||
TColor FSessionColor;
|
||||
TPngImageList * FSessionColors;
|
||||
int FNewSessionTabImageIndex;
|
||||
int FNewRemoteTabTabImageIndex;
|
||||
int FNewLocalTabTabImageIndex;
|
||||
int FSessionTabImageIndex;
|
||||
int FSessionColorMaskImageIndex;
|
||||
int FLocalBrowserTabImageIndex;
|
||||
@@ -279,7 +280,7 @@ private:
|
||||
ITaskbarList3 * FTaskbarList;
|
||||
bool FShowing;
|
||||
int FMaxQueueLength;
|
||||
TDateTime FSessionsPageControlNewSessionTime;
|
||||
TDateTime FSessionsPageControlNewTabTime;
|
||||
bool FAppIdle;
|
||||
typedef std::set<TTBCustomItem *> TItemsWithTextDisplayMode;
|
||||
TItemsWithTextDisplayMode FItemsWithTextDisplayMode;
|
||||
@@ -626,7 +627,7 @@ protected:
|
||||
void __fastcall UpdateCopyParamCounters(const TCopyParamType & CopyParam);
|
||||
int __fastcall AddSessionColor(TColor Color);
|
||||
void __fastcall UpdateSessionTab(TTabSheet * TabSheet);
|
||||
void __fastcall UpdateNewSessionTab();
|
||||
void __fastcall UpdateNewTabTab();
|
||||
void __fastcall AddFixedSessionImages();
|
||||
int __fastcall AddFixedSessionImage(int GlyphsSourceIndex);
|
||||
TObjectList * __fastcall DoCollectWorkspace();
|
||||
@@ -759,6 +760,7 @@ public:
|
||||
bool CanCloseSession(TManagedTerminal * Session);
|
||||
|
||||
void __fastcall NewSession(const UnicodeString & SessionUrl = L"");
|
||||
virtual void NewTab(TOperationSide Side = osCurrent);
|
||||
void __fastcall DuplicateSession();
|
||||
void __fastcall RenameSession();
|
||||
void __fastcall CloseSession();
|
||||
@@ -864,6 +866,8 @@ public:
|
||||
void __fastcall CloseApp();
|
||||
virtual bool IsSideLocalBrowser(TOperationSide Side);
|
||||
virtual UnicodeString GetLocalBrowserSessionTitle(TManagedTerminal * Session);
|
||||
virtual int GetNewTabActionImageIndex();
|
||||
virtual int GetNewTabTabImageIndex(TOperationSide Side);
|
||||
|
||||
__property bool ComponentVisible[Byte Component] = { read = GetComponentVisible, write = SetComponentVisible };
|
||||
__property bool EnableFocusedOperation[TOperationSide Side] = { read = GetEnableFocusedOperation, index = 0 };
|
||||
|
||||
@@ -414,6 +414,10 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
|
||||
|
||||
// SESSION
|
||||
UPD(NewSessionAction, true)
|
||||
UPDACT(NewTabAction, Action->ImageIndex = ScpExplorer->GetNewTabActionImageIndex())
|
||||
UPD(NewRemoteTabAction, true)
|
||||
UPD(NewLocalTabAction, true)
|
||||
UPDACT(DefaultToNewRemoteTabAction, Action->Checked = WinConfiguration->DefaultToNewRemoteTab)
|
||||
UPD(SiteManagerAction, true)
|
||||
UPD(DuplicateTabAction, HasManagedSession)
|
||||
UPD(RenameTabAction, HasManagedSession)
|
||||
@@ -751,6 +755,10 @@ void __fastcall TNonVisualDataModule::ExplorerActionsExecute(
|
||||
|
||||
// SESSION
|
||||
EXE(NewSessionAction, ScpExplorer->NewSession())
|
||||
EXE(NewTabAction, ScpExplorer->NewTab())
|
||||
EXE(NewRemoteTabAction, ScpExplorer->NewTab(osRemote))
|
||||
EXE(NewLocalTabAction, ScpExplorer->NewTab(osLocal))
|
||||
EXE(DefaultToNewRemoteTabAction, WinConfiguration->DefaultToNewRemoteTab = !WinConfiguration->DefaultToNewRemoteTab)
|
||||
EXE(SiteManagerAction, ScpExplorer->NewSession())
|
||||
EXE(DuplicateTabAction, ScpExplorer->DuplicateSession())
|
||||
EXE(RenameTabAction, ScpExplorer->RenameSession())
|
||||
@@ -934,12 +942,10 @@ void __fastcall TNonVisualDataModule::CommanderShortcuts()
|
||||
NewFileAction->ShortCut = ShortCut(VK_F4, SHIFT);
|
||||
RemoteFindFilesAction2->ShortCut =
|
||||
ExplorerKeyboardShortcuts ? ShortCut(VK_F3, NONE) : ShortCut(VK_F7, ALT);
|
||||
NewTabAction->ShortCut = ShortCut(L'T', CTRL);
|
||||
// legacy shortcut (can be removed when necessary)
|
||||
NewFileAction->SecondaryShortCuts->Clear();
|
||||
NewFileAction->SecondaryShortCuts->Add(ShortCutToText(ShortCut(VK_F4, CTRLSHIFT)));
|
||||
// Backward compatibility, can be abandoned, once there's a better use for Ctrl+T
|
||||
ConsoleAction->SecondaryShortCuts->Clear();
|
||||
ConsoleAction->SecondaryShortCuts->Add(ShortCutToText(ShortCut(L'T', CTRL)));
|
||||
|
||||
CloseApplicationAction2->ShortCut = ShortCut(VK_F10, NONE);
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ object NonVisualDataModule: TNonVisualDataModule
|
||||
Caption = 'Go to Comma&nd Line'
|
||||
HelpKeyword = 'ui_commander#command_line'
|
||||
Hint = 'Go to command line'
|
||||
ShortCut = 24654
|
||||
ShortCut = 24653
|
||||
end
|
||||
object QueueItemDeleteAction: TAction
|
||||
Tag = 12
|
||||
@@ -431,7 +431,7 @@ object NonVisualDataModule: TNonVisualDataModule
|
||||
Caption = 'Comma&nd Line'
|
||||
HelpKeyword = 'ui_commander#command_line'
|
||||
Hint = 'Hide/show command line'
|
||||
ShortCut = 24654
|
||||
ShortCut = 24653
|
||||
end
|
||||
object RemoteParentDirAction: TAction
|
||||
Tag = 12
|
||||
@@ -2351,6 +2351,40 @@ object NonVisualDataModule: TNonVisualDataModule
|
||||
Hint = 'Move the selected file(s) to another directory or rename them'
|
||||
ImageIndex = 100
|
||||
end
|
||||
object NewTabAction: TAction
|
||||
Tag = 15
|
||||
Category = 'Tab'
|
||||
Caption = '&New Tab'
|
||||
HelpKeyword = 'ui_tabs#new'
|
||||
Hint = 'Open new tab'
|
||||
ImageIndex = 5
|
||||
end
|
||||
object NewLocalTabAction: TAction
|
||||
Tag = 11
|
||||
Category = 'Tab'
|
||||
Caption = '&Local Tab'
|
||||
HelpKeyword = 'ui_tabs#new'
|
||||
Hint = 'Open new tab with two local panels'
|
||||
ImageIndex = 5
|
||||
ShortCut = 24654
|
||||
end
|
||||
object NewRemoteTabAction: TAction
|
||||
Tag = 11
|
||||
Category = 'Tab'
|
||||
Caption = '&Remote Tab'
|
||||
HelpKeyword = 'ui_tabs#new'
|
||||
Hint = 'Open new tab with one local panel and one remote session panel'
|
||||
ImageIndex = 25
|
||||
ShortCut = 16462
|
||||
end
|
||||
object DefaultToNewRemoteTabAction: TAction
|
||||
Tag = 11
|
||||
Category = 'Tab'
|
||||
Caption = '&Default to Remote Tab'
|
||||
Hint =
|
||||
'When turned on, the New Tab command opens a new remote tab. Othe' +
|
||||
'rwise it opens a new local tab.'
|
||||
end
|
||||
end
|
||||
object ExplorerBarPopup: TTBXPopupMenu
|
||||
Images = GlyphsModule.ExplorerImages
|
||||
|
||||
@@ -671,6 +671,10 @@ __published: // IDE-managed Components
|
||||
TTBXItem *TBXItem110;
|
||||
TTBXItem *TBXItem102;
|
||||
TTBXItem *TBXItem103;
|
||||
TAction *NewTabAction;
|
||||
TAction *NewLocalTabAction;
|
||||
TAction *NewRemoteTabAction;
|
||||
TAction *DefaultToNewRemoteTabAction;
|
||||
void __fastcall ExplorerActionsUpdate(TBasicAction *Action, bool &Handled);
|
||||
void __fastcall ExplorerActionsExecute(TBasicAction *Action, bool &Handled);
|
||||
void __fastcall SessionIdleTimerTimer(TObject *Sender);
|
||||
|
||||
@@ -407,8 +407,7 @@ void __fastcall TScpCommanderForm::DoShow()
|
||||
// Also the NoSession test in TCustomScpExplorerForm::CMShowingChanged rely on this happening here.
|
||||
if (ManagedSession == NULL)
|
||||
{
|
||||
TTerminalManager * Manager = TTerminalManager::Instance();
|
||||
Manager->ActiveSession = Manager->NewLocalBrowser();
|
||||
TTerminalManager::Instance()->NewLocalSession();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -419,8 +418,7 @@ void __fastcall TScpCommanderForm::NeedSession(bool Startup)
|
||||
// in the LastTerminalClosed, new session should have already been created by GetReplacementForLastSession
|
||||
DebugAssert(Startup);
|
||||
|
||||
TTerminalManager * Manager = TTerminalManager::Instance();
|
||||
Manager->ActiveSession = Manager->NewLocalBrowser();
|
||||
TTerminalManager::Instance()->NewLocalSession();
|
||||
}
|
||||
|
||||
TCustomScpExplorerForm::NeedSession(Startup);
|
||||
@@ -431,6 +429,23 @@ TManagedTerminal * TScpCommanderForm::GetReplacementForLastSession()
|
||||
return TTerminalManager::Instance()->NewLocalBrowser();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void TScpCommanderForm::NewTab(TOperationSide Side)
|
||||
{
|
||||
if (Side == osCurrent)
|
||||
{
|
||||
Side = WinConfiguration->DefaultToNewRemoteTab ? osRemote : osLocal;
|
||||
}
|
||||
|
||||
if (Side == osRemote)
|
||||
{
|
||||
TCustomScpExplorerForm::NewTab();
|
||||
}
|
||||
else
|
||||
{
|
||||
TTerminalManager::Instance()->NewLocalSession(LocalDirView->PathName, OtherLocalDirView->PathName);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
Boolean __fastcall TScpCommanderForm::AllowedAction(TAction * Action, TActionAllowed Allowed)
|
||||
{
|
||||
#define FLAG ((TActionFlag)(Action->Tag))
|
||||
@@ -2817,3 +2832,18 @@ UnicodeString TScpCommanderForm::GetLocalBrowserSessionTitle(TManagedTerminal *
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TScpCommanderForm::GetNewTabActionImageIndex()
|
||||
{
|
||||
return WinConfiguration->DefaultToNewRemoteTab ?
|
||||
TCustomScpExplorerForm::GetNewTabActionImageIndex() : NonVisualDataModule->NewLocalTabAction->ImageIndex;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TScpCommanderForm::GetNewTabTabImageIndex(TOperationSide Side)
|
||||
{
|
||||
if (Side == osCurrent)
|
||||
{
|
||||
Side = WinConfiguration->DefaultToNewRemoteTab ? osRemote : osLocal;
|
||||
}
|
||||
return TCustomScpExplorerForm::GetNewTabTabImageIndex(Side);
|
||||
}
|
||||
|
||||
@@ -410,6 +410,21 @@ inherited ScpCommanderForm: TScpCommanderForm
|
||||
Caption = '&Tab'
|
||||
HelpKeyword = 'ui_sessiontabs'
|
||||
Hint = 'Tab commands'
|
||||
object TBXSubmenuItem30: TTBXSubmenuItem
|
||||
Action = NonVisualDataModule.NewTabAction
|
||||
DropdownCombo = True
|
||||
object TBXItem33: TTBXItem
|
||||
Action = NonVisualDataModule.NewRemoteTabAction
|
||||
end
|
||||
object TBXItem31: TTBXItem
|
||||
Action = NonVisualDataModule.NewLocalTabAction
|
||||
end
|
||||
object TBXSeparatorItem67: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem232: TTBXItem
|
||||
Action = NonVisualDataModule.DefaultToNewRemoteTabAction
|
||||
end
|
||||
end
|
||||
object TBXItem115: TTBXItem
|
||||
Action = NonVisualDataModule.CloseTabAction
|
||||
end
|
||||
@@ -851,9 +866,21 @@ inherited ScpCommanderForm: TScpCommanderForm
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
object TBXItem123: TTBXItem
|
||||
Action = NonVisualDataModule.NewSessionAction
|
||||
object TBXSubmenuItem31: TTBXSubmenuItem
|
||||
Action = NonVisualDataModule.NewTabAction
|
||||
DisplayMode = nbdmImageAndText
|
||||
DropdownCombo = True
|
||||
object TBXItem231: TTBXItem
|
||||
Action = NonVisualDataModule.NewRemoteTabAction
|
||||
end
|
||||
object TBXItem123: TTBXItem
|
||||
Action = NonVisualDataModule.NewLocalTabAction
|
||||
end
|
||||
object TBXSeparatorItem68: TTBXSeparatorItem
|
||||
end
|
||||
object TBXItem238: TTBXItem
|
||||
Action = NonVisualDataModule.DefaultToNewRemoteTabAction
|
||||
end
|
||||
end
|
||||
object TBXItem125: TTBXItem
|
||||
Action = NonVisualDataModule.SaveCurrentSessionAction2
|
||||
|
||||
@@ -51,7 +51,6 @@ __published:
|
||||
TDriveView *LocalDriveView;
|
||||
TSplitter *LocalPanelSplitter;
|
||||
TTBXToolbar *SessionToolbar2;
|
||||
TTBXItem *TBXItem123;
|
||||
TTBXSeparatorItem *TBXSeparatorItem34;
|
||||
TTBXItem *TBXItem124;
|
||||
TTBXSubmenuItem *TBXSubmenuItem23;
|
||||
@@ -443,6 +442,16 @@ __published:
|
||||
TTBXSubmenuItem *TBXSubmenuItem29;
|
||||
TTBXSeparatorItem *TBXSeparatorItem53;
|
||||
TTBXSeparatorItem *TBXSeparatorItem66;
|
||||
TTBXItem *TBXItem31;
|
||||
TTBXSubmenuItem *TBXSubmenuItem30;
|
||||
TTBXItem *TBXItem33;
|
||||
TTBXSubmenuItem *TBXSubmenuItem31;
|
||||
TTBXItem *TBXItem123;
|
||||
TTBXItem *TBXItem231;
|
||||
TTBXSeparatorItem *TBXSeparatorItem67;
|
||||
TTBXItem *TBXItem232;
|
||||
TTBXSeparatorItem *TBXSeparatorItem68;
|
||||
TTBXItem *TBXItem238;
|
||||
void __fastcall SplitterMoved(TObject *Sender);
|
||||
void __fastcall SplitterCanResize(TObject *Sender, int &NewSize,
|
||||
bool &Accept);
|
||||
@@ -657,6 +666,9 @@ public:
|
||||
::TFileOperation Operation, TOperationSide Side, bool OnFocused, bool NoConfirmation, bool DragDrop, unsigned int Flags);
|
||||
virtual UnicodeString GetLocalBrowserSessionTitle(TManagedTerminal * Session);
|
||||
virtual TManagedTerminal * GetReplacementForLastSession();
|
||||
virtual void NewTab(TOperationSide Side);
|
||||
virtual int GetNewTabActionImageIndex();
|
||||
virtual int GetNewTabTabImageIndex(TOperationSide Side);
|
||||
|
||||
__property double LeftPanelWidth = { read = GetLeftPanelWidth, write = SetLeftPanelWidth };
|
||||
};
|
||||
|
||||
@@ -205,12 +205,20 @@ TTerminal * __fastcall TTerminalManager::NewTerminal(TSessionData * Data)
|
||||
return Terminal;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
TManagedTerminal * __fastcall TTerminalManager::NewLocalBrowser()
|
||||
TManagedTerminal * __fastcall TTerminalManager::NewLocalBrowser(const UnicodeString & LocalDirectory, const UnicodeString & OtherLocalDirectory)
|
||||
{
|
||||
std::unique_ptr<TSessionData> SessionData(new TSessionData(UnicodeString()));
|
||||
TManagedTerminal * Terminal = NewManagedTerminal(SessionData.get());
|
||||
Terminal->LocalBrowser = true;
|
||||
return Terminal;
|
||||
SessionData->LocalDirectory = LocalDirectory;
|
||||
SessionData->OtherLocalDirectory = OtherLocalDirectory;
|
||||
TManagedTerminal * Result = NewManagedTerminal(SessionData.get());
|
||||
// Is true already, when LocalDirectory and OtherLocalDirectory are set
|
||||
Result->LocalBrowser = true;
|
||||
return Result;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void TTerminalManager::NewLocalSession(const UnicodeString & LocalDirectory, const UnicodeString & OtherLocalDirectory)
|
||||
{
|
||||
ActiveSession = NewLocalBrowser(LocalDirectory, OtherLocalDirectory);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
TManagedTerminal * __fastcall TTerminalManager::NewManagedTerminal(TSessionData * Data)
|
||||
|
||||
@@ -49,7 +49,8 @@ public:
|
||||
__fastcall ~TTerminalManager();
|
||||
|
||||
TManagedTerminal * __fastcall NewManagedTerminal(TSessionData * Data);
|
||||
TManagedTerminal * __fastcall NewLocalBrowser();
|
||||
TManagedTerminal * __fastcall NewLocalBrowser(
|
||||
const UnicodeString & LocalDirectory = UnicodeString(), const UnicodeString & OtherLocalDirectory = UnicodeString());
|
||||
TManagedTerminal * __fastcall NewSessions(TList * DataList);
|
||||
virtual void __fastcall FreeTerminal(TTerminal * Terminal);
|
||||
void __fastcall Move(TTerminal * Source, TTerminal * Target);
|
||||
@@ -65,6 +66,7 @@ public:
|
||||
void __fastcall OpenInPutty();
|
||||
void __fastcall NewSession(
|
||||
const UnicodeString & SessionUrl, bool ReloadSessions = true, TForm * LinkedForm = NULL, bool ReplaceExisting = false);
|
||||
void NewLocalSession(const UnicodeString & LocalDirectory = UnicodeString(), const UnicodeString & OtherLocalDirectory = UnicodeString());
|
||||
void __fastcall Idle(bool SkipCurrentTerminal);
|
||||
UnicodeString __fastcall GetSessionTitle(TManagedTerminal * Terminal, bool Unique);
|
||||
UnicodeString __fastcall GetActiveSessionAppTitle();
|
||||
|
||||
@@ -603,6 +603,7 @@ void __fastcall TWinConfiguration::Default()
|
||||
FExternalSessionInExistingInstance = true;
|
||||
FShowLoginWhenNoSession = true;
|
||||
FKeepOpenWhenNoSession = true;
|
||||
FDefaultToNewRemoteTab = true;
|
||||
FLocalIconsByExt = false;
|
||||
FBidiModeOverride = lfoLanguageIfRecommended;
|
||||
FFlipChildrenOverride = lfoLanguageIfRecommended;
|
||||
@@ -1012,6 +1013,7 @@ THierarchicalStorage * TWinConfiguration::CreateScpStorage(bool & SessionList)
|
||||
KEY(Bool, ExternalSessionInExistingInstance); \
|
||||
KEY(Bool, ShowLoginWhenNoSession); \
|
||||
KEY(Bool, KeepOpenWhenNoSession); \
|
||||
KEY(Bool, DefaultToNewRemoteTab); \
|
||||
KEY(Bool, LocalIconsByExt); \
|
||||
KEY(Integer, BidiModeOverride); \
|
||||
KEY(Integer, FlipChildrenOverride); \
|
||||
@@ -2285,6 +2287,11 @@ void __fastcall TWinConfiguration::SetKeepOpenWhenNoSession(bool value)
|
||||
SET_CONFIG_PROPERTY(KeepOpenWhenNoSession);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TWinConfiguration::SetDefaultToNewRemoteTab(bool value)
|
||||
{
|
||||
SET_CONFIG_PROPERTY(DefaultToNewRemoteTab);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TWinConfiguration::SetLocalIconsByExt(bool value)
|
||||
{
|
||||
SET_CONFIG_PROPERTY(LocalIconsByExt);
|
||||
@@ -2800,6 +2807,7 @@ void __fastcall TWinConfiguration::UpdateStaticUsage()
|
||||
Usage->Set(L"ShowingTips", ShowTips);
|
||||
Usage->Set(L"KeepingOpenWhenNoSession", KeepOpenWhenNoSession);
|
||||
Usage->Set(L"ShowingLoginWhenNoSession", ShowLoginWhenNoSession);
|
||||
Usage->Set(L"DefaultingToNewRemoteTab", DefaultToNewRemoteTab);
|
||||
TipsUpdateStaticUsage();
|
||||
|
||||
Usage->Set(L"CommanderNortonLikeMode", int(ScpCommander.NortonLikeMode));
|
||||
|
||||
@@ -453,6 +453,7 @@ private:
|
||||
bool FExternalSessionInExistingInstance;
|
||||
bool FShowLoginWhenNoSession;
|
||||
bool FKeepOpenWhenNoSession;
|
||||
bool FDefaultToNewRemoteTab;
|
||||
bool FLocalIconsByExt;
|
||||
TLocaleFlagOverride FBidiModeOverride;
|
||||
TLocaleFlagOverride FFlipChildrenOverride;
|
||||
@@ -557,6 +558,7 @@ private:
|
||||
void __fastcall SetExternalSessionInExistingInstance(bool value);
|
||||
void __fastcall SetShowLoginWhenNoSession(bool value);
|
||||
void __fastcall SetKeepOpenWhenNoSession(bool value);
|
||||
void __fastcall SetDefaultToNewRemoteTab(bool value);
|
||||
void __fastcall SetLocalIconsByExt(bool value);
|
||||
void __fastcall SetBidiModeOverride(TLocaleFlagOverride value);
|
||||
void __fastcall SetFlipChildrenOverride(TLocaleFlagOverride value);
|
||||
@@ -750,6 +752,7 @@ public:
|
||||
__property bool ExternalSessionInExistingInstance = { read = FExternalSessionInExistingInstance, write = SetExternalSessionInExistingInstance };
|
||||
__property bool ShowLoginWhenNoSession = { read = FShowLoginWhenNoSession, write = SetShowLoginWhenNoSession };
|
||||
__property bool KeepOpenWhenNoSession = { read = FKeepOpenWhenNoSession, write = SetKeepOpenWhenNoSession };
|
||||
__property bool DefaultToNewRemoteTab = { read = FDefaultToNewRemoteTab, write = SetDefaultToNewRemoteTab };
|
||||
__property bool LocalIconsByExt = { read = FLocalIconsByExt, write = SetLocalIconsByExt };
|
||||
__property TLocaleFlagOverride BidiModeOverride = { read = FBidiModeOverride, write = SetBidiModeOverride };
|
||||
__property TLocaleFlagOverride FlipChildrenOverride = { read = FFlipChildrenOverride, write = SetFlipChildrenOverride };
|
||||
|
||||
Reference in New Issue
Block a user