13 const wxPoint& pos,
const wxSize& size,
long style ) :
16 this->SetSizeHints( wxSize( 400, -1 ), wxDefaultSize );
18 wxBoxSizer* m_mainSizer;
19 m_mainSizer =
new wxBoxSizer( wxVERTICAL );
21 m_promptLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Authentication is required to access:" ), wxDefaultPosition,
26 m_urlLabel =
new wxStaticText(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
28 m_mainSizer->Add(
m_urlLabel, 0, wxBOTTOM | wxEXPAND | wxLEFT | wxRIGHT, 5 );
30 wxString m_authChoiceChoices[] = {
_(
"Username and password" ),
_(
"SSH key" ) };
31 int m_authChoiceNChoices =
sizeof( m_authChoiceChoices ) /
sizeof( wxString );
32 m_authChoice =
new wxRadioBox(
this, wxID_ANY,
_(
"Authentication" ), wxDefaultPosition, wxDefaultSize,
33 m_authChoiceNChoices, m_authChoiceChoices, 1, wxRA_SPECIFY_ROWS );
35 m_mainSizer->Add(
m_authChoice, 0, wxALL | wxEXPAND, 5 );
37 wxFlexGridSizer* fgSizer1;
38 fgSizer1 =
new wxFlexGridSizer( 4, 3, 5, 0 );
39 fgSizer1->AddGrowableCol( 1 );
40 fgSizer1->SetFlexibleDirection( wxBOTH );
41 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
43 m_userLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Username:" ), wxDefaultPosition, wxDefaultSize, 0 );
47 m_userCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
51 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
53 m_passLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Password / token:" ), wxDefaultPosition, wxDefaultSize, 0 );
57 m_passCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
61 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
63 m_keyLabel =
new wxStaticText(
this, wxID_ANY,
_(
"SSH key:" ), wxDefaultPosition, wxDefaultSize, 0 );
67 m_keyPicker =
new wxFilePickerCtrl(
this, wxID_ANY, wxEmptyString,
_(
"Select SSH private key" ),
_(
"*" ),
68 wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
72 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
74 m_saveCheck =
new wxCheckBox(
this, wxID_ANY,
_(
"Save credentials" ), wxDefaultPosition, wxDefaultSize, 0 );
85 fgSizer1->Add(
m_sdbSizer1, 1, wxALL | wxEXPAND, 5 );
88 m_mainSizer->Add( fgSizer1, 1, wxALL | wxEXPAND, 5 );
91 this->SetSizer( m_mainSizer );
93 m_mainSizer->Fit(
this );
95 this->Centre( wxBOTH );