1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

EditMenus not link dependent on LabelMenus

This commit is contained in:
Paul Licameli 2019-01-15 10:09:07 -05:00
parent 02c5557054
commit 09356f7fe7
2 changed files with 12 additions and 7 deletions

View File

@ -997,8 +997,6 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
#define FN(X) (& EditActions::Handler :: X)
MenuTable::BaseItemSharedPtr LabelEditMenus();
static const ReservedCommandFlag
&CutCopyAvailableFlag() { static ReservedCommandFlag flag{
[](const AudacityProject &project){
@ -1141,8 +1139,6 @@ BaseItemSharedPtr EditMenu()
//////////////////////////////////////////////////////////////////////////
LabelEditMenus(),
Command( wxT("EditMetaData"), XXO("&Metadata..."), FN(OnEditMetadata),
AudioIONotBusyFlag() )

View File

@ -585,8 +585,9 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
#define FN(X) (& LabelEditActions::Handler :: X)
// Under /MenuBar/Edit
MenuTable::BaseItemSharedPtr LabelEditMenus()
namespace {
using namespace MenuTable;
BaseItemSharedPtr LabelEditMenus()
{
using namespace MenuTable;
using Options = CommandManager::Options;
@ -601,7 +602,7 @@ MenuTable::BaseItemSharedPtr LabelEditMenus()
static BaseItemSharedPtr menus{
( FinderScope{ findCommandHandler },
Items( wxEmptyString,
Items( wxT("LabelEditMenus"),
Menu( wxT("Labels"), XO("&Labels"),
Section( "",
@ -687,4 +688,12 @@ MenuTable::BaseItemSharedPtr LabelEditMenus()
return menus;
}
AttachedItem sAttachment1{
{ wxT("Edit/Other"),
{ OrderingHint::Before, wxT("EditMetaData") } },
Shared( LabelEditMenus() )
};
}
#undef FN