1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-09 06:06:24 +01:00

Reimplement PrefsListener without wx/app.h or wxCommandEvent...

... so that Prefs depends only on the allowed subset of wxBase
This commit is contained in:
Paul Licameli
2021-07-19 22:08:27 -04:00
parent a0ad72d967
commit a2f109de2e
7 changed files with 41 additions and 25 deletions

View File

@@ -331,8 +331,7 @@ void OnShowClipping(const CommandContext &context)
gPrefs->Flush();
commandManager.Check(wxT("ShowClipping"), checked);
wxTheApp->AddPendingEvent(wxCommandEvent{
EVT_PREFS_UPDATE, ShowClippingPrefsID() });
PrefsListener::Broadcast(ShowClippingPrefsID());
trackPanel.Refresh(false);
}
@@ -348,8 +347,7 @@ void OnShowNameOverlay(const CommandContext &context)
gPrefs->Flush();
commandManager.Check(wxT("ShowTrackNameInWaveform"), checked);
wxTheApp->AddPendingEvent(wxCommandEvent{
EVT_PREFS_UPDATE, ShowTrackNameInWaveformPrefsID() });
PrefsListener::Broadcast(ShowTrackNameInWaveformPrefsID());
trackPanel.Refresh(false);
}