1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 15:53:52 +02:00

Bug1661: Default audio track name not being translated...

... Problem was introduced in 2.1.3 at:
8a6edf3623
This commit is contained in:
Paul Licameli
2017-07-21 17:22:48 -04:00
parent a9d8da62af
commit 1ef235c21c
4 changed files with 23 additions and 2 deletions

View File

@@ -158,6 +158,18 @@ void TracksPrefs::SetPinnedHeadPreference(bool value, bool flush)
gPrefs->Flush();
}
wxString TracksPrefs::GetDefaultAudioTrackNamePreference()
{
const auto name =
gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"), _(""));
if (name.empty())
// When nothing was specified,
// the default-default is whatever translation of...
return _("Audio Track");
else
return name;
}
bool TracksPrefs::Commit()
{
// Bug 1583: Clear the caching of the preference pinned state.
@@ -165,6 +177,12 @@ bool TracksPrefs::Commit()
ShuttleGui S(this, eIsSavingToPrefs);
PopulateOrExchange(S);
if (gPrefs->Read(wxT("/GUI/TrackNames/DefaultTrackName"),
_("Audio Track")) == _("Audio Track")) {
gPrefs->DeleteEntry(wxT("/GUI/TrackNames/DefaultTrackName"));
gPrefs->Flush();
}
return true;
}