X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..46405e36bf9962b251e77e5048e96bf6a54edb15:/src/html/helpwnd.cpp diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp index 1bce8024ef..05a0f65f2b 100644 --- a/src/html/helpwnd.cpp +++ b/src/html/helpwnd.cpp @@ -273,8 +273,10 @@ void wxHtmlHelpWindow::Init(wxHtmlHelpData* data) m_mergedIndex = NULL; +#if wxUSE_CONFIG m_Config = NULL; m_ConfigRoot = wxEmptyString; +#endif // wxUSE_CONFIG m_Cfg.x = m_Cfg.y = wxDefaultCoord; m_Cfg.w = 700; @@ -315,10 +317,12 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, { m_hfStyle = helpStyle; +#if wxUSE_CONFIG // Do the config in two steps. We read the HtmlWindow customization after we // create the window. if (m_Config) ReadCustomization(m_Config, m_ConfigRoot); +#endif // wxUSE_CONFIG wxWindow::Create(parent, id, pos, size, style, wxT("wxHtmlHelp")); @@ -393,8 +397,10 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, topWindowSizer->Add(m_HtmlWin, 1, wxEXPAND); } +#if wxUSE_CONFIG if ( m_Config ) m_HtmlWin->ReadCustomization(m_Config, m_ConfigRoot); +#endif // wxUSE_CONFIG // contents tree panel? if ( helpStyle & wxHF_CONTENTS ) @@ -1029,13 +1035,13 @@ void wxHtmlHelpWindow::CreateIndex() m_IndexList->Clear(); - size_t cnt = m_mergedIndex->size(); + unsigned long cnt = m_mergedIndex->size(); wxString cnttext; if (cnt > INDEX_IS_SMALL) - cnttext.Printf(_("%i of %i"), 0, cnt); + cnttext.Printf(_("%d of %lu"), 0, cnt); else - cnttext.Printf(_("%i of %i"), cnt, cnt); + cnttext.Printf(_("%lu of %lu"), cnt, cnt); m_IndexCountInfo->SetLabel(cnttext); if (cnt > INDEX_IS_SMALL) return; @@ -1069,6 +1075,7 @@ void wxHtmlHelpWindow::RefreshLists() CreateSearch(); } +#if wxUSE_CONFIG void wxHtmlHelpWindow::ReadCustomization(wxConfigBase *cfg, const wxString& path) { wxString oldpath; @@ -1174,6 +1181,7 @@ void wxHtmlHelpWindow::WriteCustomization(wxConfigBase *cfg, const wxString& pat if (path != wxEmptyString) cfg->SetPath(oldpath); } +#endif // wxUSE_CONFIG static void SetFontsToHtmlWin(wxHtmlWindow *win, const wxString& scalf, const wxString& fixf, int size) {