Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
adc860fa6e | |||
d4cc3053a6 | |||
38c6189d5f | |||
bf4c4d846e | |||
5040ebba8e | |||
4598528765 | |||
8fbcf27f6a | |||
48d46617d2 | |||
e7d5ecb50b | |||
6a77f3f7b3 | |||
a4673f9fb9 | |||
c84a8b5a70 | |||
31a3b67cba |
Binary file not shown.
@@ -35,6 +35,9 @@ Suite of EAP supplicants for Microsoft Windows - IEEE 802.1X plug-ins for enterp
|
|||||||
- [CredWrite utility](https://github.com/Amebis/GEANTLink/tree/master/CredWrite) for automated user credential import to Credential Manager
|
- [CredWrite utility](https://github.com/Amebis/GEANTLink/tree/master/CredWrite) for automated user credential import to Credential Manager
|
||||||
- [WLANManager utility](https://github.com/Amebis/GEANTLink/tree/master/WLANManager) to allow network profile configuration dialog shortcuts
|
- [WLANManager utility](https://github.com/Amebis/GEANTLink/tree/master/WLANManager) to allow network profile configuration dialog shortcuts
|
||||||
|
|
||||||
|
## Download
|
||||||
|
Binaries are available for download [here](https://github.com/Amebis/GEANTLink/releases).
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
### Building Environment Requirements
|
### Building Environment Requirements
|
||||||
@@ -117,3 +120,6 @@ Command | Explanation
|
|||||||
`nmake SetupDebug` | Builds a debug version of project and debug MSI setup files. The resulting files can be found in `output\Setup` folder.
|
`nmake SetupDebug` | Builds a debug version of project and debug MSI setup files. The resulting files can be found in `output\Setup` folder.
|
||||||
|
|
||||||
The `/ls` flag can be appended to the commands above to reduce NMAKE’s verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
The `/ls` flag can be appended to the commands above to reduce NMAKE’s verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
||||||
|
|
||||||
|
### Translating into your language
|
||||||
|
GÉANTLink is fully localizable. We kindly invite you to help [translating it on Transifex](https://www.transifex.com/eduroam_devel/geantlink/).
|
||||||
|
@@ -90,7 +90,6 @@ static int WLANManager()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Launch WLAN profile config dialog.
|
// Launch WLAN profile config dialog.
|
||||||
// Note: When a debugger is attached to this process the WlanUIEditProfile() will raise an exception and fail.
|
|
||||||
WLAN_REASON_CODE wlrc;
|
WLAN_REASON_CODE wlrc;
|
||||||
DWORD dwResult = WlanUIEditProfile(WLAN_UI_API_VERSION, pwcArglist[2], &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, WLSecurityPage, NULL, &wlrc);
|
DWORD dwResult = WlanUIEditProfile(WLAN_UI_API_VERSION, pwcArglist[2], &(interfaces->InterfaceInfo[i].InterfaceGuid), NULL, WLSecurityPage, NULL, &wlrc);
|
||||||
if (dwResult != ERROR_SUCCESS) {
|
if (dwResult != ERROR_SUCCESS) {
|
||||||
@@ -119,6 +118,13 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In
|
|||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
UNREFERENCED_PARAMETER(nCmdShow);
|
UNREFERENCED_PARAMETER(nCmdShow);
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
// Note: When a debugger is attached to this process, the WlanUIEditProfile() will raise an exception and fail.
|
||||||
|
// It was accidentially discovered, that COM initialization resolves this issue.
|
||||||
|
com_initializer com_init(NULL);
|
||||||
|
|
||||||
{
|
{
|
||||||
// Initialize Windows XP visual styles
|
// Initialize Windows XP visual styles
|
||||||
INITCOMMONCONTROLSEX icc;
|
INITCOMMONCONTROLSEX icc;
|
||||||
@@ -129,7 +135,8 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In
|
|||||||
|
|
||||||
pfnWlanReasonCodeToString = WlanReasonCodeToString;
|
pfnWlanReasonCodeToString = WlanReasonCodeToString;
|
||||||
|
|
||||||
int res = WLANManager();
|
res = WLANManager();
|
||||||
|
}
|
||||||
|
|
||||||
assert(!_CrtDumpMemoryLeaks());
|
assert(!_CrtDumpMemoryLeaks());
|
||||||
return res;
|
return res;
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
// Product version as a single DWORD
|
// Product version as a single DWORD
|
||||||
// Note: Used for version comparison within C/C++ code.
|
// Note: Used for version comparison within C/C++ code.
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION 0x01020200
|
#define PRODUCT_VERSION 0x01020300
|
||||||
|
|
||||||
//
|
//
|
||||||
// Product version by components
|
// Product version by components
|
||||||
@@ -39,26 +39,26 @@
|
|||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_MAJ 1
|
#define PRODUCT_VERSION_MAJ 1
|
||||||
#define PRODUCT_VERSION_MIN 2
|
#define PRODUCT_VERSION_MIN 2
|
||||||
#define PRODUCT_VERSION_REV 2
|
#define PRODUCT_VERSION_REV 3
|
||||||
#define PRODUCT_VERSION_BUILD 0
|
#define PRODUCT_VERSION_BUILD 0
|
||||||
|
|
||||||
//
|
//
|
||||||
// Human readable product version and build year for UI
|
// Human readable product version and build year for UI
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_STR "1.2-beta1"
|
#define PRODUCT_VERSION_STR "1.2-beta2"
|
||||||
#define PRODUCT_BUILD_YEAR_STR "2016"
|
#define PRODUCT_BUILD_YEAR_STR "2016"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Numerical version presentation for ProductVersion propery in
|
// Numerical version presentation for ProductVersion propery in
|
||||||
// MSI packages (syntax: N.N[.N[.N]])
|
// MSI packages (syntax: N.N[.N[.N]])
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_INST "1.2.2"
|
#define PRODUCT_VERSION_INST "1.2.3"
|
||||||
|
|
||||||
//
|
//
|
||||||
// The product code for ProductCode property in MSI packages
|
// The product code for ProductCode property in MSI packages
|
||||||
// Replace with new on every version change, regardless how minor it is.
|
// Replace with new on every version change, regardless how minor it is.
|
||||||
//
|
//
|
||||||
#define PRODUCT_VERSION_GUID "{FF5DD25D-917C-4B33-81D3-C75B5E1C8CA8}"
|
#define PRODUCT_VERSION_GUID "{4C8DDB7D-3297-4B6A-ACF3-19702F85DE49}"
|
||||||
|
|
||||||
//
|
//
|
||||||
// Product vendor
|
// Product vendor
|
||||||
|
@@ -360,6 +360,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// Constructs a credential dialog
|
/// Constructs a credential dialog
|
||||||
///
|
///
|
||||||
|
/// \param[in] prov Provider configuration data
|
||||||
|
/// \param[in] parent Parent window
|
||||||
|
/// \param[in] id An identifier for the dialog. A value of -1 is taken to mean a default.
|
||||||
|
/// \param[in] title The title of the dialog
|
||||||
|
/// \param[in] pos The dialog position. The value \c wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] size The dialog size. The value \c wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] style The window style
|
||||||
|
///
|
||||||
wxEAPCredentialsDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("EAP Credentials"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
wxEAPCredentialsDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("EAP Credentials"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -108,10 +108,10 @@ void eap::config_method_eapgtc::load(_In_ IXMLDOMNode *pConfigRoot)
|
|||||||
} else
|
} else
|
||||||
throw invalid_argument(string_printf(__FUNCTION__ " Unsupported authentication mode (%ls).", (BSTR)auth_mode));
|
throw invalid_argument(string_printf(__FUNCTION__ " Unsupported authentication mode (%ls).", (BSTR)auth_mode));
|
||||||
|
|
||||||
|
m_module.log_config((xpath + L"/AuthMode").c_str(), (BSTR)auth_mode);
|
||||||
|
|
||||||
// Load method configuration.
|
// Load method configuration.
|
||||||
config_method_with_cred::load(pConfigRoot);
|
config_method_with_cred::load(pConfigRoot);
|
||||||
|
|
||||||
m_module.log_config((xpath + L"/AuthMode").c_str(), auth_mode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -100,6 +100,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// Constructs a credential dialog
|
/// Constructs a credential dialog
|
||||||
///
|
///
|
||||||
|
/// \param[in] prov Provider configuration data
|
||||||
|
/// \param[in] parent Parent window
|
||||||
|
/// \param[in] id An identifier for the dialog. A value of -1 is taken to mean a default.
|
||||||
|
/// \param[in] title The title of the dialog
|
||||||
|
/// \param[in] pos The dialog position. The value \c wxDefaultPosition indicates a default position, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] size The dialog size. The value \c wxDefaultSize indicates a default size, chosen by either the windowing system or wxWidgets, depending on platform.
|
||||||
|
/// \param[in] style The window style
|
||||||
|
///
|
||||||
wxGTCResponseDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("GTC Challenge"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
wxGTCResponseDialog(const eap::config_provider &prov, wxWindow *parent, wxWindowID id = wxID_ANY, const wxString &title = _("GTC Challenge"), const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -55,7 +55,6 @@ wxTLSServerTrustPanelBase::wxTLSServerTrustPanelBase( wxWindow* parent, wxWindow
|
|||||||
sb_root_ca_btn->Add( m_root_ca_add_file, 0, wxRIGHT|wxLEFT, 5 );
|
sb_root_ca_btn->Add( m_root_ca_add_file, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_root_ca_remove = new wxButton( sb_server_trust->GetStaticBox(), wxID_ANY, _("&Remove CA"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_root_ca_remove = new wxButton( sb_server_trust->GetStaticBox(), wxID_ANY, _("&Remove CA"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_root_ca_remove->Enable( false );
|
|
||||||
m_root_ca_remove->SetToolTip( _("Removes selected certificate authorities from the list") );
|
m_root_ca_remove->SetToolTip( _("Removes selected certificate authorities from the list") );
|
||||||
|
|
||||||
sb_root_ca_btn->Add( m_root_ca_remove, 0, wxLEFT, 5 );
|
sb_root_ca_btn->Add( m_root_ca_remove, 0, wxLEFT, 5 );
|
||||||
|
@@ -659,7 +659,7 @@
|
|||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="enabled">0</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
|
@@ -43,7 +43,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
static wxCriticalSection s_lock; ///< Initialization lock
|
static wxCriticalSection s_lock; ///< Initialization lock
|
||||||
static unsigned long s_init_ref_count; ///< Initialization reference counter
|
static unsigned long s_init_ref_count; ///< Initialization reference counter
|
||||||
static wxLocale s_locale; ///< Locale
|
static wxLocale *s_locale; ///< Locale
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -118,19 +118,27 @@ void eap::peer_ttls_ui::invoke_config_ui(
|
|||||||
// Initialize application.
|
// Initialize application.
|
||||||
wxInitializerPeer init(m_instance);
|
wxInitializerPeer init(m_instance);
|
||||||
|
|
||||||
{
|
wxWindow *parent;
|
||||||
|
if (hwndParent) {
|
||||||
// Create wxWidget-approved parent window.
|
// Create wxWidget-approved parent window.
|
||||||
wxWindow parent;
|
parent = new wxWindow;
|
||||||
parent.SetHWND((WXHWND)(hwndParent ? hwndParent : GetForegroundWindow()));
|
parent->SetHWND((WXHWND)hwndParent);
|
||||||
parent.AdoptAttributesFromHWND();
|
parent->AdoptAttributesFromHWND();
|
||||||
wxTopLevelWindows.Append(&parent);
|
wxTopLevelWindows.Append(parent);
|
||||||
|
} else
|
||||||
|
parent = NULL;
|
||||||
|
|
||||||
// Create and launch configuration dialog.
|
// Create and launch configuration dialog.
|
||||||
wxEAPConfigDialog<wxTTLSConfigWindow> dlg(cfg, &parent);
|
wxEAPConfigDialog<wxTTLSConfigWindow> dlg(cfg, parent);
|
||||||
|
if (!parent) {
|
||||||
|
FLASHWINFO fwi = { sizeof(FLASHWINFO), dlg.GetHWND(), FLASHW_ALL | FLASHW_TIMERNOFG };
|
||||||
|
::FlashWindowEx(&fwi);
|
||||||
|
}
|
||||||
result = dlg.ShowModal();
|
result = dlg.ShowModal();
|
||||||
|
|
||||||
wxTopLevelWindows.DeleteObject(&parent);
|
if (parent) {
|
||||||
parent.SetHWND((WXHWND)NULL);
|
wxTopLevelWindows.DeleteObject(parent);
|
||||||
|
parent->SetHWND((WXHWND)NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,6 +161,9 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
_Out_ DWORD *pdwUserDataOutSize,
|
_Out_ DWORD *pdwUserDataOutSize,
|
||||||
_Out_ LPWSTR *ppwszIdentity)
|
_Out_ LPWSTR *ppwszIdentity)
|
||||||
{
|
{
|
||||||
|
#ifdef _DEBUG
|
||||||
|
//::Sleep(10000);
|
||||||
|
#endif
|
||||||
assert(ppwszIdentity);
|
assert(ppwszIdentity);
|
||||||
|
|
||||||
// Unpack configuration.
|
// Unpack configuration.
|
||||||
@@ -178,19 +189,26 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
// Initialize application.
|
// Initialize application.
|
||||||
wxInitializerPeer init(m_instance);
|
wxInitializerPeer init(m_instance);
|
||||||
|
|
||||||
{
|
wxWindow *parent;
|
||||||
|
if (hwndParent) {
|
||||||
// Create wxWidget-approved parent window.
|
// Create wxWidget-approved parent window.
|
||||||
wxWindow parent;
|
parent = new wxWindow;
|
||||||
parent.SetHWND((WXHWND)(hwndParent ? hwndParent : GetForegroundWindow()));
|
parent->SetHWND((WXHWND)hwndParent);
|
||||||
parent.AdoptAttributesFromHWND();
|
parent->AdoptAttributesFromHWND();
|
||||||
wxTopLevelWindows.Append(&parent);
|
wxTopLevelWindows.Append(parent);
|
||||||
|
} else
|
||||||
|
parent = NULL;
|
||||||
|
|
||||||
if (cfg.m_providers.size() > 1) {
|
if (cfg.m_providers.size() > 1) {
|
||||||
// Multiple identity providers: User has to select one first.
|
// Multiple identity providers: User has to select one first.
|
||||||
wxEAPProviderSelectDialog dlg(cfg, &parent);
|
wxEAPProviderSelectDialog dlg(cfg, parent);
|
||||||
|
|
||||||
// Centre and display dialog.
|
// Centre and display dialog.
|
||||||
dlg.Centre(wxBOTH);
|
dlg.Centre(wxBOTH);
|
||||||
|
if (!parent) {
|
||||||
|
FLASHWINFO fwi = { sizeof(FLASHWINFO), dlg.GetHWND(), FLASHW_ALL | FLASHW_TIMERNOFG };
|
||||||
|
::FlashWindowEx(&fwi);
|
||||||
|
}
|
||||||
if ((result = dlg.ShowModal()) == wxID_OK) {
|
if ((result = dlg.ShowModal()) == wxID_OK) {
|
||||||
cfg_prov = dlg.GetSelection();
|
cfg_prov = dlg.GetSelection();
|
||||||
assert(cfg_prov);
|
assert(cfg_prov);
|
||||||
@@ -240,7 +258,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
src_outer != eap::credentials::source_config && eap::config_method::status_cred_begin <= cfg_method->m_last_status && cfg_method->m_last_status < eap::config_method::status_cred_end)
|
src_outer != eap::credentials::source_config && eap::config_method::status_cred_begin <= cfg_method->m_last_status && cfg_method->m_last_status < eap::config_method::status_cred_end)
|
||||||
{
|
{
|
||||||
// Build dialog to prompt for outer credentials.
|
// Build dialog to prompt for outer credentials.
|
||||||
wxEAPCredentialsDialog dlg(*cfg_prov, &parent);
|
wxEAPCredentialsDialog dlg(*cfg_prov, parent);
|
||||||
if (eap::config_method::status_cred_begin <= cfg_method->m_last_status && cfg_method->m_last_status < eap::config_method::status_cred_end)
|
if (eap::config_method::status_cred_begin <= cfg_method->m_last_status && cfg_method->m_last_status < eap::config_method::status_cred_end)
|
||||||
dlg.AddContent(new wxEAPCredentialWarningPanel(*cfg_prov, cfg_method->m_last_status, &dlg));
|
dlg.AddContent(new wxEAPCredentialWarningPanel(*cfg_prov, cfg_method->m_last_status, &dlg));
|
||||||
auto panel = new wxTLSCredentialsPanel(*cfg_prov, *cfg_method, *cred, &dlg, false);
|
auto panel = new wxTLSCredentialsPanel(*cfg_prov, *cfg_method, *cred, &dlg, false);
|
||||||
@@ -253,6 +271,10 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
|
|
||||||
// Centre and display dialog.
|
// Centre and display dialog.
|
||||||
dlg.Centre(wxBOTH);
|
dlg.Centre(wxBOTH);
|
||||||
|
if (!parent) {
|
||||||
|
FLASHWINFO fwi = { sizeof(FLASHWINFO), dlg.GetHWND(), FLASHW_ALL | FLASHW_TIMERNOFG };
|
||||||
|
::FlashWindowEx(&fwi);
|
||||||
|
}
|
||||||
if ((result = dlg.ShowModal()) == wxID_OK) {
|
if ((result = dlg.ShowModal()) == wxID_OK) {
|
||||||
// Write credentials to credential manager.
|
// Write credentials to credential manager.
|
||||||
if (panel->GetRemember()) {
|
if (panel->GetRemember()) {
|
||||||
@@ -290,7 +312,7 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// Native inner methods. Build dialog to prompt for inner credentials.
|
// Native inner methods. Build dialog to prompt for inner credentials.
|
||||||
wxEAPCredentialsDialog dlg(*cfg_prov, &parent);
|
wxEAPCredentialsDialog dlg(*cfg_prov, parent);
|
||||||
if (eap::config_method::status_cred_begin <= cfg_method->m_inner->m_last_status && cfg_method->m_inner->m_last_status < eap::config_method::status_cred_end)
|
if (eap::config_method::status_cred_begin <= cfg_method->m_inner->m_last_status && cfg_method->m_inner->m_last_status < eap::config_method::status_cred_end)
|
||||||
dlg.AddContent(new wxEAPCredentialWarningPanel(*cfg_prov, cfg_method->m_inner->m_last_status, &dlg));
|
dlg.AddContent(new wxEAPCredentialWarningPanel(*cfg_prov, cfg_method->m_inner->m_last_status, &dlg));
|
||||||
wxEAPCredentialsPanelBase *panel = NULL;
|
wxEAPCredentialsPanelBase *panel = NULL;
|
||||||
@@ -321,6 +343,10 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
|
|
||||||
// Centre and display dialog.
|
// Centre and display dialog.
|
||||||
dlg.Centre(wxBOTH);
|
dlg.Centre(wxBOTH);
|
||||||
|
if (!parent) {
|
||||||
|
FLASHWINFO fwi = { sizeof(FLASHWINFO), dlg.GetHWND(), FLASHW_ALL | FLASHW_TIMERNOFG };
|
||||||
|
::FlashWindowEx(&fwi);
|
||||||
|
}
|
||||||
if ((result = dlg.ShowModal()) == wxID_OK) {
|
if ((result = dlg.ShowModal()) == wxID_OK) {
|
||||||
// Write credentials to credential manager.
|
// Write credentials to credential manager.
|
||||||
if (panel->GetRemember()) {
|
if (panel->GetRemember()) {
|
||||||
@@ -374,8 +400,9 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTopLevelWindows.DeleteObject(&parent);
|
if (parent) {
|
||||||
parent.SetHWND((WXHWND)NULL);
|
wxTopLevelWindows.DeleteObject(parent);
|
||||||
|
parent->SetHWND((WXHWND)NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,12 +461,15 @@ void eap::peer_ttls_ui::invoke_interactive_ui(
|
|||||||
// Initialize application.
|
// Initialize application.
|
||||||
wxInitializerPeer init(m_instance);
|
wxInitializerPeer init(m_instance);
|
||||||
|
|
||||||
{
|
wxWindow *parent;
|
||||||
|
if (hwndParent) {
|
||||||
// Create wxWidget-approved parent window.
|
// Create wxWidget-approved parent window.
|
||||||
wxWindow parent;
|
parent = new wxWindow;
|
||||||
parent.SetHWND((WXHWND)(hwndParent ? hwndParent : GetForegroundWindow()));
|
parent->SetHWND((WXHWND)hwndParent);
|
||||||
parent.AdoptAttributesFromHWND();
|
parent->AdoptAttributesFromHWND();
|
||||||
wxTopLevelWindows.Append(&parent);
|
wxTopLevelWindows.Append(parent);
|
||||||
|
} else
|
||||||
|
parent = NULL;
|
||||||
|
|
||||||
{
|
{
|
||||||
sanitizing_wstring
|
sanitizing_wstring
|
||||||
@@ -447,7 +477,7 @@ void eap::peer_ttls_ui::invoke_interactive_ui(
|
|||||||
response;
|
response;
|
||||||
|
|
||||||
// Build dialog to prompt for response.
|
// Build dialog to prompt for response.
|
||||||
wxGTCResponseDialog dlg(*cfg_prov, &parent);
|
wxGTCResponseDialog dlg(*cfg_prov, parent);
|
||||||
auto panel = new wxGTCResponsePanel(response, challenge.c_str(), &dlg);
|
auto panel = new wxGTCResponsePanel(response, challenge.c_str(), &dlg);
|
||||||
dlg.AddContent(panel);
|
dlg.AddContent(panel);
|
||||||
|
|
||||||
@@ -457,6 +487,10 @@ void eap::peer_ttls_ui::invoke_interactive_ui(
|
|||||||
|
|
||||||
// Centre and display dialog.
|
// Centre and display dialog.
|
||||||
dlg.Centre(wxBOTH);
|
dlg.Centre(wxBOTH);
|
||||||
|
if (!parent) {
|
||||||
|
FLASHWINFO fwi = { sizeof(FLASHWINFO), dlg.GetHWND(), FLASHW_ALL | FLASHW_TIMERNOFG };
|
||||||
|
::FlashWindowEx(&fwi);
|
||||||
|
}
|
||||||
if ((result = dlg.ShowModal()) == wxID_OK) {
|
if ((result = dlg.ShowModal()) == wxID_OK) {
|
||||||
// Save response.
|
// Save response.
|
||||||
ctx.m_data.assign(
|
ctx.m_data.assign(
|
||||||
@@ -465,8 +499,9 @@ void eap::peer_ttls_ui::invoke_interactive_ui(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxTopLevelWindows.DeleteObject(&parent);
|
if (parent) {
|
||||||
parent.SetHWND((WXHWND)NULL);
|
wxTopLevelWindows.DeleteObject(parent);
|
||||||
|
parent->SetHWND((WXHWND)NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,9 +558,10 @@ wxInitializerPeer::wxInitializerPeer(_In_ HINSTANCE instance)
|
|||||||
|
|
||||||
// Do our wxWidgets configuration and localization initialization.
|
// Do our wxWidgets configuration and localization initialization.
|
||||||
wxInitializeConfig();
|
wxInitializeConfig();
|
||||||
if (wxInitializeLocale(s_locale)) {
|
s_locale = new wxLocale;
|
||||||
s_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion));
|
if (wxInitializeLocale(*s_locale)) {
|
||||||
s_locale.AddCatalog(wxT("EAPTTLSUI"));
|
s_locale->AddCatalog(wxT("wxExtend") wxT(wxExtendVersion));
|
||||||
|
s_locale->AddCatalog(wxT("EAPTTLSUI"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,9 +573,14 @@ wxInitializerPeer::~wxInitializerPeer()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
wxEntryCleanup();
|
wxEntryCleanup();
|
||||||
|
|
||||||
|
if (s_locale) {
|
||||||
|
delete s_locale;
|
||||||
|
s_locale = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxCriticalSection wxInitializerPeer::s_lock;
|
wxCriticalSection wxInitializerPeer::s_lock;
|
||||||
unsigned long wxInitializerPeer::s_init_ref_count = 0;
|
unsigned long wxInitializerPeer::s_init_ref_count = 0;
|
||||||
wxLocale wxInitializerPeer::s_locale;
|
wxLocale *wxInitializerPeer::s_locale = NULL;
|
||||||
|
Submodule lib/WinStd updated: 905fd066dc...90b60031df
Submodule lib/wxExtend updated: eb33a877d1...5ff1a95df2
Reference in New Issue
Block a user