wxHtmlHelpController can now use default wxConfig instance

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2000-01-17 17:19:25 +00:00
parent 566bc3285e
commit 74accc5015
2 changed files with 15 additions and 1 deletions

View File

@ -157,6 +157,11 @@ reads and writes settings (including wxHtmlWindow's settings) when needed.
The only thing you must do is create wxConfig object and call UseConfig.
If you do not use {\it UseConfig}, wxHtmlHelpController will use
default wxConfig object if available (for details see
\helpref{wxConfigBase::Get}{wxconfigbaseget} and
\helpref{wxConfigBase::Set}{wxconfigbaseset}).
\membersection{wxHtmlHelpController::WriteCustomization}\label{wxhtmlhelpcontrollerwritecustomization}
\func{void}{WriteCustomization}{\param{wxConfigBase* }{cfg}, \param{wxString }{path = wxEmptyString}}

View File

@ -83,11 +83,20 @@ void wxHtmlHelpController::CreateHelpWindow(bool show_progress)
m_helpFrame->Raise();
return ;
}
m_helpFrame = new wxHtmlHelpFrame(&m_helpData);
if (m_Config == NULL)
{
m_Config = wxConfigBase::Get(FALSE);
if (m_Config != NULL)
m_ConfigRoot = _T("wxWindows/wxHtmlHelpController");
}
m_helpFrame = new wxHtmlHelpFrame(&m_helpData);
m_helpFrame->PushEventHandler(this);
if (m_Config)
m_helpFrame->UseConfig(m_Config, m_ConfigRoot);
m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle);
m_helpFrame->RefreshLists(show_progress);
m_helpFrame->SetTitleFormat(m_titleFormat);