X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/052e12db71e84fef1c7209daf931a056ad965918..c2517b27a82b168e28a76fbf518f107c1c87cd63:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 2137023534..5e68f95352 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -47,9 +47,25 @@ wxHtmlHelpController::~wxHtmlHelpController() { WriteCustomization(m_Config, m_ConfigRoot); if (m_helpFrame) - m_helpFrame->Close(); + DestroyHelpWindow(); } + +void wxHtmlHelpController::DestroyHelpWindow() +{ + //if (m_Config) WriteCustomization(m_Config, m_ConfigRoot); + if (m_helpFrame) + m_helpFrame->Destroy(); +} + +void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt) +{ + evt.Skip(); + + m_helpFrame = NULL; +} + + void wxHtmlHelpController::SetTitleFormat(const wxString& title) { m_titleFormat = title; @@ -77,6 +93,14 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) return retval; } + + +wxHtmlHelpFrame *wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData *data) +{ + return new wxHtmlHelpFrame(data); +} + + void wxHtmlHelpController::CreateHelpWindow() { if (m_helpFrame) { @@ -91,7 +115,7 @@ void wxHtmlHelpController::CreateHelpWindow() m_ConfigRoot = _T("wxWindows/wxHtmlHelpController"); } - m_helpFrame = new wxHtmlHelpFrame(&m_helpData); + m_helpFrame = CreateHelpFrame(&m_helpData); m_helpFrame->PushEventHandler(this); if (m_Config)