mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 07:39:42 +02:00
Add small help button to Prefs pages
This commit is contained in:
parent
b196c7de8d
commit
e16f6f9221
55
images/Help.xpm
Normal file
55
images/Help.xpm
Normal file
@ -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.........",
|
||||||
|
" ........==......... ",
|
||||||
|
" ................... ",
|
||||||
|
" .......==........ ",
|
||||||
|
" .......==........ ",
|
||||||
|
" ............... ",
|
||||||
|
" ............. ",
|
||||||
|
" ......... ",
|
||||||
|
" ..... "};
|
@ -103,14 +103,20 @@ for registering for changes.
|
|||||||
#include <wx/notebook.h>
|
#include <wx/notebook.h>
|
||||||
#include <wx/treectrl.h>
|
#include <wx/treectrl.h>
|
||||||
#include <wx/spinctrl.h>
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/bmpbuttn.h>
|
||||||
#include "Internat.h"
|
#include "Internat.h"
|
||||||
#include "Experimental.h"
|
#include "Experimental.h"
|
||||||
#include "Shuttle.h"
|
#include "Shuttle.h"
|
||||||
#include "WrappedType.h"
|
#include "WrappedType.h"
|
||||||
#include "widgets/wxPanelWrapper.h"
|
#include "widgets/wxPanelWrapper.h"
|
||||||
|
|
||||||
|
#include "../images/Help.xpm"
|
||||||
|
|
||||||
ShuttleGuiBase::ShuttleGuiBase(wxWindow * pParent, teShuttleMode ShuttleMode )
|
ShuttleGuiBase::ShuttleGuiBase(wxWindow * pParent, teShuttleMode ShuttleMode )
|
||||||
{
|
{
|
||||||
|
// Suppress warnings about the header file
|
||||||
|
wxUnusedVar(Help_xpm);
|
||||||
|
|
||||||
wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
|
wxASSERT( (pParent != NULL ) || ( ShuttleMode != eIsCreating));
|
||||||
|
|
||||||
mpParent = pParent;
|
mpParent = pParent;
|
||||||
@ -2168,7 +2174,10 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
|
|||||||
|
|
||||||
if( buttons & eHelpButton )
|
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)
|
if (buttons & ePreviewButton)
|
||||||
|
@ -3039,6 +3039,8 @@ bool EffectUIHost::Initialize()
|
|||||||
bar->SetSizerAndFit(bs.release());
|
bar->SetSizerAndFit(bs.release());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Add Help button
|
||||||
|
// long buttons = eApplyButton + eCloseButton + eHelpButton;
|
||||||
long buttons = eApplyButton + eCloseButton;
|
long buttons = eApplyButton + eCloseButton;
|
||||||
if (mEffect->mUIDebug)
|
if (mEffect->mUIDebug)
|
||||||
{
|
{
|
||||||
|
@ -407,6 +407,11 @@ bool DevicePrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString DevicePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Devices_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *DevicePrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *DevicePrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -29,6 +29,7 @@ class DevicePrefs final : public PrefsPanel
|
|||||||
DevicePrefs(wxWindow * parent);
|
DevicePrefs(wxWindow * parent);
|
||||||
virtual ~DevicePrefs();
|
virtual ~DevicePrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -264,6 +264,11 @@ bool DirectoriesPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString DirectoriesPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Directories_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *DirectoriesPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *DirectoriesPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -25,6 +25,7 @@ class DirectoriesPrefs final : public PrefsPanel
|
|||||||
~DirectoriesPrefs();
|
~DirectoriesPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
bool Validate() override;
|
bool Validate() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -168,6 +168,11 @@ bool EffectsPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString EffectsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Effects_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *EffectsPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *EffectsPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -28,6 +28,7 @@ class EffectsPrefs final : public PrefsPanel
|
|||||||
EffectsPrefs(wxWindow * parent);
|
EffectsPrefs(wxWindow * parent);
|
||||||
~EffectsPrefs();
|
~EffectsPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -668,6 +668,11 @@ void ExtImportPrefs::OnRuleTableCellClick (wxGridEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString ExtImportPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Extended_Import_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject)
|
ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject)
|
||||||
: wxDropTarget(dataObject)
|
: wxDropTarget(dataObject)
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,7 @@ class ExtImportPrefs final : public PrefsPanel
|
|||||||
ExtImportPrefs(wxWindow * parent);
|
ExtImportPrefs(wxWindow * parent);
|
||||||
~ExtImportPrefs();
|
~ExtImportPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
void OnPluginKeyDown(wxListEvent& event);
|
void OnPluginKeyDown(wxListEvent& event);
|
||||||
void OnPluginBeginDrag(wxListEvent& event);
|
void OnPluginBeginDrag(wxListEvent& event);
|
||||||
|
@ -225,6 +225,11 @@ bool GUIPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString GUIPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Interface_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *GUIPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *GUIPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -28,6 +28,7 @@ class GUIPrefs final : public PrefsPanel
|
|||||||
GUIPrefs(wxWindow * parent);
|
GUIPrefs(wxWindow * parent);
|
||||||
~GUIPrefs();
|
~GUIPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
static void GetRangeChoices(wxArrayString *pChoices, wxArrayString *pCodes);
|
static void GetRangeChoices(wxArrayString *pChoices, wxArrayString *pCodes);
|
||||||
|
|
||||||
|
@ -110,6 +110,11 @@ bool ImportExportPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString ImportExportPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Import_-_Export_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *ImportExportPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *ImportExportPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -27,6 +27,7 @@ class ImportExportPrefs final : public PrefsPanel
|
|||||||
ImportExportPrefs(wxWindow * parent);
|
ImportExportPrefs(wxWindow * parent);
|
||||||
~ImportExportPrefs();
|
~ImportExportPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -656,6 +656,11 @@ void KeyConfigPrefs::Cancel()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString KeyConfigPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Keyboard_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
//
|
//
|
||||||
// KeyConfigPrefs
|
// KeyConfigPrefs
|
||||||
@ -1187,6 +1192,11 @@ void KeyConfigPrefs::Cancel()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString KeyConfigPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Keyboard_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *KeyConfigPrefsFactory::Create(wxWindow *parent)
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
~KeyConfigPrefs();
|
~KeyConfigPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
void Cancel() override;
|
void Cancel() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
@ -109,6 +110,7 @@ class KeyConfigPrefs final : public PrefsPanel
|
|||||||
~KeyConfigPrefs();
|
~KeyConfigPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
void Cancel() override;
|
void Cancel() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -161,6 +161,11 @@ void ModulePrefs::SetModuleStatus(const wxString &fname, int iStatus){
|
|||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString ModulePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Modules_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *ModulePrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *ModulePrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -37,6 +37,7 @@ class ModulePrefs final : public PrefsPanel
|
|||||||
ModulePrefs(wxWindow * parent);
|
ModulePrefs(wxWindow * parent);
|
||||||
~ModulePrefs();
|
~ModulePrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
static int GetModuleStatus( const wxString &fname );
|
static int GetModuleStatus( const wxString &fname );
|
||||||
static void SetModuleStatus( const wxString &fname, int iStatus );
|
static void SetModuleStatus( const wxString &fname, int iStatus );
|
||||||
|
@ -197,6 +197,11 @@ bool MousePrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString MousePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Mouse_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *MousePrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *MousePrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -25,6 +25,7 @@ class MousePrefs final : public PrefsPanel
|
|||||||
MousePrefs(wxWindow * parent);
|
MousePrefs(wxWindow * parent);
|
||||||
~MousePrefs();
|
~MousePrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -123,6 +123,11 @@ bool PlaybackPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString PlaybackPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Playback_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *PlaybackPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *PlaybackPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -26,6 +26,7 @@ class PlaybackPrefs final : public PrefsPanel
|
|||||||
PlaybackPrefs(wxWindow * parent);
|
PlaybackPrefs(wxWindow * parent);
|
||||||
virtual ~PlaybackPrefs();
|
virtual ~PlaybackPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -70,11 +70,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../Theme.h"
|
#include "../Theme.h"
|
||||||
|
#include "../widgets/HelpSystem.h"
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper)
|
BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper)
|
||||||
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
|
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
|
||||||
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
||||||
EVT_BUTTON(wxID_APPLY, PrefsDialog::OnApply)
|
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
|
EVT_TREE_KEY_DOWN(wxID_ANY, PrefsDialog::OnTreeKeyDown) // Handles key events when tree has focus
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
@ -110,8 +112,30 @@ int wxTreebookExt::SetSelection(size_t n)
|
|||||||
static_cast<wxDialog*>(GetParent())->SetName( Temp );
|
static_cast<wxDialog*>(GetParent())->SetName( Temp );
|
||||||
|
|
||||||
PrefsPanel *const panel = static_cast<PrefsPanel *>(GetPage(n));
|
PrefsPanel *const panel = static_cast<PrefsPanel *>(GetPage(n));
|
||||||
|
const bool showHelp = (panel->HelpPageName() != wxEmptyString);
|
||||||
const bool showApply = panel->ShowsApplyButton();
|
const bool showApply = panel->ShowsApplyButton();
|
||||||
|
wxWindow *const helpButton = wxWindow::FindWindowById(wxID_HELP, GetParent());
|
||||||
wxWindow *const applyButton = wxWindow::FindWindowById(wxID_APPLY, 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
|
if (applyButton) { // might still be NULL during population
|
||||||
const bool changed = applyButton->Show(showApply);
|
const bool changed = applyButton->Show(showApply);
|
||||||
if (changed)
|
if (changed)
|
||||||
@ -265,7 +289,7 @@ PrefsDialog::PrefsDialog
|
|||||||
}
|
}
|
||||||
S.EndVerticalLay();
|
S.EndVerticalLay();
|
||||||
|
|
||||||
S.AddStandardButtons(eOkButton | eCancelButton | eApplyButton);
|
S.AddStandardButtons(eOkButton | eCancelButton | eApplyButton | eHelpButton);
|
||||||
static_cast<wxButton*>(wxWindow::FindWindowById(wxID_OK, this))->SetDefault();
|
static_cast<wxButton*>(wxWindow::FindWindowById(wxID_OK, this))->SetDefault();
|
||||||
|
|
||||||
if (mUniquePage && !mUniquePage->ShowsApplyButton()) {
|
if (mUniquePage && !mUniquePage->ShowsApplyButton()) {
|
||||||
@ -370,6 +394,12 @@ void PrefsDialog::OnApply(wxCommandEvent & WXUNUSED(event))
|
|||||||
mUniquePage->Apply();
|
mUniquePage->Apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PrefsDialog::OnHelp(wxCommandEvent & WXUNUSED(event))
|
||||||
|
{
|
||||||
|
PrefsPanel* panel = static_cast<PrefsPanel*>(mCategories->GetCurrentPage());
|
||||||
|
HelpSystem::ShowHelpDialog(this, panel->HelpPageName(), true);
|
||||||
|
}
|
||||||
|
|
||||||
void PrefsDialog::OnTreeKeyDown(wxTreeEvent & event)
|
void PrefsDialog::OnTreeKeyDown(wxTreeEvent & event)
|
||||||
{
|
{
|
||||||
if(event.GetKeyCode() == WXK_RETURN)
|
if(event.GetKeyCode() == WXK_RETURN)
|
||||||
@ -526,3 +556,8 @@ bool PrefsPanel::ShowsApplyButton()
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString PrefsPanel::HelpPageName()
|
||||||
|
{
|
||||||
|
return wxEmptyString;
|
||||||
|
}
|
||||||
|
@ -60,6 +60,7 @@ class PrefsDialog /* not final */ : public wxDialogWrapper
|
|||||||
void OnOK(wxCommandEvent & e);
|
void OnOK(wxCommandEvent & e);
|
||||||
void OnCancel(wxCommandEvent & e);
|
void OnCancel(wxCommandEvent & e);
|
||||||
void OnApply(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 OnTreeKeyDown(wxTreeEvent & e); // Used to dismiss the dialog when enter is pressed with focus on tree
|
||||||
|
|
||||||
void SelectPageByName(const wxString &pageName);
|
void SelectPageByName(const wxString &pageName);
|
||||||
|
@ -59,6 +59,10 @@ class PrefsPanel /* not final */ : public wxPanelWrapper
|
|||||||
// Default returns false
|
// Default returns false
|
||||||
virtual bool ShowsApplyButton();
|
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();
|
virtual void Cancel();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,6 +80,11 @@ bool ProjectsPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString ProjectsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Projects_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *ProjectsPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *ProjectsPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -27,6 +27,7 @@ class ProjectsPrefs final : public PrefsPanel
|
|||||||
ProjectsPrefs(wxWindow * parent);
|
ProjectsPrefs(wxWindow * parent);
|
||||||
~ProjectsPrefs();
|
~ProjectsPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -228,6 +228,11 @@ bool QualityPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString QualityPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Quality_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *QualityPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *QualityPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -30,6 +30,7 @@ class QualityPrefs final : public PrefsPanel
|
|||||||
virtual ~QualityPrefs();
|
virtual ~QualityPrefs();
|
||||||
|
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -245,6 +245,11 @@ void RecordingPrefs::OnToggleCustomName(wxCommandEvent & /* Evt */)
|
|||||||
mToggleCustomName->Enable(mUseCustomTrackName);
|
mToggleCustomName->Enable(mUseCustomTrackName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString RecordingPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Recording_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *RecordingPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -27,6 +27,7 @@ class RecordingPrefs final : public PrefsPanel
|
|||||||
RecordingPrefs(wxWindow * parent);
|
RecordingPrefs(wxWindow * parent);
|
||||||
virtual ~RecordingPrefs();
|
virtual ~RecordingPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -490,6 +490,11 @@ void SpectrumPrefs::EnableDisableSTFTOnlyControls()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString SpectrumPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Spectrograms_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)
|
BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)
|
||||||
EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize)
|
EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize)
|
||||||
EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults)
|
EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults)
|
||||||
|
@ -46,6 +46,7 @@ class SpectrumPrefs final : public PrefsPanel
|
|||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
bool ShowsApplyButton() override;
|
bool ShowsApplyButton() override;
|
||||||
bool Validate() override;
|
bool Validate() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate(size_t windowSize);
|
void Populate(size_t windowSize);
|
||||||
|
@ -109,6 +109,11 @@ bool TracksBehaviorsPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString TracksBehaviorsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Tracks_Behaviors_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ class TracksBehaviorsPrefs final : public PrefsPanel
|
|||||||
TracksBehaviorsPrefs(wxWindow * parent);
|
TracksBehaviorsPrefs(wxWindow * parent);
|
||||||
~TracksBehaviorsPrefs();
|
~TracksBehaviorsPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
static const wxChar *ScrollingPreferenceKey();
|
static const wxChar *ScrollingPreferenceKey();
|
||||||
static inline bool ScrollingPreferenceDefault() { return false; }
|
static inline bool ScrollingPreferenceDefault() { return false; }
|
||||||
|
@ -166,6 +166,11 @@ bool TracksPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString TracksPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Tracks_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *TracksPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *TracksPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -28,6 +28,7 @@ class TracksPrefs final : public PrefsPanel
|
|||||||
TracksPrefs(wxWindow * parent);
|
TracksPrefs(wxWindow * parent);
|
||||||
~TracksPrefs();
|
~TracksPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
static bool GetPinnedHeadPreference();
|
static bool GetPinnedHeadPreference();
|
||||||
static void SetPinnedHeadPreference(bool value, bool flush = false);
|
static void SetPinnedHeadPreference(bool value, bool flush = false);
|
||||||
|
@ -87,6 +87,11 @@ bool WarningsPrefs::Apply()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString WarningsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Warnings_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
PrefsPanel *WarningsPrefsFactory::Create(wxWindow *parent)
|
PrefsPanel *WarningsPrefsFactory::Create(wxWindow *parent)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -27,6 +27,7 @@ class WarningsPrefs final : public PrefsPanel
|
|||||||
WarningsPrefs(wxWindow * parent);
|
WarningsPrefs(wxWindow * parent);
|
||||||
~WarningsPrefs();
|
~WarningsPrefs();
|
||||||
bool Apply() override;
|
bool Apply() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user