|
@@ -33,14 +33,14 @@ const int WorkspaceImageIndex = 4;
|
|
|
const int NewSiteImageIndex = 6;
|
|
|
const int SiteColorMaskImageIndex = 8;
|
|
|
//---------------------------------------------------------------------------
|
|
|
-bool __fastcall DoLoginDialog(TStoredSessionList *SessionList, TList * DataList, TForm * LinkedForm)
|
|
|
+bool __fastcall DoLoginDialog(TList * DataList, TForm * LinkedForm)
|
|
|
{
|
|
|
DebugAssert(DataList != NULL);
|
|
|
TLoginDialog * LoginDialog = SafeFormCreate<TLoginDialog>();
|
|
|
bool Result;
|
|
|
try
|
|
|
{
|
|
|
- LoginDialog->Init(SessionList, LinkedForm);
|
|
|
+ LoginDialog->Init(LinkedForm);
|
|
|
Result = LoginDialog->Execute(DataList);
|
|
|
}
|
|
|
__finally
|
|
@@ -99,9 +99,8 @@ void __fastcall TLoginDialog::InvalidateSessionData()
|
|
|
FSessionData = NULL;
|
|
|
}
|
|
|
//---------------------------------------------------------------------
|
|
|
-void __fastcall TLoginDialog::Init(TStoredSessionList *SessionList, TForm * LinkedForm)
|
|
|
+void __fastcall TLoginDialog::Init(TForm * LinkedForm)
|
|
|
{
|
|
|
- FStoredSessions = SessionList;
|
|
|
FLinkedForm = LinkedForm;
|
|
|
LoadSessions();
|
|
|
UnicodeString Dummy;
|
|
@@ -1243,14 +1242,14 @@ void __fastcall TLoginDialog::ActionListUpdate(TBasicAction * BasicAction,
|
|
|
//---------------------------------------------------------------------------
|
|
|
bool __fastcall TLoginDialog::IsCloneToNewSiteDefault()
|
|
|
{
|
|
|
- return !FEditing && !FRenaming && IsSiteNode(SessionTree->Selected) && !FStoredSessions->CanLogin(GetSessionData());
|
|
|
+ return !FEditing && !FRenaming && IsSiteNode(SessionTree->Selected) && !StoredSessions->CanLogin(GetSessionData());
|
|
|
}
|
|
|
//---------------------------------------------------------------------------
|
|
|
bool __fastcall TLoginDialog::CanLogin()
|
|
|
{
|
|
|
TSessionData * Data = GetSessionData();
|
|
|
return
|
|
|
- ((Data != NULL) && FStoredSessions->CanLogin(Data) && !FEditing) ||
|
|
|
+ ((Data != NULL) && StoredSessions->CanLogin(Data) && !FEditing) ||
|
|
|
(IsFolderOrWorkspaceNode(SessionTree->Selected) && HasNodeAnySession(SessionTree->Selected, true));
|
|
|
}
|
|
|
//---------------------------------------------------------------------------
|
|
@@ -1743,7 +1742,7 @@ bool __fastcall TLoginDialog::HasNodeAnySession(TTreeNode * Node, bool NeedCanLo
|
|
|
{
|
|
|
Result =
|
|
|
IsSessionNode(ANode) &&
|
|
|
- (!NeedCanLogin || FStoredSessions->CanLogin(GetNodeSession(ANode)));
|
|
|
+ (!NeedCanLogin || StoredSessions->CanLogin(GetNodeSession(ANode)));
|
|
|
ANode = ANode->GetNext();
|
|
|
}
|
|
|
return Result;
|
|
@@ -2359,7 +2358,7 @@ UnicodeString __fastcall TLoginDialog::GetFolderOrWorkspaceContents(
|
|
|
UnicodeString Contents;
|
|
|
|
|
|
UnicodeString Path = SessionNodePath(Node);
|
|
|
- std::unique_ptr<TStrings> Names(FStoredSessions->GetFolderOrWorkspaceList(Path));
|
|
|
+ std::unique_ptr<TStrings> Names(StoredSessions->GetFolderOrWorkspaceList(Path));
|
|
|
for (int Index = 0; Index < Names->Count; Index++)
|
|
|
{
|
|
|
UnicodeString Name = Names->Strings[Index];
|
|
@@ -2910,7 +2909,7 @@ void __fastcall TLoginDialog::CancelEditing()
|
|
|
void __fastcall TLoginDialog::CloneToNewSite()
|
|
|
{
|
|
|
FNewSiteData->CopyData(SelectedSession);
|
|
|
- FNewSiteData->MakeUniqueIn(FStoredSessions);
|
|
|
+ FNewSiteData->MakeUniqueIn(StoredSessions);
|
|
|
FNewSiteKeepName = true;
|
|
|
NewSite();
|
|
|
EditSession();
|