| 330 | } |
| 331 | |
| 332 | void MenuItemVisitor::VisitEntry(CommandManager::CommandListEntry &entry, |
| 333 | const MenuRegistry::Options *pOptions) |
| 334 | { |
| 335 | if (!pOptions) |
| 336 | // command list item |
| 337 | CurrentMenu()->Append(entry.id, entry.FormatLabelForMenu()); |
| 338 | else if (pOptions->global) |
| 339 | ; |
| 340 | else { |
| 341 | auto ID = entry.id; |
| 342 | auto label = FormatLabelWithDisabledAccel(entry); |
| 343 | auto &checker = pOptions->checker; |
| 344 | if (checker) { |
| 345 | CurrentMenu()->AppendCheckItem(ID, label); |
| 346 | CurrentMenu()->Check(ID, checker(mProject)); |
| 347 | } |
| 348 | else |
| 349 | CurrentMenu()->Append(ID, label); |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | MenuItemVisitor::~MenuItemVisitor() = default; |
| 354 |
nothing calls this directly
no test coverage detected