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

Consistently compare to translation of "Command" in KeyView.cpp...

... note that "cat" compared with it is concatenated with _("Menu") and
stored in KeyNode::category, which is also compared elsewhere with
CommandTranslated.  So this change in one comparison is the right one.
This commit is contained in:
Paul Licameli 2020-05-06 11:56:16 -04:00
parent 44b30ca4e1
commit 1b2d4e26ba
2 changed files with 5 additions and 3 deletions

View File

@ -146,7 +146,7 @@ BEGIN_EVENT_TABLE(KeyView, wxVListBox)
EVT_SCROLLWIN(KeyView::OnScroll)
END_EVENT_TABLE();
wxString KeyView::CommandTranslated="Command";
static wxString CommandTranslated = "Command";
// ============================================================================
@ -656,6 +656,9 @@ KeyView::RefreshBindings(const CommandIDs & names,
bool incat = false;
bool inpfx = false;
// lookup translation once only
CommandTranslated = _("Command");
// Examine all names...all arrays passed have the same indexes
int cnt = (int) names.size();
for (int i = 0; i < cnt; i++)
@ -668,7 +671,7 @@ KeyView::RefreshBindings(const CommandIDs & names,
wxString pfx = wxMenuItem::GetLabelText(prefixes[i].Translation());
// Append "Menu" this node is for a menu title
if (cat != wxT("Command"))
if (cat != CommandTranslated)
{
cat.Append(wxT(" "));
cat += _("Menu");

View File

@ -133,7 +133,6 @@ private:
void OnLeftDown(wxMouseEvent & event);
static wxString CommandTranslated;
static bool CmpKeyNodeByTree(KeyNode *n1, KeyNode *n2);
static bool CmpKeyNodeByName(KeyNode *n1, KeyNode *n2);
static bool CmpKeyNodeByKey(KeyNode *n1, KeyNode *n2);