Update dialogs sample to use wxWebCredentials too
This should have been done in abcc31c6b2
(Update wxCredentialEntryDialog
to use wxWebCredentials, 2021-01-10).
This commit is contained in:
@@ -1160,10 +1160,20 @@ void MyFrame::CredentialEntry(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxCredentialEntryDialog dialog(this, "A login is required", "Credentials");
|
wxCredentialEntryDialog dialog(this, "A login is required", "Credentials");
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
wxMessageBox(
|
const wxWebCredentials credentials = dialog.GetCredentials();
|
||||||
wxString::Format("User: %s Password: %s",
|
const wxString& password = wxSecretString(credentials.GetPassword());
|
||||||
dialog.GetUser(), dialog.GetPassword()),
|
wxMessageBox
|
||||||
"Credentials", wxOK | wxICON_INFORMATION, this);
|
(
|
||||||
|
wxString::Format
|
||||||
|
(
|
||||||
|
"User: %s Password: %s",
|
||||||
|
credentials.GetUser(),
|
||||||
|
password
|
||||||
|
),
|
||||||
|
"Credentials",
|
||||||
|
wxOK | wxICON_INFORMATION,
|
||||||
|
this
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // wxUSE_CREDENTIALDLG
|
#endif // wxUSE_CREDENTIALDLG
|
||||||
|
Reference in New Issue
Block a user