X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da865fdd325f7833246eecd665849b14f43e19d7..b16de7461ac6d97b0b04a5ce4e73447925e93416:/src/generic/helpext.cpp diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 49dae623f0..39c9f93735 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: helpext.cpp +// Name: src/generic/helpext.cpp // Purpose: an external help controller for wxWidgets // Author: Karsten Ballueder // Modified by: @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -# pragma implementation "wxexthlp.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -43,6 +39,10 @@ #include #endif +#ifdef __WINDOWS__ +#include "wx/msw/mslu.h" +#endif + #ifdef __WXMSW__ #include #include "wx/msw/winundef.h" @@ -74,7 +74,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; @@ -125,7 +126,7 @@ wxExtHelpController::DisplayHelp(const wxString &relativeURL) } return true; -#elif defined(__WXPM__) +#elif defined(__OS2__) wxString url; url << m_MapFile << '\\' << relativeURL.BeforeFirst('#'); @@ -237,9 +238,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 @@ -347,7 +346,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: @@ -465,4 +464,3 @@ void wxExtHelpController::OnQuit() #endif // wxUSE_HELP -