From f28d91a599a7f63b2f72de00f55a7b26fff5ddc9 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Wed, 11 Aug 2010 23:15:00 +0000 Subject: [PATCH] Consolidate multiple names for the same feature: sticky/linked/sync/synchro/grouped -> sync-lock. --- src/AColor.cpp | 12 ++++++------ src/AllThemeResources.h | 4 ++-- src/LabelTrack.cpp | 2 +- src/Menus.cpp | 8 ++++---- src/Project.cpp | 6 +++--- src/TrackArtist.cpp | 6 +++--- src/TrackArtist.h | 4 ++-- src/TrackPanel.cpp | 4 ++-- src/toolbars/EditToolBar.cpp | 36 ++++++++++++------------------------ src/toolbars/EditToolBar.h | 2 +- 10 files changed, 36 insertions(+), 48 deletions(-) diff --git a/src/AColor.cpp b/src/AColor.cpp index ed1a1a9f8..3ce5c9e40 100644 --- a/src/AColor.cpp +++ b/src/AColor.cpp @@ -395,14 +395,14 @@ void AColor::Init() WideEnvelopePen.SetWidth( 3 ); - theTheme.SetBrushColour( labelTextNormalBrush, clrLabelTextNormalBrush ); - theTheme.SetBrushColour( labelTextEditBrush, clrLabelTextEditBrush ); - theTheme.SetBrushColour( labelUnselectedBrush, clrLabelUnselectedBrush ); - theTheme.SetBrushColour( labelSelectedBrush, clrLabelSelectedBrush ); - theTheme.SetBrushColour( labelSyncLockSelBrush, clrSyncLockSel ); + theTheme.SetBrushColour( labelTextNormalBrush, clrLabelTextNormalBrush ); + theTheme.SetBrushColour( labelTextEditBrush, clrLabelTextEditBrush ); + theTheme.SetBrushColour( labelUnselectedBrush, clrLabelUnselectedBrush ); + theTheme.SetBrushColour( labelSelectedBrush, clrLabelSelectedBrush ); + theTheme.SetBrushColour( labelSyncLockSelBrush, clrSyncLockSel ); theTheme.SetPenColour( labelUnselectedPen, clrLabelUnselectedPen ); theTheme.SetPenColour( labelSelectedPen, clrLabelSelectedPen ); - theTheme.SetPenColour( labelSyncLockSelPen, clrSyncLockSel ); + theTheme.SetPenColour( labelSyncLockSelPen, clrSyncLockSel ); theTheme.SetPenColour( labelSurroundPen, clrLabelSurroundPen ); // These colors were modified to avoid using reserved colors red and green diff --git a/src/AllThemeResources.h b/src/AllThemeResources.h index 6ff8b2e33..5a7fc50d7 100644 --- a/src/AllThemeResources.h +++ b/src/AllThemeResources.h @@ -137,8 +137,8 @@ from there. Audacity will look for a file called "Pause.png". DEFINE_IMAGE( bmpUndoDisabled, wxImage( 26, 24 ), wxT("UndoDisabled")); DEFINE_IMAGE( bmpRedo, wxImage( 26, 24 ), wxT("Redo")); DEFINE_IMAGE( bmpRedoDisabled, wxImage( 26, 24 ), wxT("RedoDisabled")); - DEFINE_IMAGE( bmpLinkTracks, wxImage( 20, 20 ), wxT("LinkTracks")); - DEFINE_IMAGE( bmpLinkTracksDisabled, wxImage( 20, 20 ), wxT("LinkTracksDisabled")); + DEFINE_IMAGE( bmpSyncLockTracks, wxImage( 20, 20 ), wxT("SyncLockTracks")); + DEFINE_IMAGE( bmpSyncLockTracksDisabled, wxImage( 20, 20 ), wxT("SyncLockTracksDisabled")); SET_THEME_FLAGS( resFlagPaired | resFlagNewLine ); DEFINE_IMAGE( bmpTnStartOn, wxImage( 27, 27 ), wxT("TnStartOn")); diff --git a/src/LabelTrack.cpp b/src/LabelTrack.cpp index d74f4b076..eb9598c13 100644 --- a/src/LabelTrack.cpp +++ b/src/LabelTrack.cpp @@ -750,7 +750,7 @@ void LabelTrack::Draw(wxDC & dc, const wxRect & r, double h, double pps, // If selection is sync-lock selected, draw in linked graphics. if (IsSyncLockSelected() && !GetSelected() && selr.width > 0) { - TrackArtist::DrawLinkTiles(&dc, selr); + TrackArtist::DrawSyncLockTiles(&dc, selr); } wxRect after = r; diff --git a/src/Menus.cpp b/src/Menus.cpp index aa7a83cdb..34e0f5334 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -1522,7 +1522,7 @@ void AudacityProject::ModifyToolbarMenus() mCommandManager.Check(wxT("Duplex"), active); gPrefs->Read(wxT("/AudioIO/SWPlaythrough"),&active, false); mCommandManager.Check(wxT("SWPlaythrough"), active); - gPrefs->Read(wxT("/GUI/LinkTracks"), &active, false); + gPrefs->Read(wxT("/GUI/SyncLockTracks"), &active, false); SetSyncLock(active); mCommandManager.Check(wxT("SyncLock"), active); } @@ -5143,9 +5143,9 @@ int AudacityProject::DoAddLabel(double left, double right) void AudacityProject::OnSyncLock() { - bool linkTracks; - gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, false); - gPrefs->Write(wxT("/GUI/LinkTracks"), !linkTracks); + bool bSyncLockTracks; + gPrefs->Read(wxT("/GUI/SyncLockTracks"), &bSyncLockTracks, false); + gPrefs->Write(wxT("/GUI/SyncLockTracks"), !bSyncLockTracks); // Toolbar, project sync-lock handled within ModifyAllProjectToolbarMenus(); diff --git a/src/Project.cpp b/src/Project.cpp index c4c41c3e9..7aaf18284 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -806,9 +806,9 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id, mViewInfo.bRedrawWaveform = false; mLockPlayRegion = false; - bool linkTracks; - gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, false); - SetSyncLock(linkTracks); + bool bSyncLockTracks; + gPrefs->Read(wxT("/GUI/SyncLockTracks"), &bSyncLockTracks, false); + SetSyncLock(bSyncLockTracks); CreateMenusAndCommands(); diff --git a/src/TrackArtist.cpp b/src/TrackArtist.cpp index 21213dd8c..551a1f19c 100644 --- a/src/TrackArtist.cpp +++ b/src/TrackArtist.cpp @@ -761,7 +761,7 @@ void TrackArtist::DrawWaveformBackground(wxDC &dc, const wxRect &r, const double begin = x; for (; x < r.width && where[x] < ssel1; ++x); end = x; - DrawLinkTiles(&dc, wxRect(r.x + begin, r.y, end - 1 - begin, r.height)); + DrawSyncLockTiles(&dc, wxRect(r.x + begin, r.y, end - 1 - begin, r.height)); } //OK, the display bounds are between min and max, which @@ -2639,8 +2639,8 @@ void TrackArtist::SetSpectrumLogMaxFreq(int freq) mLogMaxFreq = freq; } -// Draws the link bitmap, tiled; always draws stationary relative to the DC -void TrackArtist::DrawLinkTiles(wxDC *dc, wxRect r) +// Draws the sync-lock bitmap, tiled; always draws stationary relative to the DC +void TrackArtist::DrawSyncLockTiles(wxDC *dc, wxRect r) { wxBitmap syncLockBitmap(theTheme.Image(bmpLinkSelect)); diff --git a/src/TrackArtist.h b/src/TrackArtist.h index a270e59d9..a93a53143 100644 --- a/src/TrackArtist.h +++ b/src/TrackArtist.h @@ -91,8 +91,8 @@ class AUDACITY_DLL_API TrackArtist { this->selectedPen = selectedPen; } - // Helper: draws the "linked" watermark tiled to a rectangle - static void DrawLinkTiles(wxDC *dc, wxRect r); + // Helper: draws the "sync-locked" watermark tiled to a rectangle + static void DrawSyncLockTiles(wxDC *dc, wxRect r); private: diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 5f5ce6ca1..ee67aab50 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -5135,12 +5135,12 @@ 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 + // Draw sync-lock tiles in ruler area. if (t->IsSyncLockSelected()) { wxRect tileFill = r; tileFill.x = GetVRulerOffset(); tileFill.width = GetVRulerWidth(); - TrackArtist::DrawLinkTiles(dc, tileFill); + TrackArtist::DrawSyncLockTiles(dc, tileFill); } DrawBordersAroundTrack(t, dc, r, labelw, vrul); diff --git a/src/toolbars/EditToolBar.cpp b/src/toolbars/EditToolBar.cpp index eb0d29d04..f29f72710 100644 --- a/src/toolbars/EditToolBar.cpp +++ b/src/toolbars/EditToolBar.cpp @@ -148,8 +148,8 @@ void EditToolBar::Populate() AddSeparator(); #ifdef EXPERIMENTAL_LINKING - AddButton(bmpLinkTracks, bmpLinkTracksDisabled, ETBLinkID, - _("Link Tracks"), true); + AddButton(bmpSyncLockTracks, bmpSyncLockTracksDisabled, ETBSyncLockID, + _("Sync-Lock Tracks"), true); AddSeparator(); #endif @@ -172,7 +172,7 @@ void EditToolBar::Populate() mButtons[ETBPasteID]->SetEnabled(false); #ifdef EXPERIMENTAL_LINKING - mButtons[ETBLinkID]->PushDown(); + mButtons[ETBSyncLockID]->PushDown(); #endif RegenerateTooltips(); @@ -199,9 +199,9 @@ void EditToolBar::RegenerateTooltips() mButtons[ETBSilenceID]->SetToolTip(_("Silence")); mButtons[ETBUndoID]->SetToolTip(_("Undo")); mButtons[ETBRedoID]->SetToolTip(_("Redo")); -#ifdef EXPERIMENTAL_LINKING - mButtons[ETBLinkID]->SetToolTip(_("Link Tracks")); -#endif + #ifdef EXPERIMENTAL_LINKING + mButtons[ETBSyncLockID]->SetToolTip(_("Sync-Lock Tracks")); + #endif mButtons[ETBZoomInID]->SetToolTip(_("Zoom In")); mButtons[ETBZoomOutID]->SetToolTip(_("Zoom Out")); mButtons[ETBZoomSelID]->SetToolTip(_("Fit Selection")); @@ -240,7 +240,7 @@ void EditToolBar::OnButton(wxCommandEvent &event) if (!busy) p->OnRedo(); break; #ifdef EXPERIMENTAL_LINKING - case ETBLinkID: + case ETBSyncLockID: if (!busy) p->OnSyncLock(); return;//avoiding the call to SetButton() #endif @@ -306,24 +306,12 @@ void EditToolBar::EnableDisableButtons() mButtons[ETBPasteID]->SetEnabled(p->Clipboard()); #ifdef EXPERIMENTAL_LINKING - bool linkTracks; - gPrefs->Read(wxT("/GUI/LinkTracks"), &linkTracks, false); + bool bSyncLockTracks; + gPrefs->Read(wxT("/GUI/SyncLockTracks"), &bSyncLockTracks, false); - if (linkTracks) - mButtons[ETBLinkID]->PushDown(); + if (bSyncLockTracks) + mButtons[ETBSyncLockID]->PushDown(); else - mButtons[ETBLinkID]->PopUp(); + mButtons[ETBSyncLockID]->PopUp(); #endif } - -// Indentation settings for Vim and Emacs and unique identifier for Arch, a -// version control system. Please do not modify past this point. -// -// Local Variables: -// c-basic-offset: 3 -// indent-tabs-mode: nil -// End: -// -// vim: et sts=3 sw=3 -// arch-tag: 55533f04-7fee-4a50-a3b6-e392ab2f8713 - diff --git a/src/toolbars/EditToolBar.h b/src/toolbars/EditToolBar.h index 142888afb..8d76dcff8 100644 --- a/src/toolbars/EditToolBar.h +++ b/src/toolbars/EditToolBar.h @@ -38,7 +38,7 @@ enum { ETBRedoID, #ifdef EXPERIMENTAL_LINKING - ETBLinkID, + ETBSyncLockID, #endif ETBZoomInID,