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

Most functions defining menus compute once and cache the result...

... Except a few where project or plugin manager state or preferences are
needed to compute the items, so evaluation is delayed, often inside lambdas

Comment "Delayed evaluation" wherever there are exceptions
This commit is contained in:
Paul Licameli
2019-01-09 11:27:32 -05:00
parent 33b4b409e8
commit f6e5696146
18 changed files with 354 additions and 261 deletions

View File

@@ -420,15 +420,11 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
#define FN(X) (& HelpActions::Handler :: X)
MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
MenuTable::BaseItemSharedPtr HelpMenu()
{
#ifdef __WXMAC__
wxApp::s_macHelpMenuTitleName = _("&Help");
#endif
using namespace MenuTable;
return FinderScope( findCommandHandler ).Eval(
static BaseItemSharedPtr menu{
FinderScope( findCommandHandler ).Eval(
Menu( XO("&Help"),
// QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
#ifdef EXPERIMENTAL_DA
@@ -480,7 +476,8 @@ MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
#endif
Command( wxT("About"), XXO("&About Audacity..."), FN(OnAbout),
AlwaysEnabledFlag )
) );
) ) };
return menu;
}
#undef FN