1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 09:01:15 +02:00

ShuttleGui::AddChoice and TieChoice take TranslatableStrings

This commit is contained in:
Paul Licameli
2019-12-17 22:52:42 -05:00
parent 66097c34dc
commit 75996a851c
42 changed files with 174 additions and 179 deletions

View File

@@ -570,12 +570,13 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
.Position(wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL)
.AddChoice( {},
[&]{
wxArrayStringEx choices;
TranslatableStrings choices;
for (const auto &program : programs)
choices.push_back(wxString::FromUTF8(program.c_str()));
choices.push_back(
Verbatim(wxString::FromUTF8(program.c_str())));
return choices;
}(),
wxString::FromUTF8(mPlugin->getCurrentProgram().c_str())
Verbatim( wxString::FromUTF8(mPlugin->getCurrentProgram().c_str()) )
);
S.AddSpace(1, 1);
@@ -626,7 +627,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
mParameters[p].quantizeStep == 1.0 &&
!mParameters[p].valueNames.empty())
{
wxArrayStringEx choices;
TranslatableStrings choices;
int selected = -1;
for (size_t i = 0, cnt = mParameters[p].valueNames.size(); i < cnt; i++)
@@ -636,7 +637,7 @@ void VampEffect::PopulateOrExchange(ShuttleGui & S)
{
selected = i;
}
choices.push_back(choice);
choices.push_back( Verbatim( choice ) );
}
S.Id(ID_Choices + p);