From e16f6f922161be2f05a6334383f545b1c21b558a Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Sun, 14 May 2017 16:19:54 +0100 Subject: [PATCH] Add small help button to Prefs pages --- images/Help.xpm | 55 ++++++++++++++++++++++++++++++ src/ShuttleGui.cpp | 11 +++++- src/effects/Effect.cpp | 2 ++ src/prefs/DevicePrefs.cpp | 5 +++ src/prefs/DevicePrefs.h | 1 + src/prefs/DirectoriesPrefs.cpp | 5 +++ src/prefs/DirectoriesPrefs.h | 1 + src/prefs/EffectsPrefs.cpp | 5 +++ src/prefs/EffectsPrefs.h | 1 + src/prefs/ExtImportPrefs.cpp | 5 +++ src/prefs/ExtImportPrefs.h | 1 + src/prefs/GUIPrefs.cpp | 5 +++ src/prefs/GUIPrefs.h | 1 + src/prefs/ImportExportPrefs.cpp | 5 +++ src/prefs/ImportExportPrefs.h | 1 + src/prefs/KeyConfigPrefs.cpp | 10 ++++++ src/prefs/KeyConfigPrefs.h | 2 ++ src/prefs/ModulePrefs.cpp | 5 +++ src/prefs/ModulePrefs.h | 1 + src/prefs/MousePrefs.cpp | 5 +++ src/prefs/MousePrefs.h | 1 + src/prefs/PlaybackPrefs.cpp | 5 +++ src/prefs/PlaybackPrefs.h | 1 + src/prefs/PrefsDialog.cpp | 37 +++++++++++++++++++- src/prefs/PrefsDialog.h | 1 + src/prefs/PrefsPanel.h | 4 +++ src/prefs/ProjectsPrefs.cpp | 5 +++ src/prefs/ProjectsPrefs.h | 1 + src/prefs/QualityPrefs.cpp | 5 +++ src/prefs/QualityPrefs.h | 1 + src/prefs/RecordingPrefs.cpp | 5 +++ src/prefs/RecordingPrefs.h | 1 + src/prefs/SpectrumPrefs.cpp | 5 +++ src/prefs/SpectrumPrefs.h | 1 + src/prefs/TracksBehaviorsPrefs.cpp | 5 +++ src/prefs/TracksBehaviorsPrefs.h | 1 + src/prefs/TracksPrefs.cpp | 5 +++ src/prefs/TracksPrefs.h | 1 + src/prefs/WarningsPrefs.cpp | 5 +++ src/prefs/WarningsPrefs.h | 1 + 40 files changed, 216 insertions(+), 2 deletions(-) create mode 100644 images/Help.xpm diff --git a/images/Help.xpm b/images/Help.xpm new file mode 100644 index 000000000..572cdf7ae --- /dev/null +++ b/images/Help.xpm @@ -0,0 +1,55 @@ +/* XPM */ +static const char * Help_xpm[] = { +"21 21 31 1", +" c None", +". c #6699FF", +"+ c #8CB2FE", +"@ c #CDDDFE", +"# c #F0F5FE", +"$ c #F9FAFE", +"% c #E4ECFE", +"& c #A4C2FE", +"* c #6698FE", +"= c #FFFFFF", +"- c #A9C5FE", +"; c #DAE6FE", +"> c #95B8FE", +", c #6D9DFE", +"' c #71A0FE", +") c #BFD4FE", +"! c #E9F0FE", +"~ c #F7F9FE", +"{ c #90B4FE", +"] c #C8DAFE", +"^ c #78A5FE", +"/ c #EEF3FE", +"( c #E3ECFE", +"_ c #6F9FFE", +": c #7CA7FE", +"< c #EDF2FE", +"[ c #E6EEFE", +"} c #DBE7FE", +"| c #87AEFE", +"1 c #FBFCFE", +"2 c #6799FE", +" ..... ", +" ......... ", +" ............. ", +" ............... ", +" .....+@#$%&*..... ", +" .....======-..... ", +" ......;>,')=!...... ", +" ..........,=~...... ", +"...........{=].......", +"..........^/(_.......", +".........:<['........", +".........}=|.........", +".........1=2.........", +" ........==......... ", +" ................... ", +" .......==........ ", +" .......==........ ", +" ............... ", +" ............. ", +" ......... ", +" ..... "}; diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index c8d376759..9580c62ab 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -103,14 +103,20 @@ for registering for changes. #include #include #include +#include #include "Internat.h" #include "Experimental.h" #include "Shuttle.h" #include "WrappedType.h" #include "widgets/wxPanelWrapper.h" +#include "../images/Help.xpm" + ShuttleGuiBase::ShuttleGuiBase(wxWindow * pParent, teShuttleMode ShuttleMode ) { + // Suppress warnings about the header file + wxUnusedVar(Help_xpm); + wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating)); mpParent = pParent; @@ -2168,7 +2174,10 @@ std::unique_ptr CreateStdButtonSizer(wxWindow *parent, long buttons, wx if( buttons & eHelpButton ) { - bs->AddButton(safenew wxButton(parent, wxID_HELP)); + // Replace standard Help button with smaller icon button. + // bs->AddButton(safenew wxButton(parent, wxID_HELP)); + b = new wxBitmapButton(parent, wxID_HELP, Help_xpm); + bs->AddButton( b ); } if (buttons & ePreviewButton) diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 7257a99e7..328cfa466 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -3039,6 +3039,8 @@ bool EffectUIHost::Initialize() bar->SetSizerAndFit(bs.release()); } + // TODO: Add Help button + // long buttons = eApplyButton + eCloseButton + eHelpButton; long buttons = eApplyButton + eCloseButton; if (mEffect->mUIDebug) { diff --git a/src/prefs/DevicePrefs.cpp b/src/prefs/DevicePrefs.cpp index 843fb4361..ae2f44e8f 100644 --- a/src/prefs/DevicePrefs.cpp +++ b/src/prefs/DevicePrefs.cpp @@ -407,6 +407,11 @@ bool DevicePrefs::Apply() return true; } +wxString DevicePrefs::HelpPageName() +{ + return "Devices_Preferences"; +} + PrefsPanel *DevicePrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/DevicePrefs.h b/src/prefs/DevicePrefs.h index 9a51acec8..148bd7b1a 100644 --- a/src/prefs/DevicePrefs.h +++ b/src/prefs/DevicePrefs.h @@ -29,6 +29,7 @@ class DevicePrefs final : public PrefsPanel DevicePrefs(wxWindow * parent); virtual ~DevicePrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/DirectoriesPrefs.cpp b/src/prefs/DirectoriesPrefs.cpp index 2327e3b96..d76cb25ec 100644 --- a/src/prefs/DirectoriesPrefs.cpp +++ b/src/prefs/DirectoriesPrefs.cpp @@ -264,6 +264,11 @@ bool DirectoriesPrefs::Apply() return true; } +wxString DirectoriesPrefs::HelpPageName() +{ + return "Directories_Preferences"; +} + PrefsPanel *DirectoriesPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/DirectoriesPrefs.h b/src/prefs/DirectoriesPrefs.h index d9ebdcc04..6735f402d 100644 --- a/src/prefs/DirectoriesPrefs.h +++ b/src/prefs/DirectoriesPrefs.h @@ -25,6 +25,7 @@ class DirectoriesPrefs final : public PrefsPanel ~DirectoriesPrefs(); bool Apply() override; bool Validate() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/EffectsPrefs.cpp b/src/prefs/EffectsPrefs.cpp index 8d42b74eb..7c421cced 100644 --- a/src/prefs/EffectsPrefs.cpp +++ b/src/prefs/EffectsPrefs.cpp @@ -168,6 +168,11 @@ bool EffectsPrefs::Apply() return true; } +wxString EffectsPrefs::HelpPageName() +{ + return "Effects_Preferences"; +} + PrefsPanel *EffectsPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/EffectsPrefs.h b/src/prefs/EffectsPrefs.h index 6a914685d..946240201 100644 --- a/src/prefs/EffectsPrefs.h +++ b/src/prefs/EffectsPrefs.h @@ -28,6 +28,7 @@ class EffectsPrefs final : public PrefsPanel EffectsPrefs(wxWindow * parent); ~EffectsPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/ExtImportPrefs.cpp b/src/prefs/ExtImportPrefs.cpp index e54eb9ed2..2dd7478b0 100644 --- a/src/prefs/ExtImportPrefs.cpp +++ b/src/prefs/ExtImportPrefs.cpp @@ -668,6 +668,11 @@ void ExtImportPrefs::OnRuleTableCellClick (wxGridEvent& event) event.Skip(); } +wxString ExtImportPrefs::HelpPageName() +{ + return "Extended_Import_Preferences"; +} + ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject) : wxDropTarget(dataObject) { diff --git a/src/prefs/ExtImportPrefs.h b/src/prefs/ExtImportPrefs.h index 7d27d0fb1..3f531ce10 100644 --- a/src/prefs/ExtImportPrefs.h +++ b/src/prefs/ExtImportPrefs.h @@ -49,6 +49,7 @@ class ExtImportPrefs final : public PrefsPanel ExtImportPrefs(wxWindow * parent); ~ExtImportPrefs(); bool Apply() override; + wxString HelpPageName() override; void OnPluginKeyDown(wxListEvent& event); void OnPluginBeginDrag(wxListEvent& event); diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp index 9a6c0240b..f46b66ebe 100644 --- a/src/prefs/GUIPrefs.cpp +++ b/src/prefs/GUIPrefs.cpp @@ -225,6 +225,11 @@ bool GUIPrefs::Apply() return true; } +wxString GUIPrefs::HelpPageName() +{ + return "Interface_Preferences"; +} + PrefsPanel *GUIPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/GUIPrefs.h b/src/prefs/GUIPrefs.h index 66c22cd7d..0a67a66a3 100644 --- a/src/prefs/GUIPrefs.h +++ b/src/prefs/GUIPrefs.h @@ -28,6 +28,7 @@ class GUIPrefs final : public PrefsPanel GUIPrefs(wxWindow * parent); ~GUIPrefs(); bool Apply() override; + wxString HelpPageName() override; static void GetRangeChoices(wxArrayString *pChoices, wxArrayString *pCodes); diff --git a/src/prefs/ImportExportPrefs.cpp b/src/prefs/ImportExportPrefs.cpp index 01a5e0d14..6817573d0 100644 --- a/src/prefs/ImportExportPrefs.cpp +++ b/src/prefs/ImportExportPrefs.cpp @@ -110,6 +110,11 @@ bool ImportExportPrefs::Apply() return true; } +wxString ImportExportPrefs::HelpPageName() +{ + return "Import_-_Export_Preferences"; +} + PrefsPanel *ImportExportPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/ImportExportPrefs.h b/src/prefs/ImportExportPrefs.h index daa5710bd..3e194d953 100644 --- a/src/prefs/ImportExportPrefs.h +++ b/src/prefs/ImportExportPrefs.h @@ -27,6 +27,7 @@ class ImportExportPrefs final : public PrefsPanel ImportExportPrefs(wxWindow * parent); ~ImportExportPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/KeyConfigPrefs.cpp b/src/prefs/KeyConfigPrefs.cpp index 7d6a1cfaa..ad24b574e 100644 --- a/src/prefs/KeyConfigPrefs.cpp +++ b/src/prefs/KeyConfigPrefs.cpp @@ -656,6 +656,11 @@ void KeyConfigPrefs::Cancel() return; } +wxString KeyConfigPrefs::HelpPageName() +{ + return "Keyboard_Preferences"; +} + #else // // KeyConfigPrefs @@ -1187,6 +1192,11 @@ void KeyConfigPrefs::Cancel() return; } +wxString KeyConfigPrefs::HelpPageName() +{ + return "Keyboard_Preferences"; +} + #endif PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent) diff --git a/src/prefs/KeyConfigPrefs.h b/src/prefs/KeyConfigPrefs.h index 1823ba40f..07dceb2a4 100644 --- a/src/prefs/KeyConfigPrefs.h +++ b/src/prefs/KeyConfigPrefs.h @@ -41,6 +41,7 @@ public: ~KeyConfigPrefs(); bool Apply() override; void Cancel() override; + wxString HelpPageName() override; private: void Populate(); @@ -109,6 +110,7 @@ class KeyConfigPrefs final : public PrefsPanel ~KeyConfigPrefs(); bool Apply() override; void Cancel() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/ModulePrefs.cpp b/src/prefs/ModulePrefs.cpp index 676d6ff0a..579f6f88a 100644 --- a/src/prefs/ModulePrefs.cpp +++ b/src/prefs/ModulePrefs.cpp @@ -161,6 +161,11 @@ void ModulePrefs::SetModuleStatus(const wxString &fname, int iStatus){ gPrefs->Flush(); } +wxString ModulePrefs::HelpPageName() +{ + return "Modules_Preferences"; +} + PrefsPanel *ModulePrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/ModulePrefs.h b/src/prefs/ModulePrefs.h index 3cf574d2b..5d6ead6fc 100644 --- a/src/prefs/ModulePrefs.h +++ b/src/prefs/ModulePrefs.h @@ -37,6 +37,7 @@ class ModulePrefs final : public PrefsPanel ModulePrefs(wxWindow * parent); ~ModulePrefs(); bool Apply() override; + wxString HelpPageName() override; static int GetModuleStatus( const wxString &fname ); static void SetModuleStatus( const wxString &fname, int iStatus ); diff --git a/src/prefs/MousePrefs.cpp b/src/prefs/MousePrefs.cpp index 61057b36b..abf49f6a4 100644 --- a/src/prefs/MousePrefs.cpp +++ b/src/prefs/MousePrefs.cpp @@ -197,6 +197,11 @@ bool MousePrefs::Apply() return true; } +wxString MousePrefs::HelpPageName() +{ + return "Mouse_Preferences"; +} + PrefsPanel *MousePrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/MousePrefs.h b/src/prefs/MousePrefs.h index 4cb91d2dd..a772fa4e8 100644 --- a/src/prefs/MousePrefs.h +++ b/src/prefs/MousePrefs.h @@ -25,6 +25,7 @@ class MousePrefs final : public PrefsPanel MousePrefs(wxWindow * parent); ~MousePrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/PlaybackPrefs.cpp b/src/prefs/PlaybackPrefs.cpp index b84942c10..598bb7d76 100644 --- a/src/prefs/PlaybackPrefs.cpp +++ b/src/prefs/PlaybackPrefs.cpp @@ -123,6 +123,11 @@ bool PlaybackPrefs::Apply() return true; } +wxString PlaybackPrefs::HelpPageName() +{ + return "Playback_Preferences"; +} + PrefsPanel *PlaybackPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/PlaybackPrefs.h b/src/prefs/PlaybackPrefs.h index 0385498d6..dd0823965 100644 --- a/src/prefs/PlaybackPrefs.h +++ b/src/prefs/PlaybackPrefs.h @@ -26,6 +26,7 @@ class PlaybackPrefs final : public PrefsPanel PlaybackPrefs(wxWindow * parent); virtual ~PlaybackPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/PrefsDialog.cpp b/src/prefs/PrefsDialog.cpp index fb9b65515..de3c28539 100644 --- a/src/prefs/PrefsDialog.cpp +++ b/src/prefs/PrefsDialog.cpp @@ -70,11 +70,13 @@ #endif #include "../Theme.h" +#include "../widgets/HelpSystem.h" BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper) EVT_BUTTON(wxID_OK, PrefsDialog::OnOK) EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel) EVT_BUTTON(wxID_APPLY, PrefsDialog::OnApply) + EVT_BUTTON(wxID_HELP, PrefsDialog::OnHelp) EVT_TREE_KEY_DOWN(wxID_ANY, PrefsDialog::OnTreeKeyDown) // Handles key events when tree has focus END_EVENT_TABLE() @@ -110,8 +112,30 @@ int wxTreebookExt::SetSelection(size_t n) static_cast(GetParent())->SetName( Temp ); PrefsPanel *const panel = static_cast(GetPage(n)); + const bool showHelp = (panel->HelpPageName() != wxEmptyString); const bool showApply = panel->ShowsApplyButton(); + wxWindow *const helpButton = wxWindow::FindWindowById(wxID_HELP, GetParent()); wxWindow *const applyButton = wxWindow::FindWindowById(wxID_APPLY, GetParent()); + + if (helpButton) { +#if defined(__WXMAC__) + // We don't appear to have accelerators on wxMac +#else + if (showHelp) { + wxAcceleratorEntry entries[1]; + entries[0].Set(wxACCEL_ALT, (int) 'H', wxID_HELP); + wxAcceleratorTable accel(1, entries); + this->SetAcceleratorTable(accel); + } + else { + this->SetAcceleratorTable(wxNullAcceleratorTable); + } +#endif + const bool changed = helpButton->Show(showHelp); + if (changed) + GetParent()->Layout(); + } + if (applyButton) { // might still be NULL during population const bool changed = applyButton->Show(showApply); if (changed) @@ -265,7 +289,7 @@ PrefsDialog::PrefsDialog } S.EndVerticalLay(); - S.AddStandardButtons(eOkButton | eCancelButton | eApplyButton); + S.AddStandardButtons(eOkButton | eCancelButton | eApplyButton | eHelpButton); static_cast(wxWindow::FindWindowById(wxID_OK, this))->SetDefault(); if (mUniquePage && !mUniquePage->ShowsApplyButton()) { @@ -370,6 +394,12 @@ void PrefsDialog::OnApply(wxCommandEvent & WXUNUSED(event)) mUniquePage->Apply(); } +void PrefsDialog::OnHelp(wxCommandEvent & WXUNUSED(event)) +{ + PrefsPanel* panel = static_cast(mCategories->GetCurrentPage()); + HelpSystem::ShowHelpDialog(this, panel->HelpPageName(), true); +} + void PrefsDialog::OnTreeKeyDown(wxTreeEvent & event) { if(event.GetKeyCode() == WXK_RETURN) @@ -526,3 +556,8 @@ bool PrefsPanel::ShowsApplyButton() { return false; } + +wxString PrefsPanel::HelpPageName() +{ + return wxEmptyString; +} diff --git a/src/prefs/PrefsDialog.h b/src/prefs/PrefsDialog.h index 766b43d14..b545d985e 100644 --- a/src/prefs/PrefsDialog.h +++ b/src/prefs/PrefsDialog.h @@ -60,6 +60,7 @@ class PrefsDialog /* not final */ : public wxDialogWrapper void OnOK(wxCommandEvent & e); void OnCancel(wxCommandEvent & e); void OnApply(wxCommandEvent & e); + void OnHelp(wxCommandEvent & e); void OnTreeKeyDown(wxTreeEvent & e); // Used to dismiss the dialog when enter is pressed with focus on tree void SelectPageByName(const wxString &pageName); diff --git a/src/prefs/PrefsPanel.h b/src/prefs/PrefsPanel.h index 364d88013..eddd78cd4 100644 --- a/src/prefs/PrefsPanel.h +++ b/src/prefs/PrefsPanel.h @@ -59,6 +59,10 @@ class PrefsPanel /* not final */ : public wxPanelWrapper // Default returns false virtual bool ShowsApplyButton(); + // If not empty string, the Help button is added below the panel + // Default returns empty string. + virtual wxString HelpPageName(); + virtual void Cancel(); }; diff --git a/src/prefs/ProjectsPrefs.cpp b/src/prefs/ProjectsPrefs.cpp index 2238a4fc7..1dc78cae4 100644 --- a/src/prefs/ProjectsPrefs.cpp +++ b/src/prefs/ProjectsPrefs.cpp @@ -80,6 +80,11 @@ bool ProjectsPrefs::Apply() return true; } +wxString ProjectsPrefs::HelpPageName() +{ + return "Projects_Preferences"; +} + PrefsPanel *ProjectsPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/ProjectsPrefs.h b/src/prefs/ProjectsPrefs.h index c5e040b87..4de10ab75 100644 --- a/src/prefs/ProjectsPrefs.h +++ b/src/prefs/ProjectsPrefs.h @@ -27,6 +27,7 @@ class ProjectsPrefs final : public PrefsPanel ProjectsPrefs(wxWindow * parent); ~ProjectsPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/QualityPrefs.cpp b/src/prefs/QualityPrefs.cpp index 91c3b20af..f27454b7c 100644 --- a/src/prefs/QualityPrefs.cpp +++ b/src/prefs/QualityPrefs.cpp @@ -228,6 +228,11 @@ bool QualityPrefs::Apply() return true; } +wxString QualityPrefs::HelpPageName() +{ + return "Quality_Preferences"; +} + PrefsPanel *QualityPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/QualityPrefs.h b/src/prefs/QualityPrefs.h index 3d37a5a22..d328c70ca 100644 --- a/src/prefs/QualityPrefs.h +++ b/src/prefs/QualityPrefs.h @@ -30,6 +30,7 @@ class QualityPrefs final : public PrefsPanel virtual ~QualityPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/RecordingPrefs.cpp b/src/prefs/RecordingPrefs.cpp index c29c1a159..7162ca8e3 100644 --- a/src/prefs/RecordingPrefs.cpp +++ b/src/prefs/RecordingPrefs.cpp @@ -245,6 +245,11 @@ void RecordingPrefs::OnToggleCustomName(wxCommandEvent & /* Evt */) mToggleCustomName->Enable(mUseCustomTrackName); } +wxString RecordingPrefs::HelpPageName() +{ + return "Recording_Preferences"; +} + PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/RecordingPrefs.h b/src/prefs/RecordingPrefs.h index 4ad617400..5ab947564 100644 --- a/src/prefs/RecordingPrefs.h +++ b/src/prefs/RecordingPrefs.h @@ -27,6 +27,7 @@ class RecordingPrefs final : public PrefsPanel RecordingPrefs(wxWindow * parent); virtual ~RecordingPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate(); diff --git a/src/prefs/SpectrumPrefs.cpp b/src/prefs/SpectrumPrefs.cpp index 5693778d0..94d8467cd 100644 --- a/src/prefs/SpectrumPrefs.cpp +++ b/src/prefs/SpectrumPrefs.cpp @@ -490,6 +490,11 @@ void SpectrumPrefs::EnableDisableSTFTOnlyControls() #endif } +wxString SpectrumPrefs::HelpPageName() +{ + return "Spectrograms_Preferences"; +} + BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel) EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize) EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults) diff --git a/src/prefs/SpectrumPrefs.h b/src/prefs/SpectrumPrefs.h index 53a3d72b4..d1a9e6255 100644 --- a/src/prefs/SpectrumPrefs.h +++ b/src/prefs/SpectrumPrefs.h @@ -46,6 +46,7 @@ class SpectrumPrefs final : public PrefsPanel bool Apply() override; bool ShowsApplyButton() override; bool Validate() override; + wxString HelpPageName() override; private: void Populate(size_t windowSize); diff --git a/src/prefs/TracksBehaviorsPrefs.cpp b/src/prefs/TracksBehaviorsPrefs.cpp index f759ac12b..293e0e162 100644 --- a/src/prefs/TracksBehaviorsPrefs.cpp +++ b/src/prefs/TracksBehaviorsPrefs.cpp @@ -109,6 +109,11 @@ bool TracksBehaviorsPrefs::Apply() return true; } +wxString TracksBehaviorsPrefs::HelpPageName() +{ + return "Tracks_Behaviors_Preferences"; +} + TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory() { } diff --git a/src/prefs/TracksBehaviorsPrefs.h b/src/prefs/TracksBehaviorsPrefs.h index 7a4c58ae1..50ac4a080 100644 --- a/src/prefs/TracksBehaviorsPrefs.h +++ b/src/prefs/TracksBehaviorsPrefs.h @@ -24,6 +24,7 @@ class TracksBehaviorsPrefs final : public PrefsPanel TracksBehaviorsPrefs(wxWindow * parent); ~TracksBehaviorsPrefs(); bool Apply() override; + wxString HelpPageName() override; static const wxChar *ScrollingPreferenceKey(); static inline bool ScrollingPreferenceDefault() { return false; } diff --git a/src/prefs/TracksPrefs.cpp b/src/prefs/TracksPrefs.cpp index 62d2b3cd6..c7ca98e58 100644 --- a/src/prefs/TracksPrefs.cpp +++ b/src/prefs/TracksPrefs.cpp @@ -166,6 +166,11 @@ bool TracksPrefs::Apply() return true; } +wxString TracksPrefs::HelpPageName() +{ + return "Tracks_Preferences"; +} + PrefsPanel *TracksPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/TracksPrefs.h b/src/prefs/TracksPrefs.h index f554e5944..06a4f8fcd 100644 --- a/src/prefs/TracksPrefs.h +++ b/src/prefs/TracksPrefs.h @@ -28,6 +28,7 @@ class TracksPrefs final : public PrefsPanel TracksPrefs(wxWindow * parent); ~TracksPrefs(); bool Apply() override; + wxString HelpPageName() override; static bool GetPinnedHeadPreference(); static void SetPinnedHeadPreference(bool value, bool flush = false); diff --git a/src/prefs/WarningsPrefs.cpp b/src/prefs/WarningsPrefs.cpp index 0ba2ba3f3..6a0268652 100644 --- a/src/prefs/WarningsPrefs.cpp +++ b/src/prefs/WarningsPrefs.cpp @@ -87,6 +87,11 @@ bool WarningsPrefs::Apply() return true; } +wxString WarningsPrefs::HelpPageName() +{ + return "Warnings_Preferences"; +} + PrefsPanel *WarningsPrefsFactory::Create(wxWindow *parent) { wxASSERT(parent); // to justify safenew diff --git a/src/prefs/WarningsPrefs.h b/src/prefs/WarningsPrefs.h index 7c7fd59a4..06e5440cb 100644 --- a/src/prefs/WarningsPrefs.h +++ b/src/prefs/WarningsPrefs.h @@ -27,6 +27,7 @@ class WarningsPrefs final : public PrefsPanel WarningsPrefs(wxWindow * parent); ~WarningsPrefs(); bool Apply() override; + wxString HelpPageName() override; private: void Populate();