| 2160 | } |
| 2161 | |
| 2162 | void 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 | |
| 2183 | void AdornedRulerPanel::OnPinnedButton(wxCommandEvent & /*event*/) |
| 2184 | { |
no test coverage detected