Credential entry panels renamed
This commit is contained in:
parent
aff9f4f9f0
commit
ed0462e1a4
@ -904,12 +904,12 @@ protected:
|
||||
m_password ->Enable(false);
|
||||
}
|
||||
|
||||
return wxEAPCredentialsPanel<_Tcred, wxEAPCredentialsPassPanelBase>::TransferDataToWindow();
|
||||
return wxEAPCredentialsPanel<_Tcred, wxEAPCredentialsPromptPassPanelBase>::TransferDataToWindow();
|
||||
}
|
||||
|
||||
virtual bool TransferDataFromWindow()
|
||||
{
|
||||
if (!wxEAPCredentialsPanel<_Tcred, wxEAPCredentialsPassPanelBase>::TransferDataFromWindow())
|
||||
if (!wxEAPCredentialsPanel<_Tcred, wxEAPCredentialsPromptPassPanelBase>::TransferDataFromWindow())
|
||||
return false;
|
||||
|
||||
m_cred.m_identity = m_identity->GetValue();
|
||||
|
@ -349,7 +349,7 @@ wxEAPCredentialsConfigPanelBase::~wxEAPCredentialsConfigPanelBase()
|
||||
|
||||
}
|
||||
|
||||
wxEAPCredentialsPassPanelBase::wxEAPCredentialsPassPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxEAPCredentialsPanelBase( parent, id, pos, size, style )
|
||||
wxEAPCredentialsPromptPassPanelBase::wxEAPCredentialsPromptPassPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxEAPCredentialsPanelBase( parent, id, pos, size, style )
|
||||
{
|
||||
wxStaticBoxSizer* sb_credentials;
|
||||
sb_credentials = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Client Credentials") ), wxVERTICAL );
|
||||
@ -410,7 +410,7 @@ wxEAPCredentialsPassPanelBase::wxEAPCredentialsPassPanelBase( wxWindow* parent,
|
||||
this->Layout();
|
||||
}
|
||||
|
||||
wxEAPCredentialsPassPanelBase::~wxEAPCredentialsPassPanelBase()
|
||||
wxEAPCredentialsPromptPassPanelBase::~wxEAPCredentialsPromptPassPanelBase()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2377,7 +2377,7 @@
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">wxEAPCredentialsPassPanelBase</property>
|
||||
<property name="name">wxEAPCredentialsPromptPassPanelBase</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">500,-1</property>
|
||||
<property name="subclass">wxEAPCredentialsPanelBase; ../include/wxEAP_UIBase.h</property>
|
||||
|
@ -192,9 +192,9 @@ class wxEAPCredentialsConfigPanelBase : public wxPanel
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxEAPCredentialsPassPanelBase
|
||||
/// Class wxEAPCredentialsPromptPassPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxEAPCredentialsPassPanelBase : public wxEAPCredentialsPanelBase
|
||||
class wxEAPCredentialsPromptPassPanelBase : public wxEAPCredentialsPanelBase
|
||||
{
|
||||
private:
|
||||
|
||||
@ -209,8 +209,8 @@ class wxEAPCredentialsPassPanelBase : public wxEAPCredentialsPanelBase
|
||||
|
||||
public:
|
||||
|
||||
wxEAPCredentialsPassPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL );
|
||||
~wxEAPCredentialsPassPanelBase();
|
||||
wxEAPCredentialsPromptPassPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL );
|
||||
~wxEAPCredentialsPromptPassPanelBase();
|
||||
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
///
|
||||
/// MSCHAPv2 credential configuration panel
|
||||
///
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPassPanelBase> > wxMSCHAPv2CredentialsConfigPanel;
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPromptPassPanelBase> > wxMSCHAPv2CredentialsConfigPanel;
|
||||
|
||||
///
|
||||
/// MSCHAPv2 configuration panel
|
||||
@ -34,7 +34,7 @@ class wxMSCHAPv2ConfigPanel;
|
||||
///
|
||||
/// MSCHAPv2 credential entry panel
|
||||
///
|
||||
typedef wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPassPanelBase> wxMSCHAPv2CredentialsPanel;
|
||||
typedef wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPromptPassPanelBase> wxMSCHAPv2CredentialsPanel;
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
///
|
||||
/// PAP credential configuration panel
|
||||
///
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPassPanelBase> > wxPAPCredentialsConfigPanel;
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPromptPassPanelBase> > wxPAPCredentialsConfigPanel;
|
||||
|
||||
///
|
||||
/// PAP configuration panel
|
||||
@ -34,7 +34,7 @@ class wxPAPConfigPanel;
|
||||
///
|
||||
/// PAP credential entry panel
|
||||
///
|
||||
typedef wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPassPanelBase> wxPAPCredentialsPanel;
|
||||
typedef wxPasswordCredentialsPanel<eap::credentials_pass, wxEAPCredentialsPromptPassPanelBase> wxPAPCredentialsPanel;
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -58,7 +58,7 @@ class wxFQDNListValidator;
|
||||
///
|
||||
/// TLS credential panel
|
||||
///
|
||||
class wxTLSCredentialsPanel;
|
||||
class wxEAPCredentialsPromptTLSPanel;
|
||||
|
||||
///
|
||||
/// TLS server trust configuration panel
|
||||
@ -68,7 +68,7 @@ class wxTLSServerTrustPanel;
|
||||
///
|
||||
/// TLS credentials configuration panel
|
||||
///
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_tls, wxTLSCredentialsPanel> wxTLSCredentialsConfigPanel;
|
||||
typedef wxEAPCredentialsConfigPanel<eap::credentials_tls, wxEAPCredentialsPromptTLSPanel> wxEAPCredentialsPromptTLSConfigPanel;
|
||||
|
||||
///
|
||||
/// TLS configuration panel
|
||||
@ -248,7 +248,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class wxTLSCredentialsPanel : public wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>
|
||||
class wxEAPCredentialsPromptTLSPanel : public wxEAPCredentialsPanel<eap::credentials_tls, wxEAPCredentialsPromptTLSPanelBase>
|
||||
{
|
||||
public:
|
||||
///
|
||||
@ -260,7 +260,7 @@ public:
|
||||
/// \param[in] parent Parent window
|
||||
/// \param[in] is_config Is this panel used to pre-enter credentials? When \c true, the "Remember" checkbox is always selected and disabled.
|
||||
///
|
||||
wxTLSCredentialsPanel(const eap::config_provider &prov, const eap::config_method_with_cred &cfg, eap::credentials_tls &cred, wxWindow* parent, bool is_config = false);
|
||||
wxEAPCredentialsPromptTLSPanel(const eap::config_provider &prov, const eap::config_method_with_cred &cfg, eap::credentials_tls &cred, wxWindow* parent, bool is_config = false);
|
||||
|
||||
protected:
|
||||
/// \cond internal
|
||||
@ -333,5 +333,5 @@ protected:
|
||||
const eap::config_provider &m_prov; ///< EAP provider
|
||||
eap::config_method_tls &m_cfg; ///< TLS configuration
|
||||
wxTLSServerTrustPanel *m_server_trust; ///< Server trust configuration panel
|
||||
wxTLSCredentialsConfigPanel *m_credentials; ///< Credentials configuration panel
|
||||
wxEAPCredentialsPromptTLSConfigPanel *m_credentials; ///< Credentials configuration panel
|
||||
};
|
||||
|
@ -114,7 +114,7 @@ wxEAPTLSServerTrustConfigPanelBase::~wxEAPTLSServerTrustConfigPanelBase()
|
||||
|
||||
}
|
||||
|
||||
wxTLSCredentialsPanelBase::wxTLSCredentialsPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
|
||||
wxEAPCredentialsPromptTLSPanelBase::wxEAPCredentialsPromptTLSPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
|
||||
{
|
||||
wxStaticBoxSizer* sb_credentials;
|
||||
sb_credentials = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("TLS Client Certificate") ), wxVERTICAL );
|
||||
@ -196,12 +196,12 @@ wxTLSCredentialsPanelBase::wxTLSCredentialsPanelBase( wxWindow* parent, wxWindow
|
||||
this->Layout();
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxTLSCredentialsPanelBase::OnUpdateUI ) );
|
||||
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsPromptTLSPanelBase::OnUpdateUI ) );
|
||||
}
|
||||
|
||||
wxTLSCredentialsPanelBase::~wxTLSCredentialsPanelBase()
|
||||
wxEAPCredentialsPromptTLSPanelBase::~wxEAPCredentialsPromptTLSPanelBase()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxTLSCredentialsPanelBase::OnUpdateUI ) );
|
||||
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPCredentialsPromptTLSPanelBase::OnUpdateUI ) );
|
||||
|
||||
}
|
||||
|
@ -1013,7 +1013,7 @@
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">wxTLSCredentialsPanelBase</property>
|
||||
<property name="name">wxEAPCredentialsPromptTLSPanelBase</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">500,-1</property>
|
||||
<property name="subclass"></property>
|
||||
|
@ -68,9 +68,9 @@ class wxEAPTLSServerTrustConfigPanelBase : public wxPanel
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxTLSCredentialsPanelBase
|
||||
/// Class wxEAPCredentialsPromptTLSPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxTLSCredentialsPanelBase : public wxPanel
|
||||
class wxEAPCredentialsPromptTLSPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
@ -91,8 +91,8 @@ class wxTLSCredentialsPanelBase : public wxPanel
|
||||
|
||||
public:
|
||||
|
||||
wxTLSCredentialsPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL );
|
||||
~wxTLSCredentialsPanelBase();
|
||||
wxEAPCredentialsPromptTLSPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL );
|
||||
~wxEAPCredentialsPromptTLSPanelBase();
|
||||
|
||||
};
|
||||
|
||||
|
@ -308,11 +308,11 @@ bool wxFQDNListValidator::Parse(const wxString &val_in, size_t i_start, size_t i
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// wxTLSCredentialsPanel
|
||||
// wxEAPCredentialsPromptTLSPanel
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxTLSCredentialsPanel::wxTLSCredentialsPanel(const eap::config_provider &prov, const eap::config_method_with_cred &cfg, eap::credentials_tls &cred, wxWindow* parent, bool is_config) :
|
||||
wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>(prov, cfg, cred, parent, is_config)
|
||||
wxEAPCredentialsPromptTLSPanel::wxEAPCredentialsPromptTLSPanel(const eap::config_provider &prov, const eap::config_method_with_cred &cfg, eap::credentials_tls &cred, wxWindow* parent, bool is_config) :
|
||||
wxEAPCredentialsPanel<eap::credentials_tls, wxEAPCredentialsPromptTLSPanelBase>(prov, cfg, cred, parent, is_config)
|
||||
{
|
||||
// Load and set icon.
|
||||
winstd::library lib_shell32;
|
||||
@ -321,7 +321,7 @@ wxTLSCredentialsPanel::wxTLSCredentialsPanel(const eap::config_provider &prov, c
|
||||
}
|
||||
|
||||
|
||||
bool wxTLSCredentialsPanel::TransferDataToWindow()
|
||||
bool wxEAPCredentialsPromptTLSPanel::TransferDataToWindow()
|
||||
{
|
||||
// Populate certificate list.
|
||||
bool is_found = false;
|
||||
@ -361,11 +361,11 @@ bool wxTLSCredentialsPanel::TransferDataToWindow()
|
||||
|
||||
m_identity->SetValue(m_cred.m_identity);
|
||||
|
||||
return wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>::TransferDataToWindow();
|
||||
return wxEAPCredentialsPanel<eap::credentials_tls, wxEAPCredentialsPromptTLSPanelBase>::TransferDataToWindow();
|
||||
}
|
||||
|
||||
|
||||
bool wxTLSCredentialsPanel::TransferDataFromWindow()
|
||||
bool wxEAPCredentialsPromptTLSPanel::TransferDataFromWindow()
|
||||
{
|
||||
if (m_cert_none->GetValue())
|
||||
m_cred.m_cert.free();
|
||||
@ -381,11 +381,11 @@ bool wxTLSCredentialsPanel::TransferDataFromWindow()
|
||||
|
||||
// Inherited TransferDataFromWindow() calls m_cred.store().
|
||||
// Therefore, call it only now, that m_cred is set.
|
||||
return wxEAPCredentialsPanel<eap::credentials_tls, wxTLSCredentialsPanelBase>::TransferDataFromWindow();
|
||||
return wxEAPCredentialsPanel<eap::credentials_tls, wxEAPCredentialsPromptTLSPanelBase>::TransferDataFromWindow();
|
||||
}
|
||||
|
||||
|
||||
void wxTLSCredentialsPanel::OnUpdateUI(wxUpdateUIEvent& /*event*/)
|
||||
void wxEAPCredentialsPromptTLSPanel::OnUpdateUI(wxUpdateUIEvent& /*event*/)
|
||||
{
|
||||
if (!m_is_config && m_cfg.m_use_cred) {
|
||||
// Credential prompt mode & Using configured credentials
|
||||
@ -579,7 +579,7 @@ wxTLSConfigPanel::wxTLSConfigPanel(const eap::config_provider &prov, eap::config
|
||||
m_server_trust = new wxTLSServerTrustPanel(prov, cfg, this);
|
||||
sb_content->Add(m_server_trust, 0, wxDOWN|wxEXPAND, 5);
|
||||
|
||||
m_credentials = new wxTLSCredentialsConfigPanel(prov, cfg, this);
|
||||
m_credentials = new wxEAPCredentialsPromptTLSConfigPanel(prov, cfg, this);
|
||||
sb_content->Add(m_credentials, 0, wxUP|wxEXPAND, 5);
|
||||
|
||||
this->SetSizer(sb_content);
|
||||
|
@ -137,7 +137,7 @@ protected:
|
||||
/// \endcond
|
||||
|
||||
public:
|
||||
wxTLSCredentialsPanel *m_outer_cred; ///< Outer credentials panel
|
||||
wxEAPCredentialsPromptTLSPanel *m_outer_cred; ///< Outer credentials panel
|
||||
wxEAPCredentialsPanelBase *m_inner_cred; ///< Inner credentials panel
|
||||
|
||||
protected:
|
||||
|
@ -267,7 +267,7 @@ wxTTLSCredentialsPanel::wxTTLSCredentialsPanel(const eap::config_provider &prov,
|
||||
if (eap::config_method_with_cred::status_cred_begin <= m_cfg.m_last_status && m_cfg.m_last_status < eap::config_method_with_cred::status_cred_end)
|
||||
sb_content->Add(new wxEAPCredentialWarningPanel(m_prov, m_cfg.m_last_status, this), 0, wxALL|wxEXPAND, 5);
|
||||
|
||||
m_outer_cred = new wxTLSCredentialsPanel(m_prov, (const eap::config_method_tls&)m_cfg, (eap::credentials_tls&)cred, this, is_config);
|
||||
m_outer_cred = new wxEAPCredentialsPromptTLSPanel(m_prov, (const eap::config_method_tls&)m_cfg, (eap::credentials_tls&)cred, this, is_config);
|
||||
sb_content->Add(m_outer_cred, 0, wxALL|wxEXPAND, 5);
|
||||
|
||||
this->SetSizer(sb_content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user