X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74accc5015c73a25f3298b638c93e200fefa310c..56dade3c4d9b09f8bd290daf31a6b635aede029a:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 58d03d4291..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,7 +93,15 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) return retval; } -void wxHtmlHelpController::CreateHelpWindow(bool show_progress) + + +wxHtmlHelpFrame *wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData *data) +{ + return new wxHtmlHelpFrame(data); +} + + +void wxHtmlHelpController::CreateHelpWindow() { if (m_helpFrame) { m_helpFrame->Raise(); @@ -91,14 +115,13 @@ void wxHtmlHelpController::CreateHelpWindow(bool show_progress) m_ConfigRoot = _T("wxWindows/wxHtmlHelpController"); } - m_helpFrame = new wxHtmlHelpFrame(&m_helpData); + m_helpFrame = CreateHelpFrame(&m_helpData); m_helpFrame->PushEventHandler(this); if (m_Config) m_helpFrame->UseConfig(m_Config, m_ConfigRoot); m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle); - m_helpFrame->RefreshLists(show_progress); m_helpFrame->SetTitleFormat(m_titleFormat); m_helpFrame->Show(TRUE); }