1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Remove overload of NewIdentifier that was used only once

This commit is contained in:
Paul Licameli
2019-01-07 13:18:48 -05:00
parent 6d093019ef
commit 1e52400936
2 changed files with 17 additions and 50 deletions

View File

@@ -568,18 +568,23 @@ void CommandManager::AddItemList(const CommandID & name,
{ {
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 translated = items[i].Translation();
CommandListEntry *entry = NewIdentifier(name, auto stripped = translated.BeforeFirst(wxT('\t'));
translated, auto accel = translated.AfterFirst(wxT('\t'));
translated, CommandListEntry *entry =
// No means yet to specify ! NewIdentifier(name,
stripped,
stripped,
// No means yet to specify hasDialog !
false, false,
accel,
CurrentMenu(), CurrentMenu(),
finder, finder,
callback, callback,
items[i].Internal(), items[i].Internal(),
i, i,
cnt, cnt,
bIsEffect); bIsEffect,
{});
entry->flags = flags; entry->flags = flags;
CurrentMenu()->Append(entry->id, GetLabel(entry)); CurrentMenu()->Append(entry->id, GetLabel(entry));
mbSeparatorAllowed = true; mbSeparatorAllowed = true;
@@ -651,33 +656,6 @@ int CommandManager::NextIdentifier(int ID)
///WARNING: Does this conflict with the identifiers set for controls/windows? ///WARNING: Does this conflict with the identifiers set for controls/windows?
///If it does, a workaround may be to keep controls below wxID_LOWEST ///If it does, a workaround may be to keep controls below wxID_LOWEST
///and keep menus above wxID_HIGHEST ///and keep menus above wxID_HIGHEST
CommandListEntry *CommandManager::NewIdentifier(const CommandID & name,
const wxString & label,
const wxString & longLabel,
bool hasDialog,
wxMenu *menu,
CommandHandlerFinder finder,
CommandFunctorPointer callback,
const CommandID &nameSuffix,
int index,
int count,
bool bIsEffect)
{
return NewIdentifier(name,
label.BeforeFirst(wxT('\t')),
longLabel.BeforeFirst(wxT('\t')),
hasDialog,
label.AfterFirst(wxT('\t')),
menu,
finder,
callback,
nameSuffix,
index,
count,
bIsEffect,
{});
}
CommandListEntry *CommandManager::NewIdentifier(const CommandID & nameIn, CommandListEntry *CommandManager::NewIdentifier(const CommandID & nameIn,
const wxString & label, const wxString & label,
const wxString & longLabel, const wxString & longLabel,

View File

@@ -315,17 +315,6 @@ private:
// //
int NextIdentifier(int ID); int NextIdentifier(int ID);
CommandListEntry *NewIdentifier(const CommandID & name,
const wxString & label,
const wxString & longLabel,
bool hasDialog,
wxMenu *menu,
CommandHandlerFinder finder,
CommandFunctorPointer callback,
const CommandID &nameSuffix,
int index,
int count,
bool bIsEffect);
CommandListEntry *NewIdentifier(const CommandID & name, CommandListEntry *NewIdentifier(const CommandID & name,
const wxString & label, const wxString & label,
const wxString & longLabel, const wxString & longLabel,