mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
A few minor fixes to Quick-Play (now hyphenated for consistency).
This commit is contained in:
parent
8bcec00e65
commit
e45afbaa76
@ -1741,9 +1741,11 @@ wxUint32 AudacityProject::GetUpdateFlags()
|
||||
|
||||
flags |= GetFocusedFrame();
|
||||
|
||||
double start, end;
|
||||
GetPlayRegion(&start, &end);
|
||||
if (IsPlayRegionLocked())
|
||||
flags |= PlayRegionLockedFlag;
|
||||
else
|
||||
else if (start != end)
|
||||
flags |= PlayRegionNotLockedFlag;
|
||||
|
||||
if (flags & AudioIONotBusyFlag) {
|
||||
@ -6223,21 +6225,21 @@ void AudacityProject::OnAudioDeviceInfo()
|
||||
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
wxString fName = FileSelector(_("Save Device Info"),
|
||||
wxEmptyString,
|
||||
wxT("deviceinfo.txt"),
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
this);
|
||||
if (!fName.IsEmpty())
|
||||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
wxMessageBox(_("Unable to save device info"), _("Save Device Info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
wxString fName = FileSelector(_("Save Device Info"),
|
||||
wxEmptyString,
|
||||
wxT("deviceinfo.txt"),
|
||||
wxT("txt"),
|
||||
wxT("*.txt"),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
|
||||
this);
|
||||
if (!fName.IsEmpty())
|
||||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
wxMessageBox(_("Unable to save device info"), _("Save Device Info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AudacityProject::OnSeparator()
|
||||
@ -6312,8 +6314,16 @@ void AudacityProject::OnUnMuteAllTracks()
|
||||
|
||||
void AudacityProject::OnLockPlayRegion()
|
||||
{
|
||||
mLockPlayRegion = true;
|
||||
mRuler->Refresh(false);
|
||||
double start, end;
|
||||
GetPlayRegion(&start, &end);
|
||||
if (start >= mTracks->GetEndTime()) {
|
||||
wxMessageBox(_("Cannot lock region beyond\nend of project."),
|
||||
_("Error"));
|
||||
}
|
||||
else {
|
||||
mLockPlayRegion = true;
|
||||
mRuler->Refresh(false);
|
||||
}
|
||||
}
|
||||
|
||||
void AudacityProject::OnUnlockPlayRegion()
|
||||
|
@ -576,7 +576,7 @@ protected:
|
||||
double mLastIndicator;
|
||||
double mLastCursor;
|
||||
|
||||
// Quick Play indicator postion
|
||||
// Quick-Play indicator postion
|
||||
double mOldQPIndicatorPos;
|
||||
|
||||
int mTimeCount;
|
||||
|
@ -1701,10 +1701,10 @@ void AdornedRulerPanel::RegenerateTooltips()
|
||||
this->SetToolTip(_("Timeline actions disabled during recording"));
|
||||
}
|
||||
else if (!mQuickPlayEnabled) {
|
||||
this->SetToolTip(_("Quick Play disabled"));
|
||||
this->SetToolTip(_("Quick-Play disabled"));
|
||||
}
|
||||
else {
|
||||
this->SetToolTip(_("Quick Play enabled"));
|
||||
this->SetToolTip(_("Quick-Play enabled"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1853,7 +1853,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
double sel0 = mProject->GetSel0();
|
||||
double sel1 = mProject->GetSel1();
|
||||
|
||||
// Restrict Quick Play region to where there is something to play or is selected.
|
||||
// Restrict Quick-Play region to where there is something to play or is selected.
|
||||
mQuickPlayPos = wxMax(0.0, mQuickPlayPos);
|
||||
|
||||
// If not looping, restrict selection to end of project
|
||||
@ -2004,7 +2004,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
ClearPlayRegion();
|
||||
}
|
||||
// Disable if empty selection before start.
|
||||
// (allow Quick Play region to include 'pre-roll' white space)
|
||||
// (allow Quick-Play region to include 'pre-roll' white space)
|
||||
else if (((mPlayRegionEnd - mPlayRegionStart) > 0.0) && (mPlayRegionEnd < t0)) {
|
||||
ClearPlayRegion();
|
||||
}
|
||||
@ -2083,9 +2083,9 @@ void AdornedRulerPanel::ShowMenu(const wxPoint & pos)
|
||||
wxMenu *rulerMenu = new wxMenu();
|
||||
|
||||
if (mQuickPlayEnabled)
|
||||
rulerMenu->Append(OnToggleQuickPlayID, _("Disable Quick Play"));
|
||||
rulerMenu->Append(OnToggleQuickPlayID, _("Disable Quick-Play"));
|
||||
else
|
||||
rulerMenu->Append(OnToggleQuickPlayID, _("Enable Quick Play"));
|
||||
rulerMenu->Append(OnToggleQuickPlayID, _("Enable Quick-Play"));
|
||||
|
||||
wxMenuItem *dragitem;
|
||||
if (mPlayRegionDragsSelection && !mProject->IsPlayRegionLocked())
|
||||
@ -2111,12 +2111,12 @@ void AdornedRulerPanel::ShowMenu(const wxPoint & pos)
|
||||
prlitem = rulerMenu->Append(OnLockPlayRegionID, _("Lock Play Region"));
|
||||
else
|
||||
prlitem = rulerMenu->Append(OnLockPlayRegionID, _("Unlock Play Region"));
|
||||
prlitem->Enable(mProject->IsPlayRegionLocked() || mProject->GetSel0() != mProject->GetSel1());
|
||||
prlitem->Enable(mProject->IsPlayRegionLocked() || (mPlayRegionStart != mPlayRegionEnd));
|
||||
|
||||
PopupMenu(rulerMenu, pos);
|
||||
|
||||
delete rulerMenu;
|
||||
// dismiss and clear Quick Play indicator
|
||||
// dismiss and clear Quick-Play indicator
|
||||
mQuickPlayInd = false;
|
||||
wxClientDC cdc(this);
|
||||
DrawQuickPlayIndicator(&cdc, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user