mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-24 16:20:05 +02:00
Merge branch 'master' into scrubbing2
This commit is contained in:
commit
03fd92d541
@ -1956,6 +1956,9 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent,
|
||||
, mProject(parent)
|
||||
, mViewInfo(viewinfo)
|
||||
{
|
||||
for (auto &button : mButtons)
|
||||
button = nullptr;
|
||||
|
||||
ReCreateButtons();
|
||||
|
||||
SetLabel( _("Timeline") );
|
||||
@ -2764,18 +2767,20 @@ void AdornedRulerPanel::OnContextMenu(wxContextMenuEvent & WXUNUSED(event))
|
||||
|
||||
void AdornedRulerPanel::UpdateButtonStates()
|
||||
{
|
||||
bool state = PlaybackPrefs::GetPinnedHeadPreference();
|
||||
auto pinButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
|
||||
pinButton->PopUp();
|
||||
pinButton->SetAlternateIdx(state ? 0 : 1);
|
||||
const auto label = state
|
||||
{
|
||||
bool state = PlaybackPrefs::GetPinnedHeadPreference();
|
||||
auto pinButton = static_cast<AButton*>(FindWindow(OnTogglePinnedStateID));
|
||||
pinButton->PopUp();
|
||||
pinButton->SetAlternateIdx(state ? 0 : 1);
|
||||
const auto label = state
|
||||
// Label descibes the present state, not what the click does
|
||||
// (which is, to toggle the state)
|
||||
? _("Pinned play/record Head")
|
||||
: _("Unpinned play/record Head");
|
||||
const auto &fullLabel = ComposeButtonLabel(*mProject, _("PinnedHead"), label);
|
||||
pinButton->SetLabel(fullLabel);
|
||||
pinButton->SetToolTip(fullLabel);
|
||||
const auto &fullLabel = ComposeButtonLabel(*mProject, wxT("PinnedHead"), label);
|
||||
pinButton->SetLabel(fullLabel);
|
||||
pinButton->SetToolTip(fullLabel);
|
||||
}
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::OnTogglePinnedState(wxCommandEvent & event)
|
||||
|
@ -446,7 +446,7 @@ private:
|
||||
|
||||
friend QuickPlayRulerOverlay;
|
||||
|
||||
wxWindow *mButtons[1] { {} };
|
||||
wxWindow *mButtons[1];
|
||||
bool mNeedButtonUpdate { true };
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user