X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6a94433573bab16bcfe85985333323523e4b8517..bb69632a56a827bed4cfae842bfffa88259ac1aa:/src/html/htmlhelp.cpp diff --git a/src/html/htmlhelp.cpp b/src/html/htmlhelp.cpp index 71898962a1..8ea6466640 100644 --- a/src/html/htmlhelp.cpp +++ b/src/html/htmlhelp.cpp @@ -5,6 +5,10 @@ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// +#error This file should not be compiled! Update your build system! \ +(configure users, rerun configure to get a new Makefile) \ +Instead of htmlhelp[_io], use helpdata, helpfrm and helpctrl. This \ +file is only left to point out the problem and will be removed r.s.n. #ifdef __GNUG__ #pragma implementation "htmlhelp.h" @@ -19,10 +23,8 @@ #endif #ifndef WXPRECOMP -#include #endif - #include #include #include @@ -40,12 +42,17 @@ // Bitmaps: #ifndef __WXMSW__ -#include "bitmaps/panel.xpm" -#include "bitmaps/back.xpm" -#include "bitmaps/forward.xpm" -#include "bitmaps/book.xpm" -#include "bitmaps/folder.xpm" -#include "bitmaps/page.xpm" + // XPM hack: make the arrays const + #define static static const + + #include "bitmaps/panel.xpm" + #include "bitmaps/back.xpm" + #include "bitmaps/forward.xpm" + #include "bitmaps/book.xpm" + #include "bitmaps/folder.xpm" + #include "bitmaps/page.xpm" + + #undef static #endif #include "search.h" @@ -162,12 +169,12 @@ static char* ReadLine(char *line, char *buf) static wxString SafeFileName(const wxString& s) { wxString res = s; - res.Replace(":", "_", TRUE); - res.Replace(" ", "_", TRUE); - res.Replace("/", "_", TRUE); - res.Replace("\\", "_", TRUE); - res.Replace("#", "_", TRUE); - res.Replace(".", "_", TRUE); + res.Replace(_T(":"), _T("_"), TRUE); + res.Replace(_T(" "), _T("_"), TRUE); + res.Replace(_T("/"), _T("_"), TRUE); + res.Replace(_T("\\"), _T("_"), TRUE); + res.Replace(_T("#"), _T("_"), TRUE); + res.Replace(_T("."), _T("_"), TRUE); return res; } @@ -190,12 +197,12 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) int sz; char *buff, *lineptr; char linebuf[300]; - + wxString title = _("noname"), safetitle, start = wxEmptyString, contents = wxEmptyString, index = wxEmptyString; - + if (wxIsAbsolutePath(book)) bookFull = book; else bookFull = wxGetCwd() + "/" + book; @@ -255,7 +262,7 @@ bool wxHtmlHelpController::AddBook(const wxString& book, bool show_wait_msg) m_BookRecords.Add(bookr); if (m_IndexCnt > 0) qsort(m_Index, m_IndexCnt, sizeof(HtmlContentsItem), IndexCompareFunc); - + return TRUE; } @@ -372,14 +379,15 @@ class MyProgressDlg : public wxDialog public: bool m_Canceled; - MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1, - _("Searching..."), - wxPoint(0, 0), + MyProgressDlg(wxWindow *parent) : wxDialog(parent, -1, + _("Searching..."), + wxPoint(0, 0), #ifdef __WXGTK__ - wxSize(300, 110)) + wxSize(300, 110) #else - wxSize(300, 130)) + wxSize(300, 130) #endif + ) {m_Canceled = FALSE;} void OnCancel(wxCommandEvent& event) {m_Canceled = TRUE;} DECLARE_EVENT_TABLE() @@ -390,7 +398,7 @@ END_EVENT_TABLE() #endif - + bool wxHtmlHelpController::KeywordSearch(const wxString& keyword) { int foundcnt = 0;