diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 00590c746..0fb4307a0 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -40,6 +40,7 @@ effects from this one class. #include #include #include +#include #include #include #include diff --git a/src/menus/HelpMenus.cpp b/src/menus/HelpMenus.cpp index 57aafd2e3..d203f7a37 100644 --- a/src/menus/HelpMenus.cpp +++ b/src/menus/HelpMenus.cpp @@ -13,6 +13,7 @@ #include "../commands/CommandContext.h" #include "../commands/CommandManager.h" #include "../widgets/HelpSystem.h" +#include "../widgets/LinkingHtmlWindow.h" #if defined(EXPERIMENTAL_CRASH_REPORT) #include diff --git a/src/widgets/ErrorDialog.h b/src/widgets/ErrorDialog.h index 04b5e242d..7d554e7e7 100644 --- a/src/widgets/ErrorDialog.h +++ b/src/widgets/ErrorDialog.h @@ -16,7 +16,6 @@ #include #include // to inherit -#include "LinkingHtmlWindow.h" #include "wxPanelWrapper.h" class AudacityProject; @@ -43,28 +42,6 @@ private: DECLARE_EVENT_TABLE() }; -// Helper class to make browser "simulate" a modal dialog -class HtmlTextHelpDialog final : public BrowserDialog -{ -public: - HtmlTextHelpDialog(wxWindow *pParent, const wxString &title) - : BrowserDialog{ pParent, title } - { -#if !wxCHECK_VERSION(3, 0, 0) - MakeModal( true ); -#endif - } - virtual ~HtmlTextHelpDialog() - { -#if !wxCHECK_VERSION(3, 0, 0) - MakeModal( false ); -#endif - // On Windows, for some odd reason, the Audacity window will be sent to - // the back. So, make sure that doesn't happen. - GetParent()->Raise(); - } -}; - /// Displays an error dialog with a button that offers help void ShowErrorDialog(wxWindow *parent, const wxString &dlogTitle, diff --git a/src/widgets/HelpSystem.cpp b/src/widgets/HelpSystem.cpp index fa1149966..a83f0cdbf 100644 --- a/src/widgets/HelpSystem.cpp +++ b/src/widgets/HelpSystem.cpp @@ -51,6 +51,32 @@ const wxString HelpSystem::HelpServerManDir = wxT("/man/"); const wxString HelpSystem::LocalHelpManDir = wxT("/man/"); const wxString HelpSystem::ReleaseSuffix = wxT(".html"); +namespace { + +// Helper class to make browser "simulate" a modal dialog +class HtmlTextHelpDialog final : public BrowserDialog +{ +public: + HtmlTextHelpDialog(wxWindow *pParent, const wxString &title) + : BrowserDialog{ pParent, title } + { +#if !wxCHECK_VERSION(3, 0, 0) + MakeModal( true ); +#endif + } + virtual ~HtmlTextHelpDialog() + { +#if !wxCHECK_VERSION(3, 0, 0) + MakeModal( false ); +#endif + // On Windows, for some odd reason, the Audacity window will be sent to + // the back. So, make sure that doesn't happen. + GetParent()->Raise(); + } +}; + +} + /// Mostly we use this so that we have the code for resizability /// in one place. Other considerations like screen readers are also /// handled by having the code in one place.