From 7d986b82d8a7a78d979217d7aa7aabcbf00a5210 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 30 Sep 2016 09:46:51 +0200 Subject: [PATCH] OnUpdateUI events are propagated to parent classes now --- lib/EAPBase_UI/include/EAP_UI.h | 8 ++++++-- lib/TLS_UI/src/TLS_UI.cpp | 8 ++++++-- lib/TTLS_UI/src/TTLS_UI.cpp | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index ed4026f..b82c83e 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -240,8 +240,10 @@ protected: } - virtual void OnUpdateUI(wxUpdateUIEvent& /*event*/) + virtual void OnUpdateUI(wxUpdateUIEvent& event) { + wxEAPConfigDialogBase::OnUpdateUI(event); + int idx = m_providers->GetSelection(); if (idx != wxNOT_FOUND) { eap::config_provider &cfg_provider = ((_wxT*)m_providers->GetPage(idx))->GetProvider(); @@ -630,8 +632,10 @@ protected: } - virtual void OnUpdateUI(wxUpdateUIEvent& /*event*/) + virtual void OnUpdateUI(wxUpdateUIEvent& event) { + wxEAPCredentialsConfigPanelBase::OnUpdateUI(event); + if (m_cfg.m_allow_save) { if (m_storage->GetValue()) { m_storage_identity->Enable(true); diff --git a/lib/TLS_UI/src/TLS_UI.cpp b/lib/TLS_UI/src/TLS_UI.cpp index 7fd432d..9acc0c9 100644 --- a/lib/TLS_UI/src/TLS_UI.cpp +++ b/lib/TLS_UI/src/TLS_UI.cpp @@ -382,8 +382,10 @@ bool wxTLSCredentialsPanel::TransferDataFromWindow() } -void wxTLSCredentialsPanel::OnUpdateUI(wxUpdateUIEvent& /*event*/) +void wxTLSCredentialsPanel::OnUpdateUI(wxUpdateUIEvent& event) { + wxEAPCredentialsPanel::OnUpdateUI(event); + if (!m_is_config && m_cfg.m_use_cred) { // Credential prompt mode & Using configured credentials m_certificate->Enable(false); @@ -452,8 +454,10 @@ bool wxTLSServerTrustPanel::TransferDataFromWindow() } -void wxTLSServerTrustPanel::OnUpdateUI(wxUpdateUIEvent& /*event*/) +void wxTLSServerTrustPanel::OnUpdateUI(wxUpdateUIEvent& event) { + wxTLSServerTrustPanelBase::OnUpdateUI(event); + if (m_prov.m_read_only) { // This is provider-locked configuration. Disable controls. m_root_ca_add_store->Enable(false); diff --git a/lib/TTLS_UI/src/TTLS_UI.cpp b/lib/TTLS_UI/src/TTLS_UI.cpp index 2105730..0eade7e 100644 --- a/lib/TTLS_UI/src/TTLS_UI.cpp +++ b/lib/TTLS_UI/src/TTLS_UI.cpp @@ -144,8 +144,10 @@ bool wxTTLSConfigPanel::TransferDataFromWindow() } -void wxTTLSConfigPanel::OnUpdateUI(wxUpdateUIEvent& /*event*/) +void wxTTLSConfigPanel::OnUpdateUI(wxUpdateUIEvent& event) { + wxTTLSConfigPanelBase::OnUpdateUI(event); + if (m_prov.m_read_only) { // This is provider-locked configuration. Disable controls. m_outer_identity_same ->Enable(false); @@ -290,7 +292,9 @@ void wxTTLSConfigWindow::OnInitDialog(wxInitDialogEvent& event) } -void wxTTLSConfigWindow::OnUpdateUI(wxUpdateUIEvent& /*event*/) +void wxTTLSConfigWindow::OnUpdateUI(wxUpdateUIEvent& event) { m_inner_type->GetChoiceCtrl()->Enable(!m_prov.m_read_only); + + event.Skip(); }