12DIALOG_GIT_CREDENTIALS_BASE::DIALOG_GIT_CREDENTIALS_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
14 this->SetSizeHints( wxSize( 400,-1 ), wxDefaultSize );
16 wxBoxSizer* m_mainSizer;
17 m_mainSizer =
new wxBoxSizer( wxVERTICAL );
19 m_promptLabel =
new wxStaticText(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
23 m_explanationLabel =
new wxStaticText(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
29 wxString m_authChoiceChoices[] = {
_(
"Username and password"),
_(
"SSH key") };
30 int m_authChoiceNChoices =
sizeof( m_authChoiceChoices ) /
sizeof( wxString );
31 m_authChoice =
new wxRadioBox(
this, wxID_ANY,
_(
"Authentication"), wxDefaultPosition, wxDefaultSize, m_authChoiceNChoices, m_authChoiceChoices, 1, wxRA_SPECIFY_ROWS );
35 wxFlexGridSizer* fgSizer1;
36 fgSizer1 =
new wxFlexGridSizer( 4, 3, 5, 0 );
37 fgSizer1->AddGrowableCol( 1 );
38 fgSizer1->SetFlexibleDirection( wxBOTH );
39 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
41 m_userLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Username:"), wxDefaultPosition, wxDefaultSize, 0 );
45 m_userCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
49 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
51 m_passLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Password / token:"), wxDefaultPosition, wxDefaultSize, 0 );
55 m_passCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
59 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
61 m_keyLabel =
new wxStaticText(
this, wxID_ANY,
_(
"SSH key:"), wxDefaultPosition, wxDefaultSize, 0 );
65 m_keyPicker =
new wxFilePickerCtrl(
this, wxID_ANY, wxEmptyString,
_(
"Select SSH private key"),
_(
"*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
69 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
71 m_saveCheck =
new wxCheckBox(
this, wxID_ANY,
_(
"Save credentials"), wxDefaultPosition, wxDefaultSize, 0 );
85 m_mainSizer->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
88 this->SetSizer( m_mainSizer );
90 m_mainSizer->Fit(
this );
92 this->Centre( wxBOTH );