mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 16:09:28 +02:00
Remove last use of TranslatableStringArray
This commit is contained in:
parent
0ddeec9c3b
commit
ea82d2c232
39
src/Tags.cpp
39
src/Tags.cpp
@ -735,33 +735,15 @@ 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{
|
||||||
{
|
LABEL_ARTIST,
|
||||||
static TranslatableString theNames[] =
|
LABEL_TITLE,
|
||||||
{
|
LABEL_ALBUM,
|
||||||
LABEL_ARTIST,
|
LABEL_TRACK,
|
||||||
LABEL_TITLE,
|
LABEL_YEAR,
|
||||||
LABEL_ALBUM,
|
LABEL_GENRE,
|
||||||
LABEL_TRACK,
|
LABEL_COMMENTS
|
||||||
LABEL_YEAR,
|
};
|
||||||
LABEL_GENRE,
|
|
||||||
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
|
||||||
{
|
{
|
||||||
@ -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);
|
||||||
|
@ -63,6 +63,4 @@ protected:
|
|||||||
ArrayType mContents;
|
ArrayType mContents;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TranslatableArray<wxArrayStringEx> TranslatableStringArray;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user