26#include <wx/dcclient.h>
30 const wxString& aDefaultSSHKey ) :
38 m_promptLabel->SetLabelText(
_(
"Authentication is required to access the remote repository." ) );
46 wxString url = wxControl::Ellipsize( safeUrl, dc, wxELLIPSIZE_MIDDLE, FromDIP( 400 ), wxELLIPSIZE_FLAGS_NONE );
48 m_promptLabel->SetLabelText( wxString::Format(
_(
"Authentication is required to access %s." ), url ) );
53 if( !aExplanation.IsEmpty() )
68 if( !aDefaultSSHKey.IsEmpty() )
69 m_keyPicker->SetFileName( wxFileName( aDefaultSSHKey ) );
85 GetSizer()->Fit(
this );
115 m_passCtrl->SetHint(
_(
"Leave empty if the key has no passphrase." ) );
wxStaticText * m_passLabel
DIALOG_GIT_CREDENTIALS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Git Authentication Required"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE)
wxStaticText * m_keyLabel
wxFilePickerCtrl * m_keyPicker
wxStaticText * m_promptLabel
wxRadioBox * m_authChoice
wxStaticText * m_explanationLabel
KIGIT_COMMON::GIT_CONN_TYPE GetConnType() const
KIGIT_COMMON::GIT_CONN_TYPE m_connType
On macOS a disabled wxRadioBox reports its first entry, so the type is kept here.
wxString GetPassword() const
wxString GetUsername() const
DIALOG_GIT_CREDENTIALS(wxWindow *aParent, const wxString &aUrl, const wxString &aExplanation, KIGIT_COMMON::GIT_CONN_TYPE aConnType, const wxString &aDefaultUsername, const wxString &aDefaultSSHKey)
wxString m_urlUsername
The user an SSH address names, which the server requires.
void OnConnTypeChanged(wxCommandEvent &aEvent) override
void updateFieldsForConnType()
wxString GetSSHKey() const
bool SaveCredentials() const
void OptOut(wxWindow *aWindow)
Opt out of control state saving.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
wxColour ToColour() const
static REMOTE_URL ParseRemoteURL(const wxString &aURL)
APIEXPORT wxString StripEmbeddedUserinfo(const wxString &aText)
Remove the user and password from every URL quoted in a message, since the remote's can carry a passw...
Diff colors with defaults for light backgrounds.
static DIFF_COLOR_THEME ForText(bool aDarkTheme)
Resolve change colors for UI text. Pass the desktop theme captured on the UI thread.