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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user