1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 17:14:07 +01:00
This commit is contained in:
Paul Licameli
2020-01-31 23:44:00 -05:00
parent 229e2673c7
commit 4d43967add
22 changed files with 794 additions and 546 deletions

View File

@@ -118,13 +118,13 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
#define FN(X) (& WindowActions::Handler :: X)
// Under /MenuBar
MenuTable::BaseItemSharedPtr WindowMenu()
namespace {
using namespace MenuTable;
BaseItemSharedPtr WindowMenu()
{
//////////////////////////////////////////////////////////////////////////
// poor imitation of the Mac Windows Menu
//////////////////////////////////////////////////////////////////////////
using namespace MenuTable;
static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler },
Menu( wxT("Window"), XO("&Window"),
@@ -149,10 +149,13 @@ MenuTable::BaseItemSharedPtr WindowMenu()
return menu;
}
// Under /MenuBar/Optional/Extra/Misc
MenuTable::BaseItemSharedPtr ExtraWindowItems()
AttachedItem sAttachment1{
wxT(""),
Shared( WindowMenu() )
};
BaseItemSharedPtr ExtraWindowItems()
{
using namespace MenuTable;
static BaseItemSharedPtr items{
( FinderScope{ findCommandHandler },
Items( wxT("MacWindows"),
@@ -165,19 +168,17 @@ MenuTable::BaseItemSharedPtr ExtraWindowItems()
return items;
}
AttachedItem sAttachment2{
Placement{ wxT("Optional/Extra/Part2/Misc"), OrderingHint::End },
Shared( ExtraWindowItems() )
};
}
#undef FN
#else
// Not WXMAC. Stub functions.
MenuTable::BaseItemSharedPtr WindowMenu()
{
return nullptr;
}
MenuTable::BaseItemSharedPtr ExtraWindowItems()
{
return nullptr;
}
// Not WXMAC.
#endif