From 74accc5015c73a25f3298b638c93e200fefa310c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 17 Jan 2000 17:19:25 +0000 Subject: [PATCH] wxHtmlHelpController can now use default wxConfig instance git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/hthelpct.tex | 5 +++++ src/html/helpctrl.cpp | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/latex/wx/hthelpct.tex b/docs/latex/wx/hthelpct.tex index 5bb81c9323..ca3d7a8a21 100644 --- a/docs/latex/wx/hthelpct.tex +++ b/docs/latex/wx/hthelpct.tex @@ -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}} diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 51de63e771..58d03d4291 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -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); -- 2.45.2