X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fc65a0384df4007a96cd5bab98b0f7abef0af52..7ea1c917764fb2588fe1aadc75c49ba300f8cb2f:/src/generic/helpext.cpp diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index f52d28f367..1bf7d2b43d 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -18,7 +18,6 @@ #if wxUSE_HELP && !defined(__WXWINCE__) && (!defined(__WXMAC__) || defined(__WXMAC_OSX__)) #ifndef WX_PRECOMP - #include "wx/setup.h" #include "wx/string.h" #include "wx/utils.h" #include "wx/list.h" @@ -39,6 +38,10 @@ #include #endif +#ifdef __WINDOWS__ +#include "wx/msw/mslu.h" +#endif + #ifdef __WXMSW__ #include #include "wx/msw/winundef.h" @@ -70,7 +73,8 @@ IMPLEMENT_CLASS(wxExtHelpController, wxHelpControllerBase) and a file mapping numerical Section numbers to relative URLS. */ -wxExtHelpController::wxExtHelpController() +wxExtHelpController::wxExtHelpController(wxWindow* parentWindow): + wxHelpControllerBase(parentWindow) { m_MapList = (wxList*) NULL; m_NumOfEntries = 0; @@ -233,9 +237,7 @@ bool wxExtHelpController::LoadFile(const wxString& ifile) file = ifile; if(! wxIsAbsolutePath(file)) { - wxChar* f = wxGetWorkingDirectory(); - file = f; - delete[] f; // wxGetWorkingDirectory returns new memory + file = wxGetCwd(); #ifdef __WXMAC__ file << ifile; #else @@ -343,7 +345,7 @@ wxExtHelpController::DisplayContents() file << m_MapFile << WXEXTHELP_SEPARATOR << contents; if(file.Contains(wxT('#'))) file = file.BeforeLast(wxT('#')); - if(contents.Length() && wxFileExists(file)) + if(contents.length() && wxFileExists(file)) rc = DisplaySection(CONTENTS_ID); // if not found, open homemade toc: @@ -461,4 +463,3 @@ void wxExtHelpController::OnQuit() #endif // wxUSE_HELP -