mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 08:27:13 +01:00
Simplify the FN macros in src/menus/*.cpp...
... Eliminate repetitious passing of the finder function into each of the calls to Command and CommandGroup.
This commit is contained in:
@@ -418,8 +418,7 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
|
||||
|
||||
// Menu definitions
|
||||
|
||||
#define FN(X) findCommandHandler, \
|
||||
static_cast<CommandFunctorPointer>(& HelpActions::Handler :: X)
|
||||
#define FN(X) (& HelpActions::Handler :: X)
|
||||
|
||||
MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
|
||||
{
|
||||
@@ -429,7 +428,8 @@ MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
|
||||
|
||||
using namespace MenuTable;
|
||||
|
||||
return Menu( XO("&Help"),
|
||||
return FinderScope( findCommandHandler ).Eval(
|
||||
Menu( XO("&Help"),
|
||||
// QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
|
||||
#ifdef EXPERIMENTAL_DA
|
||||
// DA: Has QuickFix menu item.
|
||||
@@ -480,7 +480,7 @@ MenuTable::BaseItemPtr HelpMenu( AudacityProject & )
|
||||
#endif
|
||||
Command( wxT("About"), XXO("&About Audacity..."), FN(OnAbout),
|
||||
AlwaysEnabledFlag )
|
||||
);
|
||||
) );
|
||||
}
|
||||
|
||||
#undef FN
|
||||
|
||||
Reference in New Issue
Block a user