mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Stub function for Extra menus, to be managed as sub-tables...
... There will be two menus, "Extra" and "Extra_" in these interim commits as we move items from the latter to the former.
This commit is contained in:
parent
434dcfa4b3
commit
8c0944d65a
@ -538,6 +538,7 @@ MenuTable::BaseItemPtr EffectMenu( AudacityProject& );
|
||||
MenuTable::BaseItemPtr AnalyzeMenu( AudacityProject& );
|
||||
MenuTable::BaseItemPtr ToolsMenu( AudacityProject& );
|
||||
MenuTable::BaseItemPtr WindowMenu( AudacityProject& );
|
||||
MenuTable::BaseItemPtr ExtraMenu( AudacityProject& );
|
||||
}
|
||||
|
||||
// Tables of menu factories.
|
||||
@ -557,6 +558,7 @@ static const auto menuTree = MenuTable::Items(
|
||||
, AnalyzeMenu
|
||||
, ToolsMenu
|
||||
, WindowMenu
|
||||
, ExtraMenu
|
||||
);
|
||||
|
||||
namespace {
|
||||
@ -1703,6 +1705,16 @@ MenuTable::BaseItemPtr WindowMenu( AudacityProject & )
|
||||
#endif
|
||||
}
|
||||
|
||||
MenuTable::BaseItemPtr ExtraMenu( AudacityProject & )
|
||||
{
|
||||
using namespace MenuTable;
|
||||
static const auto pred =
|
||||
[]{ return gPrefs->ReadBool(wxT("/GUI/ShowExtraMenus"), false); };
|
||||
static const auto factory =
|
||||
[](AudacityProject &){ return extraItems; };
|
||||
return ConditionalItems( pred, Menu( _("Ext&ra"), factory ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MenuCreator::CreateMenusAndCommands(AudacityProject &project)
|
||||
@ -1733,7 +1745,7 @@ void MenuCreator::CreateMenusAndCommands(AudacityProject &project)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// i18n-hint: Extra is a menu with extra commands
|
||||
c->BeginMenu( _("Ext&ra") );
|
||||
c->BeginMenu( _("Ext&ra_") );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user