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

Method UpdateButtonStates

src/AdornedRulerPanel.cpp:2162–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2160}
2161
2162void AdornedRulerPanel::UpdateButtonStates()
2163{
2164 auto common = [this](
2165 AButton &button, const CommandID &commandName, const TranslatableString &label) {
2166 ComponentInterfaceSymbol command{ commandName, label };
2167 ToolBar::SetButtonToolTip( *mProject, button, &command, 1u );
2168 button.SetLabel( Verbatim( button.GetToolTipText() ) );
2169
2170 button.UpdateStatus();
2171 };
2172
2173 {
2174 auto timelineOptionsButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
2175 timelineOptionsButton->PopUp();
2176 // Bug 1584: Tooltip now shows what clicking will do.
2177 // Bug 2357: Action of button (and hence tooltip wording) updated.
2178 const auto label = XO("Timeline Options");
2179 common(*timelineOptionsButton, wxT("PinnedHead"), label);
2180 }
2181}
2182
2183void AdornedRulerPanel::OnPinnedButton(wxCommandEvent & /*event*/)
2184{

Callers 1

DrawMethod · 0.80

Calls 4

VerbatimFunction · 0.85
UpdateStatusMethod · 0.80
SetLabelMethod · 0.45
PopUpMethod · 0.45

Tested by

no test coverage detected