MCPcopy Create free account
hub / github.com/audacity/audacity / ModifyToolbarMenus

Method ModifyToolbarMenus

src/toolbars/ToolManager.cpp:1542–1560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1540
1541#include "CommandManager.h"
1542void ToolManager::ModifyToolbarMenus(AudacityProject &project)
1543{
1544 // Refreshes can occur during shutdown and the toolmanager may already
1545 // be deleted, so protect against it.
1546 auto &toolManager = ToolManager::Get( project );
1547
1548 // Now, go through each toolbar, and call EnableDisableButtons()
1549 toolManager.ForEach([](auto bar){
1550 if (bar)
1551 bar->EnableDisableButtons();
1552 });
1553
1554 // These don't really belong here, but it's easier and especially so for
1555 // the Edit toolbar and the sync-lock menu item.
1556 bool active = SyncLockTracks.Read();
1557 SyncLockState::Get(project).SetSyncLock(active);
1558
1559 CommandManager::Get(project).UpdateCheckmarks();
1560}
1561
1562using namespace MenuRegistry;
1563

Callers 3

OnResetToolBarsMethod · 0.80
OnShowToolBarMethod · 0.80
OnFullScreenFunction · 0.80

Calls 6

GetFunction · 0.85
ForEachMethod · 0.80
SetSyncLockMethod · 0.80
UpdateCheckmarksMethod · 0.80
EnableDisableButtonsMethod · 0.45
ReadMethod · 0.45

Tested by

no test coverage detected