From 209a2b193d655fab67c9b3dac324dcd9103b0d74 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Wed, 11 Aug 2010 22:47:26 +0000 Subject: [PATCH] Consolidate multiple names for the same feature: sticky/linked/sync/synchro/grouped -> sync-lock. --- src/AColor.cpp | 8 ++--- src/AColor.h | 4 +-- src/AllThemeResources.h | 4 +-- src/LabelTrack.cpp | 12 +++---- src/Menus.cpp | 54 ++++++++++++++++---------------- src/Menus.h | 4 +-- src/Project.cpp | 24 +++++++------- src/Project.h | 8 ++--- src/Track.cpp | 6 ++-- src/Track.h | 6 ++-- src/TrackArtist.cpp | 38 +++++++++++----------- src/TrackArtist.h | 2 +- src/TrackPanel.cpp | 8 ++--- src/WaveTrack.cpp | 2 +- src/WaveTrack.h | 2 +- src/effects/ChangeSpeed.cpp | 6 ++-- src/effects/Effect.cpp | 4 +-- src/effects/Generator.cpp | 4 +-- src/effects/Repeat.cpp | 6 ++-- src/effects/Reverse.cpp | 4 +-- src/effects/SBSMSEffect.cpp | 9 +++--- src/effects/SoundTouchEffect.cpp | 8 ++--- src/effects/TruncSilence.cpp | 10 +++--- src/effects/nyquist/Nyquist.cpp | 4 +-- src/toolbars/EditToolBar.cpp | 2 +- 25 files changed, 120 insertions(+), 119 deletions(-) diff --git a/src/AColor.cpp b/src/AColor.cpp index 3af984676..ed1a1a9f8 100644 --- a/src/AColor.cpp +++ b/src/AColor.cpp @@ -54,10 +54,10 @@ wxBrush AColor::labelTextNormalBrush; wxBrush AColor::labelTextEditBrush; wxBrush AColor::labelUnselectedBrush; wxBrush AColor::labelSelectedBrush; -wxBrush AColor::labelSyncSelBrush; +wxBrush AColor::labelSyncLockSelBrush; wxPen AColor::labelUnselectedPen; wxPen AColor::labelSelectedPen; -wxPen AColor::labelSyncSelPen; +wxPen AColor::labelSyncLockSelPen; wxPen AColor::labelSurroundPen; wxPen AColor::trackFocusPens[3]; wxPen AColor::snapGuidePen; @@ -399,10 +399,10 @@ void AColor::Init() theTheme.SetBrushColour( labelTextEditBrush, clrLabelTextEditBrush ); theTheme.SetBrushColour( labelUnselectedBrush, clrLabelUnselectedBrush ); theTheme.SetBrushColour( labelSelectedBrush, clrLabelSelectedBrush ); - theTheme.SetBrushColour( labelSyncSelBrush, clrSyncSel ); + theTheme.SetBrushColour( labelSyncLockSelBrush, clrSyncLockSel ); theTheme.SetPenColour( labelUnselectedPen, clrLabelUnselectedPen ); theTheme.SetPenColour( labelSelectedPen, clrLabelSelectedPen ); - theTheme.SetPenColour( labelSyncSelPen, clrSyncSel ); + theTheme.SetPenColour( labelSyncLockSelPen, clrSyncLockSel ); theTheme.SetPenColour( labelSurroundPen, clrLabelSurroundPen ); // These colors were modified to avoid using reserved colors red and green diff --git a/src/AColor.h b/src/AColor.h index 167592350..d3a68290b 100644 --- a/src/AColor.h +++ b/src/AColor.h @@ -82,10 +82,10 @@ class AColor { static wxBrush labelTextEditBrush; static wxBrush labelUnselectedBrush; static wxBrush labelSelectedBrush; - static wxBrush labelSyncSelBrush; + static wxBrush labelSyncLockSelBrush; static wxPen labelUnselectedPen; static wxPen labelSelectedPen; - static wxPen labelSyncSelPen; + static wxPen labelSyncLockSelPen; static wxPen labelSurroundPen; static wxPen trackFocusPens[3]; diff --git a/src/AllThemeResources.h b/src/AllThemeResources.h index e4b2bb67a..6ff8b2e33 100644 --- a/src/AllThemeResources.h +++ b/src/AllThemeResources.h @@ -324,8 +324,8 @@ from there. Audacity will look for a file called "Pause.png". DEFINE_COLOUR( clrProgressDone, wxColour(60, 240, 60, 128), wxT("ProgressDone")); DEFINE_COLOUR( clrProgressNotYet, wxColour(255, 255, 255,220), wxT("ProgressNotYet")); - DEFINE_COLOUR( clrSyncSel, wxColour(192, 192, 192), wxT("SyncSel")); - DEFINE_COLOUR( clrTrackInfoSyncSel, wxColour( 64, 64, 64), wxT("TrackInfoSyncSel")); + DEFINE_COLOUR( clrSyncLockSel, wxColour(192, 192, 192), wxT("SyncLockSel")); + DEFINE_COLOUR( clrTrackInfoSyncLockSel, wxColour( 64, 64, 64), wxT("TrackInfoSyncLockSel")); DEFINE_COLOUR( clrSelTranslucent, wxColour(104, 104, 148, 127), wxT("SelTranslucent")); // Indentation settings for Vim and Emacs and unique identifier for Arch, a diff --git a/src/LabelTrack.cpp b/src/LabelTrack.cpp index d4ec4d685..d74f4b076 100644 --- a/src/LabelTrack.cpp +++ b/src/LabelTrack.cpp @@ -736,10 +736,10 @@ void LabelTrack::Draw(wxDC & dc, const wxRect & r, double h, double pps, selr.x += before.width; selr.width = int ((dsel1 - dsel0) * pps); - // If selection is synchro use synchro colors - if (IsSynchroSelected() && !GetSelected()) { - dc.SetBrush(AColor::labelSyncSelBrush); - dc.SetPen(AColor::labelSyncSelPen); + // If selection is sync-lock selected use sync-lock selected colors. + if (IsSyncLockSelected() && !GetSelected()) { + dc.SetBrush(AColor::labelSyncLockSelBrush); + dc.SetPen(AColor::labelSyncLockSelPen); } else { dc.SetBrush(AColor::labelSelectedBrush); @@ -748,8 +748,8 @@ void LabelTrack::Draw(wxDC & dc, const wxRect & r, double h, double pps, dc.DrawRectangle(selr); - // If selection is synchro, draw in linked graphics - if (IsSynchroSelected() && !GetSelected() && selr.width > 0) { + // If selection is sync-lock selected, draw in linked graphics. + if (IsSyncLockSelected() && !GetSelected() && selr.width > 0) { TrackArtist::DrawLinkTiles(&dc, selr); } diff --git a/src/Menus.cpp b/src/Menus.cpp index 8b2d14309..aa7a83cdb 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -446,10 +446,10 @@ void AudacityProject::CreateMenusAndCommands() TracksExistFlag, TracksExistFlag); #ifdef EXPERIMENTAL_LINKING - c->AddItem(wxT("SelSyncTracks"), _("In All S&ync-selected Tracks"), - FN(OnSelectSyncSel), wxT("Ctrl+Shift+Y"), - TracksSelectedFlag | LinkingEnabledFlag, - TracksSelectedFlag | LinkingEnabledFlag); + c->AddItem(wxT("SelSyncLockTracks"), _("In All S&ync-Locked Tracks"), + FN(OnSelectSyncLockSel), wxT("Ctrl+Shift+Y"), + TracksSelectedFlag | LinkingEnabledFlag, + TracksSelectedFlag | LinkingEnabledFlag); #endif c->EndSubMenu(); @@ -718,7 +718,7 @@ void AudacityProject::CreateMenusAndCommands() c->AddSeparator(); #ifdef EXPERIMENTAL_LINKING - c->AddCheck(wxT("StickyLabels"), _("&Link Tracks"), FN(OnStickyLabel), 0); + c->AddCheck(wxT("SyncLock"), _("Sync-&Lock Tracks"), FN(OnSyncLock), 0); c->AddSeparator(); #endif @@ -1456,7 +1456,7 @@ wxUint32 AudacityProject::GetUpdateFlags() if (wxGetApp().GetRecentFiles()->GetCount() > 0) flags |= HaveRecentFiles; - if (IsSticky()) + if (IsSyncLocked()) flags |= LinkingEnabledFlag; else flags |= LinkingDisabledFlag; @@ -1510,7 +1510,7 @@ void AudacityProject::ModifyToolbarMenus() } // These don't really belong here, but it's easier and especially so for - // the Edit toolbar and the sticky menu item. + // the Edit toolbar and the sync-lock menu item. bool active; gPrefs->Read(wxT("/AudioIO/SoundActivatedRecord"),&active, false); mCommandManager.Check(wxT("SoundActivation"), active); @@ -1523,8 +1523,8 @@ void AudacityProject::ModifyToolbarMenus() gPrefs->Read(wxT("/AudioIO/SWPlaythrough"),&active, false); mCommandManager.Check(wxT("SWPlaythrough"), active); gPrefs->Read(wxT("/GUI/LinkTracks"), &active, false); - SetStickyFlag(active); - mCommandManager.Check(wxT("StickyLabels"), active); + SetSyncLock(active); + mCommandManager.Check(wxT("SyncLock"), active); } void AudacityProject::UpdateMenus() @@ -3090,8 +3090,8 @@ void AudacityProject::OnCut() n = iter.First(); while (n) { - // We clear from selected and synchro-selected tracks - if (n->GetSelected() || n->IsSynchroSelected()) { + // We clear from selected and sync-lock selected tracks. + if (n->GetSelected() || n->IsSyncLockSelected()) { switch (n->GetKind()) { #if defined(USE_MIDI) @@ -3264,9 +3264,9 @@ void AudacityProject::OnPaste() c = tmpC; while (n && (c->GetKind() != n->GetKind() || !n->GetSelected())) { - // Must perform sync-adjustment before incrementing n - if (n->IsSynchroSelected()) { - bPastedSomething |= n->SyncAdjust(t1, t0+msClipLen); + // Must perform sync-lock adjustment before incrementing n + if (n->IsSyncLockSelected()) { + bPastedSomething |= n->SyncLockAdjust(t1, t0+msClipLen); } n = iter.Next(); } @@ -3313,7 +3313,7 @@ void AudacityProject::OnPaste() // To be (sort of) consistent with Clear behavior, we'll only shift // them if linking is on - if (IsSticky()) + if (IsSyncLocked()) ((LabelTrack *)n)->ShiftLabelsOnInsert(msClipLen, t0); bPastedSomething |= ((LabelTrack *)n)->PasteOver(t0, c); @@ -3351,9 +3351,9 @@ void AudacityProject::OnPaste() c = clipIter.Next(); } } // if (n->GetSelected()) - else if (n->IsSynchroSelected()) + else if (n->IsSyncLockSelected()) { - bPastedSomething |= n->SyncAdjust(t1, t0 + msClipLen); + bPastedSomething |= n->SyncLockAdjust(t1, t0 + msClipLen); } n = iter.Next(); @@ -3390,12 +3390,12 @@ void AudacityProject::OnPaste() ((LabelTrack *)n)->Clear(t0, t1); // As above, only shift labels if linking is on - if (IsSticky()) + if (IsSyncLocked()) ((LabelTrack *)n)->ShiftLabelsOnInsert(msClipLen, t0); } - else if (n->IsSynchroSelected()) + else if (n->IsSyncLockSelected()) { - n->SyncAdjust(t1, t0 + msClipLen); + n->SyncLockAdjust(t1, t0 + msClipLen); } n = iter.Next(); @@ -4157,12 +4157,12 @@ void AudacityProject::OnSelectStartCursor() mTrackPanel->Refresh(false); } -void AudacityProject::OnSelectSyncSel() +void AudacityProject::OnSelectSyncLockSel() { TrackListIterator iter(mTracks); for (Track *t = iter.First(); t; t = iter.Next()) { - if (t->IsSynchroSelected()) { + if (t->IsSyncLockSelected()) { t->SetSelected(true); } } @@ -4871,7 +4871,7 @@ void AudacityProject::HandleAlign(int index, bool moveSel) Track *t = iter.First(); while (t) { - // This shifts different tracks in different ways, so no sync move + // This shifts different tracks in different ways, so no sync-lock move. if (t->GetSelected()) { t->SetOffset(newPos); } @@ -4884,8 +4884,8 @@ void AudacityProject::HandleAlign(int index, bool moveSel) Track *t = iter.First(); while (t) { - // For a fixed-distance shift move sync-selected tracks also - if (t->GetSelected() || t->IsSynchroSelected()) { + // For a fixed-distance shift move sync-lock selected tracks also. + if (t->GetSelected() || t->IsSyncLockSelected()) { t->SetOffset(t->GetOffset() + delta); } t = iter.Next(); @@ -5141,13 +5141,13 @@ int AudacityProject::DoAddLabel(double left, double right) return index; } -void AudacityProject::OnStickyLabel() +void AudacityProject::OnSyncLock() { bool linkTracks; gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, false); gPrefs->Write(wxT("/GUI/LinkTracks"), !linkTracks); - // Toolbar, project "sticky flag" handled within + // Toolbar, project sync-lock handled within ModifyAllProjectToolbarMenus(); } diff --git a/src/Menus.h b/src/Menus.h index 188419ed7..066d05117 100644 --- a/src/Menus.h +++ b/src/Menus.h @@ -239,7 +239,7 @@ void OnSelectAll(); void OnSelectNone(); void OnSelectCursorEnd(); void OnSelectStartCursor(); -void OnSelectSyncSel(); +void OnSelectSyncLockSel(); void OnSelectAllTracks(); // View Menu @@ -329,7 +329,7 @@ void OnNewLabelTrack(); void OnNewTimeTrack(); void OnTimerRecord(); void OnRemoveTracks(); -void OnStickyLabel(); +void OnSyncLock(); void OnAddLabel(); void OnAddLabelPlaying(); void OnEditLabels(); diff --git a/src/Project.cpp b/src/Project.cpp index 7ad3da981..c4c41c3e9 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -808,7 +808,7 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id, mLockPlayRegion = false; bool linkTracks; gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, false); - SetStickyFlag(linkTracks); + SetSyncLock(linkTracks); CreateMenusAndCommands(); @@ -3664,7 +3664,7 @@ void AudacityProject::Clear() Track *n = iter.First(); while (n) { - if (n->GetSelected() || n->IsSynchroSelected()) { + if (n->GetSelected() || n->IsSyncLockSelected()) { n->Clear(mViewInfo.sel0, mViewInfo.sel1); } n = iter.Next(); @@ -3964,11 +3964,11 @@ void AudacityProject::GetRegionsByLabel( Regions ®ions ) //Executes the edit function on all selected wave tracks with //regions specified by selected labels //If No tracks selected, function is applied on all tracks -//If the function replaces the selection with audio of a different length -// syncTracks should be set true to perform the same action on sync-selected +//If the function replaces the selection with audio of a different length, +// bSyncLockedTracks should be set true to perform the same action on sync-lock selected // tracks. void AudacityProject::EditByLabel( WaveTrack::EditFunction action, - bool syncTracks ) + bool bSyncLockedTracks ) { Regions regions; @@ -3995,8 +3995,8 @@ void AudacityProject::EditByLabel( WaveTrack::EditFunction action, n = iter.First(); while (n) { - if( n->GetKind() == Track::Wave && ( allTracks || n->GetSelected() || - (syncTracks && n->IsSynchroSelected()) ) ) + if ((n->GetKind() == Track::Wave) && + (allTracks || n->GetSelected() || (bSyncLockedTracks && n->IsSyncLockSelected()))) { WaveTrack *wt = ( WaveTrack* )n; for( int i = ( int )regions.GetCount() - 1; i >= 0; i-- ) @@ -4394,19 +4394,19 @@ bool AudacityProject::GetSnapTo() return mSnapTo; } -bool AudacityProject::IsSticky() +bool AudacityProject::IsSyncLocked() { #ifdef EXPERIMENTAL_LINKING - return mStickyFlag; + return mIsSyncLocked; #else return false; #endif } -void AudacityProject::SetStickyFlag(bool flag) +void AudacityProject::SetSyncLock(bool flag) { - if (flag != mStickyFlag) { - mStickyFlag = flag; + if (flag != mIsSyncLocked) { + mIsSyncLocked = flag; if (GetTrackPanel()) GetTrackPanel()->Refresh(false); } diff --git a/src/Project.h b/src/Project.h index 684960da4..b62d258b3 100644 --- a/src/Project.h +++ b/src/Project.h @@ -278,10 +278,10 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame, void Rewind(bool shift); void SkipEnd(bool shift); void SetStop(bool bStopped); - void EditByLabel( WaveTrack::EditFunction action, bool syncTracks ); + void EditByLabel( WaveTrack::EditFunction action, bool bSyncLockedTracks ); void EditClipboardByLabel( WaveTrack::EditDestFunction action ); - bool IsSticky(); - void SetStickyFlag(bool flag); + bool IsSyncLocked(); + void SetSyncLock(bool flag); // "exclusive" mute means mute the chosen track and unmute all others. void HandleTrackMute(Track *t, const bool exclusive); @@ -499,7 +499,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame, bool mEmptyCanBeDirty; bool mSelectAllOnNone; - bool mStickyFlag; + bool mIsSyncLocked; bool mLockPlayRegion; diff --git a/src/Track.cpp b/src/Track.cpp index 0584e48f6..e5deecdc3 100644 --- a/src/Track.cpp +++ b/src/Track.cpp @@ -205,11 +205,11 @@ Track *Track::GetLink() const return NULL; } -bool Track::IsSynchroSelected() +bool Track::IsSyncLockSelected() { #ifdef EXPERIMENTAL_LINKING AudacityProject *p = GetActiveProject(); - if (!p || !p->IsSticky()) + if (!p || !p->IsSyncLocked()) return false; TrackGroupIterator git(mList); @@ -229,7 +229,7 @@ bool Track::IsSynchroSelected() return false; } -bool Track::SyncAdjust(double oldT1, double newT1) +bool Track::SyncLockAdjust(double oldT1, double newT1) { if (newT1 > oldT1) { // Insert space within the track diff --git a/src/Track.h b/src/Track.h index 062ff1e9a..30f727bec 100644 --- a/src/Track.h +++ b/src/Track.h @@ -162,9 +162,9 @@ class AUDACITY_DLL_API Track: public XMLTagHandler virtual bool Clear(double t0, double t1) {return false;} virtual bool Paste(double t, Track * src) {return false;} - // This can be used to adjust a synchro-selected track when the selection + // This can be used to adjust a sync-lock selected track when the selection // is replaced by one of a different length. - virtual bool SyncAdjust(double oldT1, double newT1); + virtual bool SyncLockAdjust(double oldT1, double newT1); virtual bool Silence(double t0, double t1) {return false;} virtual bool InsertSilence(double t, double len) {return false;} @@ -185,7 +185,7 @@ class AUDACITY_DLL_API Track: public XMLTagHandler virtual double GetEndTime() { return 0.0; } // Checks if linking is on and any track in its group is selected - bool IsSynchroSelected(); + bool IsSyncLockSelected(); }; struct TrackListNode diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index b3abb7c0e..21213dd8c 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -662,7 +662,7 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double float zoomMin, float zoomMax, bool dB, const sampleCount where[], sampleCount ssel0, sampleCount ssel1, - bool drawEnvelope, bool synchroSelection) + bool drawEnvelope, bool bIsSyncLockSelected) { // Visually (one vertical slice of the waveform background, on its side; // the "*" is the actual waveform background we're drawing @@ -711,8 +711,8 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double mintop = halfHeight; } - // We don't draw selection color for sync-sel tracks - sel = (ssel0 <= where[x] && where[x + 1] < ssel1) && !synchroSelection; + // We don't draw selection color for sync-lock selected tracks. + sel = (ssel0 <= where[x] && where[x + 1] < ssel1) && !bIsSyncLockSelected; if (lmaxtop == maxtop && lmintop == mintop && @@ -753,8 +753,8 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double dc.DrawRectangle(l, r.y + lmaxtop, w, lminbot - lmaxtop); } - // If sync-selected, draw in linked graphics - if (synchroSelection && ssel0 < ssel1) { + // If sync-lock selected, draw in linked graphics. + if (bIsSyncLockSelected && ssel0 < ssel1) { // Find the beginning/end of the selection int begin, end; for (x = 0; x < r.width && where[x] < ssel0; ++x); @@ -1148,7 +1148,7 @@ void TrackArtist::DrawClipWaveform(WaveTrack *track, double sps = 1./rate; //seconds-per-sample //If the track isn't selected, make the selection empty - if (!track->GetSelected() && !track->IsSynchroSelected()) { + if (!track->GetSelected() && !track->IsSyncLockSelected()) { sel0 = sel1 = 0.0; } @@ -2538,7 +2538,7 @@ void TrackArtist::DrawLabelTrack(LabelTrack *track, double sel0 = viewInfo->sel0; double sel1 = viewInfo->sel1; - if (!track->GetSelected() && !track->IsSynchroSelected()) + if (!track->GetSelected() && !track->IsSyncLockSelected()) sel0 = sel1 = 0.0; track->Draw(dc, r, viewInfo->h, viewInfo->zoom, sel0, sel1); @@ -2642,32 +2642,32 @@ void TrackArtist::SetSpectrumLogMaxFreq(int freq) // Draws the link bitmap, tiled; always draws stationary relative to the DC void TrackArtist::DrawLinkTiles(wxDC *dc, wxRect r) { - wxBitmap sync(theTheme.Image(bmpLinkSelect)); + wxBitmap syncLockBitmap(theTheme.Image(bmpLinkSelect)); - int xOffset = r.x % sync.GetWidth(); - if (xOffset < 0) xOffset += sync.GetWidth(); + int xOffset = r.x % syncLockBitmap.GetWidth(); + if (xOffset < 0) xOffset += syncLockBitmap.GetWidth(); int width; for (int x = 0; x < r.width; x += width) { - width = sync.GetWidth() - xOffset; + width = syncLockBitmap.GetWidth() - xOffset; if (x + width > r.width) width = r.width - x; - int yOffset = r.y % sync.GetHeight(); - if (yOffset < 0) yOffset += sync.GetWidth(); + int yOffset = r.y % syncLockBitmap.GetHeight(); + if (yOffset < 0) yOffset += syncLockBitmap.GetWidth(); int height; for (int y = 0; y < r.height; y += height) { - height = sync.GetHeight() - yOffset; + height = syncLockBitmap.GetHeight() - yOffset; if (y + height > r.height) height = r.height - y; // Do we need to get a sub-bitmap? - if (width != sync.GetWidth() || height != sync.GetHeight()) { - wxBitmap subSync = sync.GetSubBitmap(wxRect( - xOffset, yOffset, width, height)); - dc->DrawBitmap(subSync, r.x + x, r.y + y, true); + if (width != syncLockBitmap.GetWidth() || height != syncLockBitmap.GetHeight()) { + wxBitmap subSyncLockBitmap = + syncLockBitmap.GetSubBitmap(wxRect(xOffset, yOffset, width, height)); + dc->DrawBitmap(subSyncLockBitmap, r.x + x, r.y + y, true); } else { - dc->DrawBitmap(sync, r.x + x, r.y + y, true); + dc->DrawBitmap(syncLockBitmap, r.x + x, r.y + y, true); } // Only offset first row diff --git a/src/TrackArtist.h b/src/TrackArtist.h index ebbeed8b0..a270e59d9 100644 --- a/src/TrackArtist.h +++ b/src/TrackArtist.h @@ -138,7 +138,7 @@ class AUDACITY_DLL_API TrackArtist { float zoomMin, float zoomMax, bool dB, const sampleCount where[], sampleCount ssel0, sampleCount ssel1, - bool drawEnvelope, bool synchroSelection); + bool drawEnvelope, bool bIsSyncLockSelected); void DrawMinMaxRMS(wxDC & dc, const wxRect & r, const double env[], float zoomMin, float zoomMax, bool dB, diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 9fb3a32c3..5f5ce6ca1 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -787,7 +787,7 @@ void TrackPanel::SelectTrackLength(Track *t) double maxEnd = t->GetEndTime(); // If we have a group and linking is on, check the group tracks - if (p->IsSticky() && t1 != NULL) + if (p->IsSyncLocked() && t1 != NULL) { for ( ; t1; t1 = it.Next()) { @@ -2359,7 +2359,7 @@ void TrackPanel::StartSlide(wxMouseEvent & event) // Now, if linking is enabled, capture any clip that's linked to a // captured clip - if (GetProject()->IsSticky()) { + if (GetProject()->IsSyncLocked()) { // AWD: mCapturedClipArray expands as the loop runs, so newly-added // clips are considered (the effect is like recursion and terminates // because AddClipsToCapture doesn't add duplicate clips); to remove @@ -5136,7 +5136,7 @@ void TrackPanel::DrawOutside(Track * t, wxDC * dc, const wxRect rec, mTrackInfo.DrawBackground(dc, r, t->GetSelected(), bIsWave, labelw, vrul); // Draw in linked tiles in ruler area - if (t->IsSynchroSelected()) { + if (t->IsSyncLockSelected()) { wxRect tileFill = r; tileFill.x = GetVRulerOffset(); tileFill.width = GetVRulerWidth(); @@ -7355,7 +7355,7 @@ void TrackInfo::DrawTitleBar(wxDC * dc, const wxRect r, Track * t, // Link icon: drawn to the left of the dropdown arrow //vvvvv May want to put this elsewhere in the TrackInfo. //wxBitmap link(theTheme.Image(bmpLinkTP)); - //if (t->IsSynchroSelected()) { + //if (t->IsSyncLockSelected()) { // wxBitmap link(theTheme.Image(bmpLinkTP)); // dc->DrawBitmap(link, // // Arrow's left minus our width and an extra px diff --git a/src/WaveTrack.cpp b/src/WaveTrack.cpp index df935cf05..572b9b0c7 100644 --- a/src/WaveTrack.cpp +++ b/src/WaveTrack.cpp @@ -792,7 +792,7 @@ bool WaveTrack::HandleClear(double t0, double t1, return true; } -bool WaveTrack::SyncAdjust(double oldT1, double newT1) +bool WaveTrack::SyncLockAdjust(double oldT1, double newT1) { if (newT1 > oldT1) { // Insert space within the track diff --git a/src/WaveTrack.h b/src/WaveTrack.h index 1b7c2e214..d88b5e205 100644 --- a/src/WaveTrack.h +++ b/src/WaveTrack.h @@ -155,7 +155,7 @@ class AUDACITY_DLL_API WaveTrack: public Track { bool HandleClear(double t0, double t1, bool addCutLines, bool split); - virtual bool SyncAdjust(double oldT1, double newT1); + virtual bool SyncLockAdjust(double oldT1, double newT1); // Returns true if there are no WaveClips in that region bool IsEmpty(double t0, double t1); diff --git a/src/effects/ChangeSpeed.cpp b/src/effects/ChangeSpeed.cpp index 8910bf440..3d4dcc336 100644 --- a/src/effects/ChangeSpeed.cpp +++ b/src/effects/ChangeSpeed.cpp @@ -118,7 +118,7 @@ bool EffectChangeSpeed::Process() while (t != NULL) { if (t->GetKind() == Track::Label) { - if (t->GetSelected() || t->IsSynchroSelected()) + if (t->GetSelected() || t->IsSyncLockSelected()) { if (!ProcessLabelTrack(t)) { bGoodResult = false; @@ -153,9 +153,9 @@ bool EffectChangeSpeed::Process() } mCurTrackNum++; } - else if (t->IsSynchroSelected()) + else if (t->IsSyncLockSelected()) { - t->SyncAdjust(mT1, mT0 + (mT1 - mT0) * mFactor); + t->SyncLockAdjust(mT1, mT0 + (mT1 - mT0) * mFactor); } //Iterate to the next track diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index e3d755089..1897e229b 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -249,9 +249,9 @@ void Effect::CopyInputTracks(int trackType) for (Track *aTrack = aIt.First(); aTrack; aTrack = aIt.Next()) { - // Include selected tracks, plus sync-selected tracks for Track::All) + // Include selected tracks, plus sync-lock selected tracks for Track::All. if (aTrack->GetSelected() || - (trackType == Track::All && aTrack->IsSynchroSelected())) + (trackType == Track::All && aTrack->IsSyncLockSelected())) { Track *o = aTrack->Duplicate(); mOutputTracks->Add(o); diff --git a/src/effects/Generator.cpp b/src/effects/Generator.cpp index fc10b6994..b06eed036 100644 --- a/src/effects/Generator.cpp +++ b/src/effects/Generator.cpp @@ -89,8 +89,8 @@ bool Generator::Process() ntrack++; } - else if (t->IsSynchroSelected()) { - t->SyncAdjust(mT1, mT0 + mDuration); + else if (t->IsSyncLockSelected()) { + t->SyncLockAdjust(mT1, mT0 + mDuration); } // Move on to the next track t = iter.Next(); diff --git a/src/effects/Repeat.cpp b/src/effects/Repeat.cpp index e03347159..ff695f7a2 100644 --- a/src/effects/Repeat.cpp +++ b/src/effects/Repeat.cpp @@ -122,7 +122,7 @@ bool EffectRepeat::Process() for (Track *t = iter.First(); t && bGoodResult; t = iter.Next()) { if (t->GetKind() == Track::Label) { - if (t->GetSelected() || t->IsSynchroSelected()) + if (t->GetSelected() || t->IsSyncLockSelected()) { LabelTrack* track = (LabelTrack*)t; @@ -163,9 +163,9 @@ bool EffectRepeat::Process() delete dest; nTrack++; } - else if (t->IsSynchroSelected()) + else if (t->IsSyncLockSelected()) { - t->SyncAdjust(mT1, mT1 + (mT1 - mT0) * repeatCount); + t->SyncLockAdjust(mT1, mT1 + (mT1 - mT0) * repeatCount); } } diff --git a/src/effects/Reverse.cpp b/src/effects/Reverse.cpp index 13d30d7cf..a49244ee1 100644 --- a/src/effects/Reverse.cpp +++ b/src/effects/Reverse.cpp @@ -42,7 +42,7 @@ bool EffectReverse::Process() int count = 0; while (t) { if (t->GetKind() == Track::Wave && - (t->GetSelected() || t->IsSynchroSelected())) + (t->GetSelected() || t->IsSyncLockSelected())) { WaveTrack *track = (WaveTrack*)t; @@ -59,7 +59,7 @@ bool EffectReverse::Process() } } else if (t->GetKind() == Track::Label && - (t->GetSelected() || t->IsSynchroSelected())) + (t->GetSelected() || t->IsSyncLockSelected())) { LabelTrack *track = (LabelTrack*)t; track->ChangeLabelsOnReverse(mT0, mT1); diff --git a/src/effects/SBSMSEffect.cpp b/src/effects/SBSMSEffect.cpp index c83a9f2eb..211fd9f75 100644 --- a/src/effects/SBSMSEffect.cpp +++ b/src/effects/SBSMSEffect.cpp @@ -152,7 +152,8 @@ bool EffectSBSMS::Process() bool bGoodResult = true; //Iterate over each track - //Track::All is needed because this effect needs to introduce silence in the group tracks to keep sync + // Track::All is needed because this effect needs to introduce + // silence in the group tracks to keep sync-lock. this->CopyInputTracks(Track::All); // Set up mOutputTracks. TrackListIterator iter(mOutputTracks); Track* t; @@ -171,7 +172,7 @@ bool EffectSBSMS::Process() t = iter.First(); while (t != NULL) { if (t->GetKind() == Track::Label && - (t->GetSelected() || (mustSync && t->IsSynchroSelected())) ) + (t->GetSelected() || (mustSync && t->IsSyncLockSelected())) ) { if (!ProcessLabelTrack(t)) { bGoodResult = false; @@ -371,9 +372,9 @@ bool EffectSBSMS::Process() } mCurTrackNum++; } - else if (mustSync && t->IsSynchroSelected()) + else if (mustSync && t->IsSyncLockSelected()) { - t->SyncAdjust(mCurT1, mCurT0 + (mCurT1 - mCurT0) * mTotalStretch); + t->SyncLockAdjust(mCurT1, mCurT0 + (mCurT1 - mCurT0) * mTotalStretch); } //Iterate to the next track t = iter.Next(); diff --git a/src/effects/SoundTouchEffect.cpp b/src/effects/SoundTouchEffect.cpp index 11d5c38ba..2bbfd8c32 100644 --- a/src/effects/SoundTouchEffect.cpp +++ b/src/effects/SoundTouchEffect.cpp @@ -41,7 +41,7 @@ bool EffectSoundTouch::Process() // time warper should also be set. // Check if this effect will alter the selection length; if so, we need - // to operate on sync-selected tracks + // to operate on sync-lock selected tracks. bool mustSync = true; if (mT1 == GetTimeWarper()->Warp(mT1)) { mustSync = false; @@ -60,7 +60,7 @@ bool EffectSoundTouch::Process() t = iter.First(); while (t != NULL) { if (t->GetKind() == Track::Label && - (t->GetSelected() || (mustSync && t->IsSynchroSelected())) ) + (t->GetSelected() || (mustSync && t->IsSyncLockSelected())) ) { if (!ProcessLabelTrack(t)) { @@ -128,8 +128,8 @@ bool EffectSoundTouch::Process() } mCurTrackNum++; } - else if (mustSync && t->IsSynchroSelected()) { - t->SyncAdjust(mT1, GetTimeWarper()->Warp(mT1)); + else if (mustSync && t->IsSyncLockSelected()) { + t->SyncLockAdjust(mT1, GetTimeWarper()->Warp(mT1)); } //Iterate to the next track diff --git a/src/effects/TruncSilence.cpp b/src/effects/TruncSilence.cpp index 4d3a327f0..8bb32ee13 100644 --- a/src/effects/TruncSilence.cpp +++ b/src/effects/TruncSilence.cpp @@ -600,7 +600,7 @@ bool EffectTruncSilence::Process() } // - // Now remove the silent regions from all selected/sync-seletcted tracks + // Now remove the silent regions from all selected / sync-lock selected tracks. // // Loop over detected regions in reverse (so cuts don't change time values @@ -636,7 +636,7 @@ bool EffectTruncSilence::Process() continue; if (t->GetKind() == Track::Wave && ( - t->GetSelected() || t->IsSynchroSelected())) + t->GetSelected() || t->IsSyncLockSelected())) { // In WaveTracks, clear with a cross-fade WaveTrack *wt = (WaveTrack *)t; @@ -675,12 +675,12 @@ bool EffectTruncSilence::Process() delete [] buf1; delete [] buf2; } - else if (t->GetSelected() || t->IsSynchroSelected()) + else if (t->GetSelected() || t->IsSyncLockSelected()) { - // Non-wave tracks: just do a sync adjust + // Non-wave tracks: just do a sync-lock adjust double cutStart = (r->start + r->end - cutLen) / 2; double cutEnd = cutStart + cutLen; - t->SyncAdjust(cutEnd, cutStart); + t->SyncLockAdjust(cutEnd, cutStart); } } ++whichReg; diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 1e309b530..5167ebc9a 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -784,8 +784,8 @@ bool EffectNyquist::ProcessOne() Track *t; for (t = git.First(mCurTrack[i]); t; t = git.Next()) { - if (!t->GetSelected() && t->IsSynchroSelected()) { - t->SyncAdjust(mT1, mT0 + out->GetEndTime()); + if (!t->GetSelected() && t->IsSyncLockSelected()) { + t->SyncLockAdjust(mT1, mT0 + out->GetEndTime()); } } } diff --git a/src/toolbars/EditToolBar.cpp b/src/toolbars/EditToolBar.cpp index c980e19e0..eb0d29d04 100644 --- a/src/toolbars/EditToolBar.cpp +++ b/src/toolbars/EditToolBar.cpp @@ -241,7 +241,7 @@ void EditToolBar::OnButton(wxCommandEvent &event) break; #ifdef EXPERIMENTAL_LINKING case ETBLinkID: - if (!busy) p->OnStickyLabel(); + if (!busy) p->OnSyncLock(); return;//avoiding the call to SetButton() #endif case ETBZoomInID: