Compilation fixes in wxHTML for wxUSE_CONFIG==0.

Surround uses of wxConfig with #of wxUSE_CONFIG in wxHTML code.

Closes #11750.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-02-25 00:03:30 +00:00
parent 83b4d26c14
commit b42468496c
8 changed files with 67 additions and 15 deletions

View File

@@ -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 )
@@ -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)
{