mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 00:19:27 +02:00
Remove link dependencies on ClipMenus.cpp, register its menu items
This commit is contained in:
parent
6225043ff3
commit
02c5557054
@ -823,10 +823,13 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &) {
|
||||
|
||||
#define FN(X) (& ClipActions::Handler :: X)
|
||||
|
||||
// Under /MenuBar/Select
|
||||
MenuTable::BaseItemSharedPtr ClipSelectMenu()
|
||||
namespace {
|
||||
using namespace MenuTable;
|
||||
|
||||
// Register menu items
|
||||
|
||||
BaseItemSharedPtr ClipSelectMenu()
|
||||
{
|
||||
using namespace MenuTable;
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
static BaseItemSharedPtr menu {
|
||||
@ -850,10 +853,13 @@ MenuTable::BaseItemSharedPtr ClipSelectMenu()
|
||||
return menu;
|
||||
}
|
||||
|
||||
// Under /MenuBar/Transport/Cursor
|
||||
MenuTable::BaseItemSharedPtr ClipCursorItems()
|
||||
AttachedItem sAttachment1{
|
||||
wxT("Select/Basic"),
|
||||
Shared( ClipSelectMenu() )
|
||||
};
|
||||
|
||||
BaseItemSharedPtr ClipCursorItems()
|
||||
{
|
||||
using namespace MenuTable;
|
||||
using Options = CommandManager::Options;
|
||||
|
||||
static BaseItemSharedPtr items{
|
||||
@ -871,11 +877,14 @@ MenuTable::BaseItemSharedPtr ClipCursorItems()
|
||||
return items;
|
||||
}
|
||||
|
||||
// Under /MenuBar/Optional/Extra/Part2/Cursor
|
||||
MenuTable::BaseItemSharedPtr ExtraClipCursorItems()
|
||||
{
|
||||
using namespace MenuTable;
|
||||
AttachedItem sAttachment2{
|
||||
{ wxT("Transport/Basic/Cursor"),
|
||||
{ OrderingHint::Before, wxT("CursProjectStart") } },
|
||||
Shared( ClipCursorItems() )
|
||||
};
|
||||
|
||||
BaseItemSharedPtr ExtraClipCursorItems()
|
||||
{
|
||||
static BaseItemSharedPtr items{
|
||||
( FinderScope{ findCommandHandler },
|
||||
Items( wxT("Clip"),
|
||||
@ -887,4 +896,11 @@ MenuTable::BaseItemSharedPtr ExtraClipCursorItems()
|
||||
return items;
|
||||
}
|
||||
|
||||
AttachedItem sAttachment3{
|
||||
{ wxT("Optional/Extra/Part2/Cursor"), { OrderingHint::End, {} } },
|
||||
Shared( ExtraClipCursorItems() )
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#undef FN
|
||||
|
@ -1028,8 +1028,6 @@ static CommandHandlerObject &findCommandHandler(AudacityProject &project) {
|
||||
|
||||
#define FN(X) (& SelectActions::Handler :: X)
|
||||
|
||||
MenuTable::BaseItemSharedPtr ClipSelectMenu();
|
||||
|
||||
namespace {
|
||||
using namespace MenuTable;
|
||||
BaseItemSharedPtr SelectMenu()
|
||||
@ -1112,14 +1110,8 @@ BaseItemSharedPtr SelectMenu()
|
||||
Command( wxT("NextLowerPeakFrequency"),
|
||||
XXO("Next &Lower Peak Frequency"), FN(OnNextLowerPeakFrequency),
|
||||
TracksExistFlag() )
|
||||
),
|
||||
)
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClipSelectMenu()
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
),
|
||||
|
||||
Section( "",
|
||||
@ -1196,8 +1188,6 @@ AttachedItem sAttachment2{
|
||||
};
|
||||
}
|
||||
|
||||
MenuTable::BaseItemSharedPtr ClipCursorItems();
|
||||
|
||||
// Under /MenuBar/Transport
|
||||
MenuTable::BaseItemSharedPtr CursorMenu()
|
||||
{
|
||||
@ -1230,8 +1220,6 @@ MenuTable::BaseItemSharedPtr CursorMenu()
|
||||
TracksSelectedFlag(),
|
||||
Options{ wxT("K"), XO("Cursor to Track End") } ),
|
||||
|
||||
ClipCursorItems(),
|
||||
|
||||
Command( wxT("CursProjectStart"), XXO("&Project Start"),
|
||||
FN(OnSkipStart),
|
||||
CanStopFlags,
|
||||
@ -1243,8 +1231,6 @@ MenuTable::BaseItemSharedPtr CursorMenu()
|
||||
return menu;
|
||||
}
|
||||
|
||||
MenuTable::BaseItemSharedPtr ExtraClipCursorItems();
|
||||
|
||||
namespace {
|
||||
BaseItemSharedPtr ExtraCursorMenu()
|
||||
{
|
||||
@ -1268,9 +1254,7 @@ BaseItemSharedPtr ExtraCursorMenu()
|
||||
TracksExistFlag() | TrackPanelHasFocus(), wxT("Shift+,") ),
|
||||
Command( wxT("CursorLongJumpRight"), XXO("Cursor Long Ju&mp Right"),
|
||||
FN(OnCursorLongJumpRight),
|
||||
TracksExistFlag() | TrackPanelHasFocus(), wxT("Shift+.") ),
|
||||
|
||||
ExtraClipCursorItems()
|
||||
TracksExistFlag() | TrackPanelHasFocus(), wxT("Shift+.") )
|
||||
) ) };
|
||||
return menu;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user