Various events are propagated to parent classes now

This commit is contained in:
Simon Rozman 2016-09-30 10:58:46 +02:00
parent 1d4a77b96b
commit 13d84c3c4d
3 changed files with 37 additions and 14 deletions

View File

@ -261,9 +261,10 @@ wxEventMonitorFrame::~wxEventMonitorFrame()
}
void wxEventMonitorFrame::OnExit(wxCommandEvent& /*event*/)
void wxEventMonitorFrame::OnExit(wxCommandEvent& event)
{
Close();
event.Skip();
}

View File

@ -258,8 +258,10 @@ protected:
}
virtual void OnProvAdd(wxCommandEvent& /*event*/)
virtual void OnProvAdd(wxCommandEvent& event)
{
wxEAPConfigDialogBase::OnProvAdd(event);
// One method
std::unique_ptr<eap::config_method> cfg_method(m_cfg.m_module.make_config_method());
@ -288,8 +290,10 @@ protected:
}
virtual void OnProvRemove(wxCommandEvent& /*event*/)
virtual void OnProvRemove(wxCommandEvent& event)
{
wxEAPConfigDialogBase::OnProvRemove(event);
int idx = m_providers->GetSelection();
eap::config_provider &cfg_provider = ((_wxT*)m_providers->GetPage(idx))->GetProvider();
@ -308,8 +312,10 @@ protected:
}
virtual void OnProvAdvanced(wxCommandEvent& /*event*/)
virtual void OnProvAdvanced(wxCommandEvent& event)
{
wxEAPConfigDialogBase::OnProvAdvanced(event);
int idx = m_providers->GetSelection();
eap::config_provider &cfg_provider = ((_wxT*)m_providers->GetPage(idx))->GetProvider();
@ -681,8 +687,10 @@ protected:
}
virtual void OnSetStorage(wxCommandEvent& /*event*/)
virtual void OnSetStorage(wxCommandEvent& event)
{
wxEAPCredentialsConfigPanelBase::OnSetStorage(event);
m_timer_storage.Stop();
// Read credentials from Credential Manager.
@ -711,8 +719,10 @@ protected:
}
virtual void OnClearStorage(wxCommandEvent& /*event*/)
virtual void OnClearStorage(wxCommandEvent& event)
{
wxEAPCredentialsConfigPanelBase::OnClearStorage(event);
m_timer_storage.Stop();
if (CredDelete(m_cred_storage.target_name(m_prov.get_id().c_str(), m_cfg.m_level).c_str(), CRED_TYPE_GENERIC, 0)) {
@ -726,8 +736,10 @@ protected:
}
virtual void OnSetConfig(wxCommandEvent& /*event*/)
virtual void OnSetConfig(wxCommandEvent& event)
{
wxEAPCredentialsConfigPanelBase::OnSetConfig(event);
wxEAPCredentialsDialog dlg(m_prov, this);
_wxT *panel = new _wxT(m_prov, m_cfg, m_cred_config, &dlg, true);
@ -738,8 +750,10 @@ protected:
}
virtual void OnTimerStorage(wxTimerEvent& /*event*/)
virtual void OnTimerStorage(wxTimerEvent& event)
{
wxEAPCredentialsConfigPanelBase::OnTimerStorage(event);
if (m_storage_identity->IsShownOnScreen())
RetrieveStorageCredentials();
}
@ -928,8 +942,10 @@ protected:
return true;
}
virtual void OnPasswordText(wxCommandEvent& /*event*/)
virtual void OnPasswordText(wxCommandEvent& event)
{
wxEAPCredentialsPanel<_Tcred, _Tbase>::OnPasswordText(event);
m_password_set = true;
}

View File

@ -480,14 +480,18 @@ void wxTLSServerTrustPanel::OnUpdateUI(wxUpdateUIEvent& event)
void wxTLSServerTrustPanel::OnRootCADClick(wxCommandEvent& event)
{
wxTLSServerTrustPanelBase::OnRootCADClick(event);
wxCertificateClientData *cert = dynamic_cast<wxCertificateClientData*>(event.GetClientObject());
if (cert)
CryptUIDlgViewContext(CERT_STORE_CERTIFICATE_CONTEXT, cert->m_cert, this->GetHWND(), NULL, 0, NULL);
}
void wxTLSServerTrustPanel::OnRootCAAddStore(wxCommandEvent& /*event*/)
void wxTLSServerTrustPanel::OnRootCAAddStore(wxCommandEvent& event)
{
wxTLSServerTrustPanelBase::OnRootCAAddStore(event);
winstd::cert_store store;
if (store.create(NULL, _T("ROOT"))) {
winstd::cert_context cert;
@ -500,6 +504,8 @@ void wxTLSServerTrustPanel::OnRootCAAddStore(wxCommandEvent& /*event*/)
void wxTLSServerTrustPanel::OnRootCAAddFile(wxCommandEvent& event)
{
wxTLSServerTrustPanelBase::OnRootCAAddFile(event);
const wxString separator(wxT("|"));
wxFileDialog open_dialog(this, _("Add Certificate"), wxEmptyString, wxEmptyString,
_("Certificate Files (*.cer;*.crt;*.der;*.p7b;*.pem)") + separator + wxT("*.cer;*.crt;*.der;*.p7b;*.pem") + separator +
@ -507,10 +513,8 @@ void wxTLSServerTrustPanel::OnRootCAAddFile(wxCommandEvent& event)
_("PKCS #7 Certificate Files (*.p7b)") + separator + wxT("*.p7b") + separator +
_("All Files (*.*)") + separator + wxT("*.*"),
wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE);
if (open_dialog.ShowModal() == wxID_CANCEL) {
event.Skip();
if (open_dialog.ShowModal() == wxID_CANCEL)
return;
}
wxArrayString paths;
open_dialog.GetPaths(paths);
@ -526,8 +530,10 @@ void wxTLSServerTrustPanel::OnRootCAAddFile(wxCommandEvent& event)
}
void wxTLSServerTrustPanel::OnRootCARemove(wxCommandEvent& /*event*/)
void wxTLSServerTrustPanel::OnRootCARemove(wxCommandEvent& event)
{
wxTLSServerTrustPanelBase::OnRootCARemove(event);
wxArrayInt selections;
for (int i = m_root_ca->GetSelections(selections); i--; )
m_root_ca->Delete(selections[i]);