MCPcopy Create free account
hub / github.com/audacity/audacity / GetPrefixedLabelFromName

Method GetPrefixedLabelFromName

libraries/lib-menus/CommandManager.cpp:1079–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077}
1078
1079TranslatableString
1080CommandManager::GetPrefixedLabelFromName(const CommandID &name) const
1081{
1082 if (auto iter = mCommandNameHash.find(name);
1083 iter != mCommandNameHash.end()
1084 ) {
1085 const auto entry = iter->second;
1086 if (!entry->labelPrefix.empty())
1087 return Verbatim( wxT("%s - %s") )
1088 .Format(entry->labelPrefix, entry->label)
1089 .Stripped();
1090 else
1091 return entry->label.Stripped();
1092 }
1093 return {};
1094}
1095
1096TranslatableString
1097CommandManager::GetCategoryFromName(const CommandID &name) const

Callers 3

ContainsIllegalDupsMethod · 0.80
MergeWithExistingKeysMethod · 0.80
OnSetMethod · 0.80

Calls 5

VerbatimFunction · 0.85
StrippedMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected