X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5152b0e59aa09d885deeaa018642e0e96aff92d9..56acdfef2f2759bbc03c2fab5f7da25f6ca6d563:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 21a80600ec..1748fef73d 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -30,8 +30,13 @@ #include "wx/html/helpctrl.h" #include "wx/busyinfo.h" +#ifdef __WXGTK__ + // for the hack in AddGrabIfNeeded() + #include "wx/dialog.h" +#endif // __WXGTK__ + #if wxUSE_HELP -#include "wx/tipwin.h" + #include "wx/tipwin.h" #endif IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase) @@ -79,6 +84,11 @@ void wxHtmlHelpController::SetTitleFormat(const wxString& title) } +bool wxHtmlHelpController::AddBook(const wxFileName& book_file, bool show_wait_msg) +{ + return AddBook(wxFileSystem::FileNameToURL(book_file), show_wait_msg); +} + bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) { wxBusyCursor cur; @@ -166,7 +176,7 @@ bool wxHtmlHelpController::Initialize(const wxString& file) wxSplitPath(file, & dir, & filename, & ext); if (!dir.IsEmpty()) - dir = dir + wxString(wxT("/")); + dir = dir + wxFILE_SEP_PATH; // Try to find a suitable file wxString actualFilename = dir + filename + wxString(wxT(".zip")); @@ -181,7 +191,7 @@ bool wxHtmlHelpController::Initialize(const wxString& file) } } - return AddBook(actualFilename); + return AddBook(wxFileName(actualFilename)); } bool wxHtmlHelpController::LoadFile(const wxString& WXUNUSED(file)) @@ -274,7 +284,7 @@ void wxHtmlHelpController::AddGrabIfNeeded() if (needGrab && m_helpFrame) m_helpFrame->AddGrab(); -#endif +#endif // __WXGTK__ } bool wxHtmlHelpController::Display(const wxString& x)