From bbc2837d67e08e6de3699a47947961870783432e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sat, 20 Oct 2018 17:32:54 -0400 Subject: [PATCH] Define table for Extra Seek menu --- src/Menus.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Menus.cpp b/src/Menus.cpp index c5ee3684c..c99e9d9b4 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -545,6 +545,7 @@ MenuTable::BaseItemPtr ExtraToolsMenu( AudacityProject & ); MenuTable::BaseItemPtr ExtraMixerMenu( AudacityProject & ); MenuTable::BaseItemPtr ExtraEditMenu( AudacityProject & ); MenuTable::BaseItemPtr ExtraPlayAtSpeedMenu( AudacityProject & ); +MenuTable::BaseItemPtr ExtraSeekMenu( AudacityProject & ); } // Tables of menu factories. @@ -555,6 +556,7 @@ static const std::shared_ptr extraItems = MenuTable::Items( , ExtraMixerMenu , ExtraEditMenu , ExtraPlayAtSpeedMenu + , ExtraSeekMenu ); static const auto menuTree = MenuTable::Items( @@ -1856,6 +1858,22 @@ MenuTable::BaseItemPtr ExtraPlayAtSpeedMenu( AudacityProject & ) ); } +MenuTable::BaseItemPtr ExtraSeekMenu( AudacityProject & ) +{ + using namespace MenuTable; + return Menu( _("See&k"), + Command( wxT("SeekLeftShort"), XXO("Short Seek &Left During Playback"), + FN(OnSeekLeftShort), AudioIOBusyFlag, wxT("Left\tallowDup") ), + Command( wxT("SeekRightShort"), + XXO("Short Seek &Right During Playback"), FN(OnSeekRightShort), + AudioIOBusyFlag, wxT("Right\tallowDup") ), + Command( wxT("SeekLeftLong"), XXO("Long Seek Le&ft During Playback"), + FN(OnSeekLeftLong), AudioIOBusyFlag, wxT("Shift+Left\tallowDup") ), + Command( wxT("SeekRightLong"), XXO("Long Seek Rig&ht During Playback"), + FN(OnSeekRightLong), AudioIOBusyFlag, wxT("Shift+Right\tallowDup") ) + ); +} + } void MenuCreator::CreateMenusAndCommands(AudacityProject &project) @@ -1890,21 +1908,6 @@ void MenuCreator::CreateMenusAndCommands(AudacityProject &project) ////////////////////////////////////////////////////////////////////////// - c->BeginMenu( _("See&k") ); - - c->AddItem( wxT("SeekLeftShort"), XXO("Short Seek &Left During Playback"), - FN(OnSeekLeftShort), AudioIOBusyFlag, wxT("Left\tallowDup") ); - c->AddItem( wxT("SeekRightShort"), - XXO("Short Seek &Right During Playback"), FN(OnSeekRightShort), - AudioIOBusyFlag, wxT("Right\tallowDup") ); - c->AddItem( wxT("SeekLeftLong"), XXO("Long Seek Le&ft During Playback"), - FN(OnSeekLeftLong), AudioIOBusyFlag, wxT("Shift+Left\tallowDup") ); - c->AddItem( wxT("SeekRightLong"), XXO("Long Seek Rig&ht During Playback"), - FN(OnSeekRightLong), AudioIOBusyFlag, wxT("Shift+Right\tallowDup") ); - c->EndMenu(); - - ////////////////////////////////////////////////////////////////////////// - c->BeginMenu( _("De&vice") ); c->AddItem( wxT("InputDevice"), XXO("Change &Recording Device..."), FN(OnInputDevice),