KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_git_credentials_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_GIT_CREDENTIALS_BASE::DIALOG_GIT_CREDENTIALS_BASE( wxWindow* parent, wxWindowID id, const wxString& title,
13 const wxPoint& pos, const wxSize& size, long style ) :
14 DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxSize( 400, -1 ), wxDefaultSize );
17
18 wxBoxSizer* m_mainSizer;
19 m_mainSizer = new wxBoxSizer( wxVERTICAL );
20
21 m_promptLabel = new wxStaticText( this, wxID_ANY, _( "Authentication is required to access:" ), wxDefaultPosition,
22 wxDefaultSize, 0 );
23 m_promptLabel->Wrap( -1 );
24 m_mainSizer->Add( m_promptLabel, 0, wxALL, 5 );
25
26 m_urlLabel = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
27 m_urlLabel->Wrap( -1 );
28 m_mainSizer->Add( m_urlLabel, 0, wxBOTTOM | wxEXPAND | wxLEFT | wxRIGHT, 5 );
29
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 );
34 m_authChoice->SetSelection( 0 );
35 m_mainSizer->Add( m_authChoice, 0, wxALL | wxEXPAND, 5 );
36
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 );
42
43 m_userLabel = new wxStaticText( this, wxID_ANY, _( "Username:" ), wxDefaultPosition, wxDefaultSize, 0 );
44 m_userLabel->Wrap( -1 );
45 fgSizer1->Add( m_userLabel, 0, wxALL, 5 );
46
47 m_userCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
48 fgSizer1->Add( m_userCtrl, 0, wxEXPAND, 5 );
49
50
51 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
52
53 m_passLabel = new wxStaticText( this, wxID_ANY, _( "Password / token:" ), wxDefaultPosition, wxDefaultSize, 0 );
54 m_passLabel->Wrap( -1 );
55 fgSizer1->Add( m_passLabel, 0, wxALL, 5 );
56
57 m_passCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
58 fgSizer1->Add( m_passCtrl, 0, wxEXPAND, 5 );
59
60
61 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
62
63 m_keyLabel = new wxStaticText( this, wxID_ANY, _( "SSH key:" ), wxDefaultPosition, wxDefaultSize, 0 );
64 m_keyLabel->Wrap( -1 );
65 fgSizer1->Add( m_keyLabel, 0, wxALL, 5 );
66
67 m_keyPicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _( "Select SSH private key" ), _( "*" ),
68 wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE );
69 fgSizer1->Add( m_keyPicker, 0, wxEXPAND, 5 );
70
71
72 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
73
74 m_saveCheck = new wxCheckBox( this, wxID_ANY, _( "Save credentials" ), wxDefaultPosition, wxDefaultSize, 0 );
75 m_saveCheck->SetValue( true );
76 fgSizer1->Add( m_saveCheck, 0, wxALL, 5 );
77
78 m_sdbSizer1 = new wxStdDialogButtonSizer();
79 m_sdbSizer1OK = new wxButton( this, wxID_OK );
80 m_sdbSizer1->AddButton( m_sdbSizer1OK );
81 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
82 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
83 m_sdbSizer1->Realize();
84
85 fgSizer1->Add( m_sdbSizer1, 1, wxALL | wxEXPAND, 5 );
86
87
88 m_mainSizer->Add( fgSizer1, 1, wxALL | wxEXPAND, 5 );
89
90
91 this->SetSizer( m_mainSizer );
92 this->Layout();
93 m_mainSizer->Fit( this );
94
95 this->Centre( wxBOTH );
96
97 // Connect Events
98 m_authChoice->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED,
99 wxCommandEventHandler( DIALOG_GIT_CREDENTIALS_BASE::OnConnTypeChanged ), NULL, this );
100}
101
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)
virtual void OnConnTypeChanged(wxCommandEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
#define _(s)