Provider identity and help-desk is configurable via GUI now
This commit is contained in:
@@ -45,7 +45,6 @@ class wxTTLSCredentialsPanel;
|
||||
|
||||
#include <wx/choicebk.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/scrolwin.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include <Windows.h>
|
||||
@@ -74,23 +73,19 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class wxTTLSConfigWindow : public wxScrolledWindow
|
||||
class wxTTLSConfigWindow : public wxEAPConfigWindow
|
||||
{
|
||||
public:
|
||||
///
|
||||
/// Constructs a configuration panel
|
||||
///
|
||||
/// \param[in] prov Provider configuration data
|
||||
/// \param[inout] cfg Configuration data
|
||||
/// \param[in] pszCredTarget Target name of credentials in Windows Credential Manager. Can be further decorated to create final target name.
|
||||
/// \param[in] parent Parent window
|
||||
///
|
||||
wxTTLSConfigWindow(const eap::config_provider &prov, eap::config_method &cfg, LPCTSTR pszCredTarget, wxWindow* parent);
|
||||
|
||||
///
|
||||
/// Destructs the configuration panel
|
||||
///
|
||||
virtual ~wxTTLSConfigWindow();
|
||||
|
||||
protected:
|
||||
/// \cond internal
|
||||
virtual bool TransferDataToWindow();
|
||||
@@ -99,7 +94,6 @@ protected:
|
||||
/// \endcond
|
||||
|
||||
protected:
|
||||
const eap::config_provider &m_prov; ///< EAP provider
|
||||
eap::config_method_ttls &m_cfg; ///< TTLS configuration
|
||||
wxStaticText *m_outer_title; ///< Outer authentication title
|
||||
wxTTLSConfigPanel *m_outer_identity; ///< Outer identity configuration panel
|
||||
@@ -108,7 +102,7 @@ protected:
|
||||
wxChoicebook *m_inner_type; ///< Inner authentication type
|
||||
|
||||
// Temporary inner method configurations to hold data until applied
|
||||
eap::config_method_pap m_cfg_pap; ///< PAP configuration
|
||||
eap::config_method_pap m_cfg_pap; ///< PAP configuration
|
||||
};
|
||||
|
||||
|
||||
|
@@ -193,7 +193,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
||||
// Create credentials dialog.
|
||||
wxEAPCredentialsDialog dlg(cfg_prov, &parent);
|
||||
wxTTLSCredentialsPanel *panel = new wxTTLSCredentialsPanel(cfg_prov, *cfg_method, cred_out, cfg_prov.m_id.c_str(), &dlg);
|
||||
dlg.AddContents((wxPanel**)&panel, 1);
|
||||
dlg.AddContent(panel);
|
||||
|
||||
// Set "Remember" checkboxes according to credential source,
|
||||
panel->m_outer_cred->SetRememberValue(cred_source.first == eap::credentials::source_storage);
|
||||
|
@@ -94,10 +94,9 @@ void wxTTLSConfigPanel::OnUpdateUI(wxUpdateUIEvent& event)
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxTTLSConfigWindow::wxTTLSConfigWindow(const eap::config_provider &prov, eap::config_method &cfg, LPCTSTR pszCredTarget, wxWindow* parent) :
|
||||
m_prov(prov),
|
||||
m_cfg((eap::config_method_ttls&)cfg),
|
||||
m_cfg_pap(cfg.m_module),
|
||||
wxScrolledWindow(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL)
|
||||
wxEAPConfigWindow(prov, cfg, parent)
|
||||
{
|
||||
wxBoxSizer* sb_content;
|
||||
sb_content = new wxBoxSizer( wxVERTICAL );
|
||||
@@ -135,22 +134,11 @@ wxTTLSConfigWindow::wxTTLSConfigWindow(const eap::config_provider &prov, eap::co
|
||||
size.y = 500;
|
||||
}
|
||||
this->SetMinSize(size);
|
||||
this->SetScrollRate(5, 5);
|
||||
|
||||
this->SetSizer(sb_content);
|
||||
this->Layout();
|
||||
|
||||
m_inner_type->SetFocusFromKbd();
|
||||
|
||||
// Connect Events
|
||||
this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxTTLSConfigWindow::OnInitDialog));
|
||||
}
|
||||
|
||||
|
||||
wxTTLSConfigWindow::~wxTTLSConfigWindow()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxTTLSConfigWindow::OnInitDialog));
|
||||
}
|
||||
|
||||
|
||||
@@ -196,8 +184,7 @@ bool wxTTLSConfigWindow::TransferDataFromWindow()
|
||||
|
||||
void wxTTLSConfigWindow::OnInitDialog(wxInitDialogEvent& event)
|
||||
{
|
||||
// Call TransferDataToWindow() manually, as wxScrolledWindow somehow skips that.
|
||||
TransferDataToWindow();
|
||||
wxEAPConfigWindow::OnInitDialog(event);
|
||||
|
||||
// Forward the event to child panels.
|
||||
m_outer_identity->GetEventHandler()->ProcessEvent(event);
|
||||
|
Reference in New Issue
Block a user