From fe828a03f46181cc172bf61739fe09a043f73aea Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 13 Mar 2008 23:58:32 +0000 Subject: [PATCH] reverted Julian's r44600, it broke help window behavior so that it prevented apps from closing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/html/helpfrm.h | 2 +- samples/html/helpview/helpview.cpp | 2 -- src/html/helpfrm.cpp | 8 -------- utils/helpview/src/helpview.cpp | 2 -- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/wx/html/helpfrm.h b/include/wx/html/helpfrm.h index 13816fa3c1..c9bae539a0 100644 --- a/include/wx/html/helpfrm.h +++ b/include/wx/html/helpfrm.h @@ -109,7 +109,7 @@ public: // we don't want to prevent the app from closing just because a help window // remains opened - virtual bool ShouldPreventAppExit() const; + virtual bool ShouldPreventAppExit() const { return false; } protected: void Init(wxHtmlHelpData* data = NULL); diff --git a/samples/html/helpview/helpview.cpp b/samples/html/helpview/helpview.cpp index 238deea26a..3cb2b9bc4d 100644 --- a/samples/html/helpview/helpview.cpp +++ b/samples/html/helpview/helpview.cpp @@ -84,8 +84,6 @@ bool MyApp::OnInit() help -> DisplayContents(); - SetTopWindow(help->GetFrame()); - return true; } diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index ea22fa9b6e..9ce75d6435 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -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) @@ -246,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 diff --git a/utils/helpview/src/helpview.cpp b/utils/helpview/src/helpview.cpp index 68991f7467..72b3daa6a3 100644 --- a/utils/helpview/src/helpview.cpp +++ b/utils/helpview/src/helpview.cpp @@ -219,8 +219,6 @@ bool hvApp::OnInit() m_helpController->DisplayContents(); - SetTopWindow(m_helpController->GetFrame()); - return true; } -- 2.47.2