]> git.saurik.com Git - wxWidgets.git/commitdiff
wxHtmlHelpController can now use default wxConfig instance
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 17 Jan 2000 17:19:25 +0000 (17:19 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 17 Jan 2000 17:19:25 +0000 (17:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/hthelpct.tex
src/html/helpctrl.cpp

index 5bb81c932334edc5e70533a20fb800992ab36333..ca3d7a8a211fec2306a684fbed4a6f834a17baac 100644 (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}}
index 51de63e7713886e5d3d55b6265b9cea8d42e9b1e..58d03d42913048536ae196c0a67fcaf5759231bb 100644 (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);