1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

All things with an UpdatePrefs() message listen for an event...

... Still to do, improve the handling of updates of only subsets of the prefs
This commit is contained in:
Paul Licameli
2018-02-17 17:42:14 -05:00
parent cc635e0498
commit 62899a32f4
37 changed files with 198 additions and 136 deletions

View File

@@ -366,6 +366,12 @@ wxString GUIPrefs::GetLang()
return {};
}
int ShowClippingPrefsID()
{
static int value = wxNewId();
return value;
}
PrefsPanel::Factory
GUIPrefsFactory = [](wxWindow *parent, wxWindowID winid)
{

View File

@@ -67,4 +67,7 @@ class GUIPrefs final : public PrefsPanel
/// A PrefsPanel::Factory that creates one GUIPrefs panel.
extern PrefsPanel::Factory GUIPrefsFactory;
int ShowClippingPrefsID();
#endif

View File

@@ -850,9 +850,6 @@ void PrefsDialog::OnOK(wxCommandEvent & WXUNUSED(event))
// LL: wxMac can't handle recreating the menus when this dialog is still active,
// so AudacityProject::UpdatePrefs() or any of the routines it calls must
// not cause MenuCreator::RebuildMenuBar() to be executed.
for (size_t i = 0; i < gAudacityProjects.size(); i++) {
gAudacityProjects[i]->UpdatePrefs();
}
wxTheApp->AddPendingEvent(wxCommandEvent{ EVT_PREFS_UPDATE });