1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 08:29:27 +02:00

AddItemList no longer parses names for accelerators...

... This capability was unused.  The only uses of item lists are in
TrackMenus.cpp, for aligning tracks.

The parsing of a translated string for encoded infomration was questionable.
This commit is contained in:
Paul Licameli 2019-12-12 10:45:55 -05:00
parent e4968761ad
commit db96d1ab10

View File

@ -561,12 +561,9 @@ void CommandManager::AddItemList(const CommandID & name,
bool bIsEffect) bool bIsEffect)
{ {
for (size_t i = 0, cnt = nItems; i < cnt; i++) { for (size_t i = 0, cnt = nItems; i < cnt; i++) {
auto translated = items[i].Translation();
auto stripped = translated.BeforeFirst(wxT('\t'));
auto accel = translated.AfterFirst(wxT('\t'));
CommandListEntry *entry = CommandListEntry *entry =
NewIdentifier(name, NewIdentifier(name,
stripped, items[i].Translation(),
// No means yet to specify hasDialog ! // No means yet to specify hasDialog !
false, false,
CurrentMenu(), CurrentMenu(),
@ -576,7 +573,6 @@ void CommandManager::AddItemList(const CommandID & name,
i, i,
cnt, cnt,
Options{} Options{}
.Accel(accel)
.IsEffect(bIsEffect)); .IsEffect(bIsEffect));
entry->flags = flags; entry->flags = flags;
CurrentMenu()->Append(entry->id, GetLabel(entry)); CurrentMenu()->Append(entry->id, GetLabel(entry));