Naming of many menu sections, so they can be attachment sites

This commit is contained in:
Paul Licameli 2020-01-31 12:06:01 -05:00
parent d233cbd881
commit a465ce0046
10 changed files with 64 additions and 63 deletions

View File

@ -1055,7 +1055,7 @@ MenuTable::BaseItemSharedPtr EditMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Edit"), XO("&Edit"), Menu( wxT("Edit"), XO("&Edit"),
Section( "", Section( "UndoRedo",
Command( wxT("Undo"), XXO("&Undo"), FN(OnUndo), Command( wxT("Undo"), XXO("&Undo"), FN(OnUndo),
AudioIONotBusyFlag() | UndoAvailableFlag(), wxT("Ctrl+Z") ), AudioIONotBusyFlag() | UndoAvailableFlag(), wxT("Ctrl+Z") ),
@ -1069,7 +1069,7 @@ MenuTable::BaseItemSharedPtr EditMenu()
}) })
), ),
Section( "", Section( "Basic",
// Basic Edit commands // Basic Edit commands
/* i18n-hint: (verb)*/ /* i18n-hint: (verb)*/
Command( wxT("Cut"), XXO("Cu&t"), FN(OnCut), Command( wxT("Cut"), XXO("Cu&t"), FN(OnCut),
@ -1086,36 +1086,37 @@ MenuTable::BaseItemSharedPtr EditMenu()
AudioIONotBusyFlag(), wxT("Ctrl+V") ), AudioIONotBusyFlag(), wxT("Ctrl+V") ),
/* i18n-hint: (verb)*/ /* i18n-hint: (verb)*/
Command( wxT("Duplicate"), XXO("Duplic&ate"), FN(OnDuplicate), Command( wxT("Duplicate"), XXO("Duplic&ate"), FN(OnDuplicate),
NotBusyTimeAndTracksFlags, wxT("Ctrl+D") ) NotBusyTimeAndTracksFlags, wxT("Ctrl+D") ),
),
Section( "", Section( "",
Menu( wxT("RemoveSpecial"), XO("R&emove Special"), Menu( wxT("RemoveSpecial"), XO("R&emove Special"),
Section( "", Section( "",
/* i18n-hint: (verb) Do a special kind of cut*/ /* i18n-hint: (verb) Do a special kind of cut*/
Command( wxT("SplitCut"), XXO("Spl&it Cut"), FN(OnSplitCut), Command( wxT("SplitCut"), XXO("Spl&it Cut"), FN(OnSplitCut),
NotBusyTimeAndTracksFlags, NotBusyTimeAndTracksFlags,
Options{ wxT("Ctrl+Alt+X") }.UseStrictFlags() ), Options{ wxT("Ctrl+Alt+X") }.UseStrictFlags() ),
/* i18n-hint: (verb) Do a special kind of DELETE*/ /* i18n-hint: (verb) Do a special kind of DELETE*/
Command( wxT("SplitDelete"), XXO("Split D&elete"), FN(OnSplitDelete), Command( wxT("SplitDelete"), XXO("Split D&elete"), FN(OnSplitDelete),
NotBusyTimeAndTracksFlags, NotBusyTimeAndTracksFlags,
Options{ wxT("Ctrl+Alt+K") }.UseStrictFlags() ) Options{ wxT("Ctrl+Alt+K") }.UseStrictFlags() )
), ),
Section( "", Section( "",
/* i18n-hint: (verb)*/ /* i18n-hint: (verb)*/
Command( wxT("Silence"), XXO("Silence Audi&o"), FN(OnSilence), Command( wxT("Silence"), XXO("Silence Audi&o"), FN(OnSilence),
AudioIONotBusyFlag() | TimeSelectedFlag() | WaveTracksSelectedFlag(), AudioIONotBusyFlag() | TimeSelectedFlag() | WaveTracksSelectedFlag(),
wxT("Ctrl+L") ), wxT("Ctrl+L") ),
/* i18n-hint: (verb)*/ /* i18n-hint: (verb)*/
Command( wxT("Trim"), XXO("Tri&m Audio"), FN(OnTrim), Command( wxT("Trim"), XXO("Tri&m Audio"), FN(OnTrim),
AudioIONotBusyFlag() | TimeSelectedFlag() | WaveTracksSelectedFlag(), AudioIONotBusyFlag() | TimeSelectedFlag() | WaveTracksSelectedFlag(),
Options{ wxT("Ctrl+T") }.UseStrictFlags() ) Options{ wxT("Ctrl+T") }.UseStrictFlags() )
)
) )
) )
), ),
Section( "", Section( "Other",
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
Menu( wxT("Clip"), XO("Clip B&oundaries"), Menu( wxT("Clip"), XO("Clip B&oundaries"),
@ -1150,7 +1151,7 @@ MenuTable::BaseItemSharedPtr EditMenu()
#ifndef __WXMAC__ #ifndef __WXMAC__
), ),
Section( "", Section( "Preferences",
#else #else
, ,
#endif #endif

View File

@ -163,7 +163,7 @@ MenuTable::BaseItemSharedPtr ExtraMenu()
// Table of menu factories. // Table of menu factories.
// TODO: devise a registration system instead. // TODO: devise a registration system instead.
static BaseItemSharedPtr extraItems{ Items( wxEmptyString, static BaseItemSharedPtr extraItems{ Items( wxEmptyString,
Section( "", Section( "Part1",
ExtraTransportMenu() ExtraTransportMenu()
, ExtraToolsMenu() , ExtraToolsMenu()
, ExtraMixerMenu() , ExtraMixerMenu()
@ -174,7 +174,7 @@ MenuTable::BaseItemSharedPtr ExtraMenu()
, ExtraSelectionMenu() , ExtraSelectionMenu()
), ),
Section( "", Section( "Part2",
ExtraGlobalCommands() ExtraGlobalCommands()
, ExtraFocusMenu() , ExtraFocusMenu()
, ExtraCursorMenu() , ExtraCursorMenu()

View File

@ -560,7 +560,7 @@ MenuTable::BaseItemSharedPtr FileMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("File"), XO("&File"), Menu( wxT("File"), XO("&File"),
Section( "", Section( "Basic",
/*i18n-hint: "New" is an action (verb) to create a NEW project*/ /*i18n-hint: "New" is an action (verb) to create a NEW project*/
Command( wxT("New"), XXO("&New"), FN(OnNew), Command( wxT("New"), XXO("&New"), FN(OnNew),
AudioIONotBusyFlag(), wxT("Ctrl+N") ), AudioIONotBusyFlag(), wxT("Ctrl+N") ),
@ -618,7 +618,7 @@ MenuTable::BaseItemSharedPtr FileMenu()
AudioIONotBusyFlag(), wxT("Ctrl+W") ) AudioIONotBusyFlag(), wxT("Ctrl+W") )
), ),
Section( "", Section( "Save",
Menu( wxT("Save"), XO("&Save Project"), Menu( wxT("Save"), XO("&Save Project"),
Command( wxT("Save"), XXO("&Save Project"), FN(OnSave), Command( wxT("Save"), XXO("&Save Project"), FN(OnSave),
AudioIONotBusyFlag() | UnsavedChangesFlag(), wxT("Ctrl+S") ), AudioIONotBusyFlag() | UnsavedChangesFlag(), wxT("Ctrl+S") ),
@ -636,7 +636,7 @@ MenuTable::BaseItemSharedPtr FileMenu()
) )
), ),
Section( "", Section( "Import-Export",
Menu( wxT("Export"), XO("&Export"), Menu( wxT("Export"), XO("&Export"),
// Enable Export audio commands only when there are audio tracks. // Enable Export audio commands only when there are audio tracks.
Command( wxT("ExportMp3"), XXO("Export as MP&3"), FN(OnExportMp3), Command( wxT("ExportMp3"), XXO("Export as MP&3"), FN(OnExportMp3),
@ -685,7 +685,7 @@ MenuTable::BaseItemSharedPtr FileMenu()
) )
), ),
Section( "", Section( "Print",
Command( wxT("PageSetup"), XXO("Pa&ge Setup..."), FN(OnPageSetup), Command( wxT("PageSetup"), XXO("Pa&ge Setup..."), FN(OnPageSetup),
AudioIONotBusyFlag() | TracksExistFlag() ), AudioIONotBusyFlag() | TracksExistFlag() ),
/* i18n-hint: (verb) It's item on a menu. */ /* i18n-hint: (verb) It's item on a menu. */
@ -693,7 +693,7 @@ MenuTable::BaseItemSharedPtr FileMenu()
AudioIONotBusyFlag() | TracksExistFlag() ) AudioIONotBusyFlag() | TracksExistFlag() )
), ),
Section( "", Section( "Exit",
// On the Mac, the Exit item doesn't actually go here...wxMac will // On the Mac, the Exit item doesn't actually go here...wxMac will
// pull it out // pull it out
// and put it in the Audacity menu for us based on its ID. // and put it in the Audacity menu for us based on its ID.

View File

@ -530,7 +530,7 @@ MenuTable::BaseItemSharedPtr HelpMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Help"), XO("&Help"), Menu( wxT("Help"), XO("&Help"),
Section( "", Section( "Basic",
// QuickFix menu item not in Audacity 2.3.1 whilst we discuss further. // QuickFix menu item not in Audacity 2.3.1 whilst we discuss further.
#ifdef EXPERIMENTAL_DA #ifdef EXPERIMENTAL_DA
// DA: Has QuickFix menu item. // DA: Has QuickFix menu item.
@ -553,7 +553,7 @@ MenuTable::BaseItemSharedPtr HelpMenu()
#else #else
Section Section
#endif #endif
( "", ( "Other",
Menu( wxT("Diagnostics"), XO("&Diagnostics"), Menu( wxT("Diagnostics"), XO("&Diagnostics"),
Command( wxT("DeviceInfo"), XXO("Au&dio Device Info..."), Command( wxT("DeviceInfo"), XXO("Au&dio Device Info..."),
FN(OnAudioDeviceInfo), FN(OnAudioDeviceInfo),

View File

@ -758,13 +758,13 @@ MenuTable::BaseItemSharedPtr GenerateMenu()
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Generate"), XO("&Generate"), Menu( wxT("Generate"), XO("&Generate"),
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
Section( "", Section( "Manage",
Command( wxT("ManageGenerators"), XXO("Add / Remove Plug-ins..."), Command( wxT("ManageGenerators"), XXO("Add / Remove Plug-ins..."),
FN(OnManageGenerators), AudioIONotBusyFlag() ) FN(OnManageGenerators), AudioIONotBusyFlag() )
), ),
#endif #endif
Section( "", Section( "Generators",
// Delayed evaluation: // Delayed evaluation:
[](AudacityProject &) [](AudacityProject &)
{ return Items( wxEmptyString, PopulateEffectsMenu( { return Items( wxEmptyString, PopulateEffectsMenu(
@ -795,13 +795,13 @@ MenuTable::BaseItemSharedPtr EffectMenu()
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Effect"), XO("Effe&ct"), Menu( wxT("Effect"), XO("Effe&ct"),
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
Section( "", Section( "Manage",
Command( wxT("ManageEffects"), XXO("Add / Remove Plug-ins..."), Command( wxT("ManageEffects"), XXO("Add / Remove Plug-ins..."),
FN(OnManageEffects), AudioIONotBusyFlag() ) FN(OnManageEffects), AudioIONotBusyFlag() )
), ),
#endif #endif
Section( "", Section( "RepeatLast",
// Delayed evaluation: // Delayed evaluation:
[](AudacityProject &project) [](AudacityProject &project)
{ {
@ -821,7 +821,7 @@ MenuTable::BaseItemSharedPtr EffectMenu()
} }
), ),
Section( "", Section( "Effects",
// Delayed evaluation: // Delayed evaluation:
[](AudacityProject &) [](AudacityProject &)
{ return Items( wxEmptyString, PopulateEffectsMenu( { return Items( wxEmptyString, PopulateEffectsMenu(
@ -845,13 +845,13 @@ MenuTable::BaseItemSharedPtr AnalyzeMenu()
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Analyze"), XO("&Analyze"), Menu( wxT("Analyze"), XO("&Analyze"),
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
Section( "", Section( "Manage",
Command( wxT("ManageAnalyzers"), XXO("Add / Remove Plug-ins..."), Command( wxT("ManageAnalyzers"), XXO("Add / Remove Plug-ins..."),
FN(OnManageAnalyzers), AudioIONotBusyFlag() ) FN(OnManageAnalyzers), AudioIONotBusyFlag() )
), ),
#endif #endif
Section( "", Section( "Analyzers",
Command( wxT("ContrastAnalyser"), XXO("Contrast..."), FN(OnContrast), Command( wxT("ContrastAnalyser"), XXO("Contrast..."), FN(OnContrast),
AudioIONotBusyFlag() | WaveTracksSelectedFlag() | TimeSelectedFlag(), AudioIONotBusyFlag() | WaveTracksSelectedFlag() | TimeSelectedFlag(),
wxT("Ctrl+Shift+T") ), wxT("Ctrl+Shift+T") ),
@ -879,7 +879,7 @@ MenuTable::BaseItemSharedPtr ToolsMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Tools"), XO("T&ools"), Menu( wxT("Tools"), XO("T&ools"),
Section( "", Section( "Manage",
#ifdef EXPERIMENTAL_EFFECT_MANAGEMENT #ifdef EXPERIMENTAL_EFFECT_MANAGEMENT
Command( wxT("ManageTools"), XXO("Add / Remove Plug-ins..."), Command( wxT("ManageTools"), XXO("Add / Remove Plug-ins..."),
FN(OnManageTools), AudioIONotBusyFlag() ), FN(OnManageTools), AudioIONotBusyFlag() ),
@ -907,7 +907,7 @@ MenuTable::BaseItemSharedPtr ToolsMenu()
) )
), ),
Section( "", Section( "Other",
Command( wxT("FancyScreenshot"), XXO("&Screenshot..."), Command( wxT("FancyScreenshot"), XXO("&Screenshot..."),
FN(OnScreenshot), AudioIONotBusyFlag() ), FN(OnScreenshot), AudioIONotBusyFlag() ),
@ -921,7 +921,7 @@ MenuTable::BaseItemSharedPtr ToolsMenu()
//#endif //#endif
), ),
Section( "", Section( "Tools",
// Delayed evaluation: // Delayed evaluation:
[](AudacityProject&) [](AudacityProject&)
{ return Items( wxEmptyString, PopulateEffectsMenu( { return Items( wxEmptyString, PopulateEffectsMenu(

View File

@ -1039,7 +1039,7 @@ MenuTable::BaseItemSharedPtr SelectMenu()
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
/* i18n-hint: (verb) It's an item on a menu. */ /* i18n-hint: (verb) It's an item on a menu. */
Menu( wxT("Select"), XO("&Select"), Menu( wxT("Select"), XO("&Select"),
Section( "", Section( "Basic",
Command( wxT("SelectAll"), XXO("&All"), FN(OnSelectAll), Command( wxT("SelectAll"), XXO("&All"), FN(OnSelectAll),
TracksExistFlag(), TracksExistFlag(),
Options{ wxT("Ctrl+A"), XO("Select All") } ), Options{ wxT("Ctrl+A"), XO("Select All") } ),

View File

@ -264,13 +264,13 @@ MenuTable::BaseItemSharedPtr ToolbarsMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Toolbars"), XO("&Toolbars"), Menu( wxT("Toolbars"), XO("&Toolbars"),
Section( "", Section( "Reset",
/* i18n-hint: (verb)*/ /* i18n-hint: (verb)*/
Command( wxT("ResetToolbars"), XXO("Reset Toolb&ars"), Command( wxT("ResetToolbars"), XXO("Reset Toolb&ars"),
FN(OnResetToolBars), AlwaysEnabledFlag ) FN(OnResetToolBars), AlwaysEnabledFlag )
), ),
Section( "", Section( "Other",
/* i18n-hint: Clicking this menu item shows the toolbar /* i18n-hint: Clicking this menu item shows the toolbar
with the big buttons on it (play record etc)*/ with the big buttons on it (play record etc)*/
Command( wxT("ShowTransportTB"), XXO("&Transport Toolbar"), Command( wxT("ShowTransportTB"), XXO("&Transport Toolbar"),

View File

@ -1287,7 +1287,7 @@ MenuTable::BaseItemSharedPtr TracksMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("Tracks"), XO("&Tracks"), Menu( wxT("Tracks"), XO("&Tracks"),
Section( "", Section( "Add",
Menu( wxT("Add"), XO("Add &New"), Menu( wxT("Add"), XO("Add &New"),
Command( wxT("NewMonoTrack"), XXO("&Mono Track"), FN(OnNewWaveTrack), Command( wxT("NewMonoTrack"), XXO("&Mono Track"), FN(OnNewWaveTrack),
AudioIONotBusyFlag(), wxT("Ctrl+Shift+N") ), AudioIONotBusyFlag(), wxT("Ctrl+Shift+N") ),

View File

@ -986,7 +986,7 @@ MenuTable::BaseItemSharedPtr TransportMenu()
/* i18n-hint: 'Transport' is the name given to the set of controls that /* i18n-hint: 'Transport' is the name given to the set of controls that
play, record, pause etc. */ play, record, pause etc. */
Menu( wxT("Transport"), XO("Tra&nsport"), Menu( wxT("Transport"), XO("Tra&nsport"),
Section( "", Section( "Basic",
Menu( wxT("Play"), XO("Pl&aying"), Menu( wxT("Play"), XO("Pl&aying"),
/* i18n-hint: (verb) Start or Stop audio playback*/ /* i18n-hint: (verb) Start or Stop audio playback*/
Command( wxT("PlayStop"), XXO("Pl&ay/Stop"), FN(OnPlayStop), Command( wxT("PlayStop"), XXO("Pl&ay/Stop"), FN(OnPlayStop),
@ -1044,16 +1044,16 @@ MenuTable::BaseItemSharedPtr TransportMenu()
CursorMenu() CursorMenu()
), ),
Section( "", Section( "Other",
Menu( wxT("PlayRegion"), XO("Pla&y Region"), Section( "",
Command( wxT("LockPlayRegion"), XXO("&Lock"), FN(OnLockPlayRegion), Menu( wxT("PlayRegion"), XO("Pla&y Region"),
PlayRegionNotLockedFlag() ), Command( wxT("LockPlayRegion"), XXO("&Lock"), FN(OnLockPlayRegion),
Command( wxT("UnlockPlayRegion"), XXO("&Unlock"), PlayRegionNotLockedFlag() ),
FN(OnUnlockPlayRegion), PlayRegionLockedFlag() ) Command( wxT("UnlockPlayRegion"), XXO("&Unlock"),
) FN(OnUnlockPlayRegion), PlayRegionLockedFlag() )
), )
),
Section( "",
Command( wxT("RescanDevices"), XXO("R&escan Audio Devices"), Command( wxT("RescanDevices"), XXO("R&escan Audio Devices"),
FN(OnRescanDevices), AudioIONotBusyFlag() | CanStopAudioStreamFlag() ), FN(OnRescanDevices), AudioIONotBusyFlag() | CanStopAudioStreamFlag() ),

View File

@ -445,7 +445,7 @@ MenuTable::BaseItemSharedPtr ViewMenu()
static BaseItemSharedPtr menu{ static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler }, ( FinderScope{ findCommandHandler },
Menu( wxT("View"), XO("&View"), Menu( wxT("View"), XO("&View"),
Section( "", Section( "Basic",
Menu( wxT("Zoom"), XO("&Zoom"), Menu( wxT("Zoom"), XO("&Zoom"),
Section( "", Section( "",
Command( wxT("ZoomIn"), XXO("Zoom &In"), FN(OnZoomIn), Command( wxT("ZoomIn"), XXO("Zoom &In"), FN(OnZoomIn),
@ -487,7 +487,7 @@ MenuTable::BaseItemSharedPtr ViewMenu()
) )
), ),
Section( "", Section( "Windows",
// History window should be available either for UndoAvailableFlag // History window should be available either for UndoAvailableFlag
// or RedoAvailableFlag, // or RedoAvailableFlag,
// but we can't make the AddItem flags and mask have both, // but we can't make the AddItem flags and mask have both,
@ -541,7 +541,7 @@ MenuTable::BaseItemSharedPtr ViewMenu()
ToolbarsMenu() ToolbarsMenu()
), ),
Section( "", Section( "Other",
Command( wxT("ShowExtraMenus"), XXO("&Extra Menus (on/off)"), Command( wxT("ShowExtraMenus"), XXO("&Extra Menus (on/off)"),
FN(OnShowExtraMenus), AlwaysEnabledFlag, FN(OnShowExtraMenus), AlwaysEnabledFlag,
Options{}.CheckTest( wxT("/GUI/ShowExtraMenus"), false ) ), Options{}.CheckTest( wxT("/GUI/ShowExtraMenus"), false ) ),