Some more template simplifications followed

This commit is contained in:
Simon Rozman 2016-07-20 18:10:38 +02:00
parent 9376404164
commit b26ab72e6e
4 changed files with 10 additions and 16 deletions

View File

@ -32,7 +32,7 @@ class wxEAPBannerPanel;
///
/// EAP top-most configuration dialog
///
template <class _Tmeth, class _wxT> class wxEAPConfigDialog;
template <class _wxT> class wxEAPConfigDialog;
///
/// EAP top-most credential dialog
@ -47,7 +47,7 @@ class wxEAPProviderLockedPanel;
///
/// Base template for credential configuration panel
///
template <class _Tmeth, class _wxT> class wxEAPCredentialsConfigPanel;
template <class _wxT> class wxEAPCredentialsConfigPanel;
///
/// Base template for all credential entry panels
@ -99,15 +99,9 @@ protected:
};
template <class _Tmeth, class _wxT>
template <class _wxT>
class wxEAPConfigDialog : public wxEAPConfigDialogBase
{
public:
///
/// This data type
///
typedef wxEAPConfigDialog<_Tmeth, _wxT> _T;
public:
///
/// Constructs a configuration dialog
@ -146,7 +140,7 @@ protected:
{
// Forward the event to child panels.
for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) {
_wxT *prov = wxDynamicCast(provider->GetData(), _wxT);
wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow);
if (prov)
prov->GetEventHandler()->ProcessEvent(event);
}
@ -222,7 +216,7 @@ protected:
};
template <class _Tmeth, class _wxT>
template <class _wxT>
class wxEAPCredentialsConfigPanel : public wxEAPCredentialsConfigPanelBase
{
public:
@ -234,7 +228,7 @@ public:
/// \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
///
wxEAPCredentialsConfigPanel(const eap::config_provider &prov, _Tmeth &cfg, LPCTSTR pszCredTarget, wxWindow *parent) :
wxEAPCredentialsConfigPanel(const eap::config_provider &prov, eap::config_method &cfg, LPCTSTR pszCredTarget, wxWindow *parent) :
m_prov(prov),
m_cfg(cfg),
m_target(pszCredTarget),
@ -372,7 +366,7 @@ protected:
protected:
const eap::config_provider &m_prov; ///< EAP provider
_Tmeth &m_cfg; ///< EAP configuration
eap::config_method &m_cfg; ///< EAP method configuration
winstd::library m_shell32; ///< shell32.dll resource library reference
wxIcon m_icon; ///< Panel icon
winstd::tstring m_target; ///< Credential Manager target

View File

@ -25,7 +25,7 @@
///
/// PAP credential configuration panel
///
typedef wxEAPCredentialsConfigPanel<eap::config_method_pap, wxPasswordCredentialsPanel> wxPAPCredentialsConfigPanel;
typedef wxEAPCredentialsConfigPanel<wxPasswordCredentialsPanel> wxPAPCredentialsConfigPanel;
///
/// PAP configuration panel

View File

@ -68,7 +68,7 @@ class wxTLSServerTrustPanel;
///
/// TLS credentials configuration panel
///
typedef wxEAPCredentialsConfigPanel<eap::config_method_tls, wxTLSCredentialsPanel> wxTLSCredentialsConfigPanel;
typedef wxEAPCredentialsConfigPanel<wxTLSCredentialsPanel> wxTLSCredentialsConfigPanel;
///
/// TLS configuration panel

View File

@ -50,7 +50,7 @@ bool eap::peer_ttls_ui::invoke_config_ui(
wxTopLevelWindows.Append(&parent);
// Create and launch configuration dialog.
wxEAPConfigDialog<config_method_ttls, wxTTLSConfigWindow> dlg(cfg, &parent);
wxEAPConfigDialog<wxTTLSConfigWindow> dlg(cfg, &parent);
result = dlg.ShowModal();
wxTopLevelWindows.DeleteObject(&parent);