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

Don't hard-code the exhaustive list of sub-view types...

... in Wave track context menu and SetTrackVisualsCommand

Instead, discover them through a registry.

This eliminates some duplication of string constants and prepares for
non-intrusive generalization to more kinds of sub-views.

This makes the command agnostic about which subview types are known, but the
context menu still has special case treatment for Spectrogram Settings and
Wave Colors.
This commit is contained in:
Paul Licameli
2020-01-18 14:37:49 -05:00
parent fb8ba0ce43
commit 36aad4d1c6
7 changed files with 164 additions and 53 deletions

View File

@@ -87,9 +87,10 @@ public:
const wxString &Internal() const { return mInternal; }
const TranslatableString &Msgid() const { return mMsgid; }
const TranslatableString Stripped() const { return mMsgid.Stripped(); }
const wxString Translation() const { return mMsgid.Translation(); }
const wxString StrippedTranslation() const
{ return mMsgid.Stripped().Translation(); }
{ return Stripped().Translation(); }
bool empty() const { return mInternal.empty(); }