Skip to content

Commit

Permalink
Updating checkbox caption to "Credentials from AWS environment" to re…
Browse files Browse the repository at this point in the history
…flect Bug 2089

Source commit: 91401dc9ea1fa896f6615affdc87699b95adfe72
  • Loading branch information
martinprikryl committed Aug 22, 2023
1 parent eb27408 commit 842b951
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions source/forms/Login.cpp
Expand Up @@ -555,7 +555,7 @@ void __fastcall TLoginDialog::LoadSession(TSessionData * SessionData)
UnicodeString::StringOfChar(L'?', 16) : UnicodeString();
}

S3CredentialsEnvCheck2->Checked = SessionData->S3CredentialsEnv;
S3CredentialsEnvCheck3->Checked = SessionData->S3CredentialsEnv;
S3ProfileCombo->Text = DefaultStr(SessionData->S3Profile, GetS3GeneralName());
UpdateS3Credentials();

Expand Down Expand Up @@ -606,7 +606,7 @@ void __fastcall TLoginDialog::SaveSession(TSessionData * SessionData)

if (SessionData->FSProtocol == fsS3)
{
SessionData->S3CredentialsEnv = S3CredentialsEnvCheck2->Checked;
SessionData->S3CredentialsEnv = S3CredentialsEnvCheck3->Checked;
SessionData->S3Profile = GetS3Profile();
}

Expand Down Expand Up @@ -714,7 +714,7 @@ void __fastcall TLoginDialog::UpdateControls()
ReadOnlyControl(PortNumberEdit, !Editable);
PortNumberEdit->ButtonsVisible = Editable;
// FSessionData may be NULL temporary even when Editable while switching nodes
bool S3CredentialsEnv = S3Protocol && S3CredentialsEnvCheck2->Checked;
bool S3CredentialsEnv = S3Protocol && S3CredentialsEnvCheck3->Checked;
bool NoAuth =
Editable && (FSessionData != NULL) &&
((SshProtocol && FSessionData->SshNoUserAuth) ||
Expand Down Expand Up @@ -2206,7 +2206,7 @@ int __fastcall TLoginDialog::DefaultPort()
//---------------------------------------------------------------------------
void TLoginDialog::UpdateS3Credentials()
{
if (S3CredentialsEnvCheck2->Checked)
if (S3CredentialsEnvCheck3->Checked)
{
UnicodeString S3Profile = GetS3Profile();
UserNameEdit->Text = S3EnvUserName(S3Profile);
Expand Down Expand Up @@ -2264,7 +2264,7 @@ void __fastcall TLoginDialog::TransferProtocolComboChange(TObject * Sender)
}
}

S3CredentialsEnvCheck2->Checked = false;
S3CredentialsEnvCheck3->Checked = false;
}

UpdatePortWithProtocol();
Expand Down Expand Up @@ -3308,7 +3308,7 @@ void __fastcall TLoginDialog::PanelMouseDown(TObject *, TMouseButton, TShiftStat
CountClicksForWindowPrint(this);
}
//---------------------------------------------------------------------------
void __fastcall TLoginDialog::S3CredentialsEnvCheck2Click(TObject *)
void __fastcall TLoginDialog::S3CredentialsEnvCheck3Click(TObject *)
{
UpdateS3Credentials();
UpdateControls();
Expand Down
6 changes: 3 additions & 3 deletions source/forms/Login.dfm
Expand Up @@ -169,15 +169,15 @@ object LoginDialog: TLoginDialog
DesignSize = (
324
31)
object S3CredentialsEnvCheck2: TCheckBox
object S3CredentialsEnvCheck3: TCheckBox
Left = 0
Top = 2
Width = 324
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = '&Credentials from AWS CLI:'
Caption = '&Credentials from AWS environment:'
TabOrder = 0
OnClick = S3CredentialsEnvCheck2Click
OnClick = S3CredentialsEnvCheck3Click
end
object S3ProfileCombo: TComboBox
Left = 200
Expand Down
4 changes: 2 additions & 2 deletions source/forms/Login.h
Expand Up @@ -210,7 +210,7 @@ class TLoginDialog : public TForm
TPanel *ShowAgainPanel;
TCheckBox *ShowAgainCheck;
TPanel *BasicS3Panel;
TCheckBox *S3CredentialsEnvCheck2;
TCheckBox *S3CredentialsEnvCheck3;
TMenuItem *OpeninPuTTY4;
TComboBox *S3ProfileCombo;
void __fastcall DataChange(TObject *Sender);
Expand Down Expand Up @@ -290,7 +290,7 @@ class TLoginDialog : public TForm
void __fastcall SearchSiteNameActionExecute(TObject *Sender);
void __fastcall SearchSiteActionExecute(TObject *Sender);
void __fastcall PanelMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
void __fastcall S3CredentialsEnvCheck2Click(TObject *Sender);
void __fastcall S3CredentialsEnvCheck3Click(TObject *Sender);
void __fastcall EncryptionComboChange(TObject *Sender);
void __fastcall S3ProfileComboChange(TObject *Sender);

Expand Down

0 comments on commit 842b951

Please sign in to comment.