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

Menus.cpp no longer link dependent on top level menu definitions...

... They all use the registry.

(This link dependency was not shown in diagrams generated by scripts/graph.pl,
because it was not reflected in Menus.h but was done using extern declarations
within Menus.cpp.  That was a cheat, but it let all the other dependencies
be exposed in the graph and mitigated first.)
This commit is contained in:
Paul Licameli
2019-01-14 14:35:35 -05:00
parent d9d3f95570
commit de08d9ff86
11 changed files with 124 additions and 105 deletions

View File

@@ -385,9 +385,10 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &project) {
MenuTable::BaseItemSharedPtr ToolbarsMenu();
// Under /MenuBar
MenuTable::BaseItemSharedPtr ViewMenu()
namespace {
using namespace MenuTable;
BaseItemSharedPtr ViewMenu()
{
using namespace MenuTable;
using Options = CommandManager::Options;
static const auto checkOff = Options{}.CheckState( false );
@@ -463,4 +464,10 @@ MenuTable::BaseItemSharedPtr ViewMenu()
}
AttachedItem sAttachment1{
wxT(""),
Shared( ViewMenu() )
};
}
#undef FN