X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..945d96f6e25215eb9adaf98a09942d1d0b94c35d:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 1a7b41339b..ca6194c4cc 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -38,6 +38,12 @@ #if wxUSE_HELP #include "wx/tipwin.h" #endif + + +#if wxUSE_LIBMSPACK +#include "wx/html/forcelnk.h" +FORCE_LINK(wxhtml_chm_support) +#endif IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase) @@ -131,7 +137,7 @@ void wxHtmlHelpController::CreateHelpWindow() { m_Config = wxConfigBase::Get(FALSE); if (m_Config != NULL) - m_ConfigRoot = _T("wxWindows/wxHtmlHelpController"); + m_ConfigRoot = _T("wxWidgets/wxHtmlHelpController"); } m_helpFrame = CreateHelpFrame(&m_helpData); @@ -142,6 +148,7 @@ void wxHtmlHelpController::CreateHelpWindow() m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle); m_helpFrame->SetTitleFormat(m_titleFormat); + m_helpFrame->Show(TRUE); } @@ -187,10 +194,15 @@ bool wxHtmlHelpController::Initialize(const wxString& file) { actualFilename = dir + filename + wxString(wxT(".hhp")); if (!wxFileExists(actualFilename)) - return FALSE; + { +#if wxUSE_LIBMSPACK + actualFilename = dir + filename + wxString(wxT(".chm")); + if (!wxFileExists(actualFilename)) +#endif + return false; + } } } - return AddBook(wxFileName(actualFilename)); } @@ -319,10 +331,11 @@ bool wxHtmlHelpController::DisplayIndex() return success; } -bool wxHtmlHelpController::KeywordSearch(const wxString& keyword) +bool wxHtmlHelpController::KeywordSearch(const wxString& keyword, + wxHelpSearchMode mode) { CreateHelpWindow(); - bool success = m_helpFrame->KeywordSearch(keyword); + bool success = m_helpFrame->KeywordSearch(keyword, mode); AddGrabIfNeeded(); return success; }