]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpfrm.cpp
fix for infinite sizing loop (partial patch 1907189)
[wxWidgets.git] / src / html / helpfrm.cpp
index a9983916f7258a737e103ac6937e82a09c0425fa..9ce75d64353a27376dc61b087bca006345aea979 100644 (file)
@@ -55,7 +55,6 @@
 #include "wx/fontenum.h"
 #include "wx/artprov.h"
 #include "wx/spinctrl.h"
-#include "wx/app.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpFrame, wxFrame)
 
@@ -85,12 +84,20 @@ void wxHtmlHelpFrame::Init(wxHtmlHelpData* data)
     m_helpController = (wxHtmlHelpController*) NULL;
 }
 
+void wxHtmlHelpFrame::SetController(wxHtmlHelpController* controller)
+{
+    m_helpController = controller;
+    if ( m_HtmlHelpWin )
+        m_HtmlHelpWin->SetController(controller);
+}
+
 // Create: builds the GUI components.
 bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
                              const wxString& WXUNUSED(title), int style,
                              wxConfigBase *config, const wxString& rootpath)
 {
     m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
+    m_HtmlHelpWin->SetController(m_helpController);
     if ( config)
         m_HtmlHelpWin->UseConfig(config, rootpath);
     
@@ -238,11 +245,4 @@ void wxHtmlHelpFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 }
 #endif
 
-// we don't want to prevent the app from closing just because a help window
-// remains opened
-bool wxHtmlHelpFrame::ShouldPreventAppExit() const
-{
-    return (wx_const_cast(wxHtmlHelpFrame*, this) == wxTheApp->GetTopWindow());
-}
-
 #endif // wxUSE_WXHTML_HELP