1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-12 07:35:51 +01:00

Remove last use of TranslatableStringArray

This commit is contained in:
Paul Licameli
2019-12-21 12:36:31 -05:00
parent 0ddeec9c3b
commit ea82d2c232
2 changed files with 11 additions and 30 deletions

View File

@@ -735,10 +735,7 @@ private:
#define LABEL_GENRE XO("Genre") #define LABEL_GENRE XO("Genre")
#define LABEL_COMMENTS XO("Comments") #define LABEL_COMMENTS XO("Comments")
static wxArrayString names() static TranslatableStrings names{
{
static TranslatableString theNames[] =
{
LABEL_ARTIST, LABEL_ARTIST,
LABEL_TITLE, LABEL_TITLE,
LABEL_ALBUM, LABEL_ALBUM,
@@ -748,21 +745,6 @@ static wxArrayString names()
LABEL_COMMENTS LABEL_COMMENTS
}; };
class NamesArray final : public TranslatableStringArray
{
void Populate() override
{
for (auto &name : theNames)
mContents.push_back( name.Translation() );
}
};
static NamesArray theArray;
// Yes, return array by value
return theArray.Get();
}
static const struct static const struct
{ {
TranslatableString label; TranslatableString label;
@@ -911,7 +893,8 @@ void TagsEditorDialog::PopulateOrExchange(ShuttleGui & S)
mGrid->SetColLabelSize(mGrid->GetDefaultRowSize()); mGrid->SetColLabelSize(mGrid->GetDefaultRowSize());
auto cs = names(); auto cs = transform_container<wxArrayStringEx>(
names, std::mem_fn( &TranslatableString::Translation ) );
// Build the initial (empty) grid // Build the initial (empty) grid
mGrid->CreateGrid(0, 2); mGrid->CreateGrid(0, 2);

View File

@@ -63,6 +63,4 @@ protected:
ArrayType mContents; ArrayType mContents;
}; };
typedef TranslatableArray<wxArrayStringEx> TranslatableStringArray;
#endif #endif