mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Change "Sync-Lock Tracks" button image from chain-link to clock.
EXPERIMENTAL_LINKING -> EXPERIMENTAL_SYNC_LOCK Restore some "border" lines in TrackInfo. Get rid of unused DEFINE_COLOUR( clrTrackInfoSyncLockSel...). Clean out some undocumented commented-out code. Add/remove some comments.
This commit is contained in:
parent
c3cc10a265
commit
a07fe36456
@ -331,7 +331,6 @@ from there. Audacity will look for a file called "Pause.png".
|
|||||||
DEFINE_COLOUR( clrProgressDone, wxColour(60, 240, 60, 128), wxT("ProgressDone"));
|
DEFINE_COLOUR( clrProgressDone, wxColour(60, 240, 60, 128), wxT("ProgressDone"));
|
||||||
DEFINE_COLOUR( clrProgressNotYet, wxColour(255, 255, 255,220), wxT("ProgressNotYet"));
|
DEFINE_COLOUR( clrProgressNotYet, wxColour(255, 255, 255,220), wxT("ProgressNotYet"));
|
||||||
DEFINE_COLOUR( clrSyncLockSel, wxColour(192, 192, 192), wxT("SyncLockSel"));
|
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"));
|
DEFINE_COLOUR( clrSelTranslucent, wxColour(104, 104, 148, 127), wxT("SelTranslucent"));
|
||||||
// This is for waveform drawing, selected outside of clips
|
// This is for waveform drawing, selected outside of clips
|
||||||
DEFINE_COLOUR( clrBlankSelected, wxColour(170, 170, 192), wxT("BlankSelected"));
|
DEFINE_COLOUR( clrBlankSelected, wxColour(170, 170, 192), wxT("BlankSelected"));
|
||||||
|
@ -445,7 +445,7 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
wxT("Ctrl+Shift+K"),
|
wxT("Ctrl+Shift+K"),
|
||||||
TracksExistFlag, TracksExistFlag);
|
TracksExistFlag, TracksExistFlag);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
c->AddItem(wxT("SelSyncLockTracks"), _("In All S&ync-Locked Tracks"),
|
c->AddItem(wxT("SelSyncLockTracks"), _("In All S&ync-Locked Tracks"),
|
||||||
FN(OnSelectSyncLockSel), wxT("Ctrl+Shift+Y"),
|
FN(OnSelectSyncLockSel), wxT("Ctrl+Shift+Y"),
|
||||||
TracksSelectedFlag | IsSyncLockedFlag,
|
TracksSelectedFlag | IsSyncLockedFlag,
|
||||||
@ -717,7 +717,7 @@ void AudacityProject::CreateMenusAndCommands()
|
|||||||
|
|
||||||
c->AddSeparator();
|
c->AddSeparator();
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
c->AddCheck(wxT("SyncLock"), _("Sync-&Lock Tracks"), FN(OnSyncLock), 0);
|
c->AddCheck(wxT("SyncLock"), _("Sync-&Lock Tracks"), FN(OnSyncLock), 0);
|
||||||
|
|
||||||
c->AddSeparator();
|
c->AddSeparator();
|
||||||
|
@ -4413,7 +4413,7 @@ bool AudacityProject::GetSnapTo()
|
|||||||
|
|
||||||
bool AudacityProject::IsSyncLocked()
|
bool AudacityProject::IsSyncLocked()
|
||||||
{
|
{
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
return mIsSyncLocked;
|
return mIsSyncLocked;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
8061
src/ThemeAsCeeCode.h
8061
src/ThemeAsCeeCode.h
File diff suppressed because it is too large
Load Diff
@ -207,7 +207,7 @@ Track *Track::GetLink() const
|
|||||||
|
|
||||||
bool Track::IsSyncLockSelected()
|
bool Track::IsSyncLockSelected()
|
||||||
{
|
{
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
AudacityProject *p = GetActiveProject();
|
AudacityProject *p = GetActiveProject();
|
||||||
if (!p || !p->IsSyncLocked())
|
if (!p || !p->IsSyncLocked())
|
||||||
return false;
|
return false;
|
||||||
|
@ -500,8 +500,6 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
|||||||
mCapturedTrack = NULL;
|
mCapturedTrack = NULL;
|
||||||
mPopupMenuTarget = NULL;
|
mPopupMenuTarget = NULL;
|
||||||
|
|
||||||
// SetBackgroundColour( wxColour( 255,255,255 ));
|
|
||||||
|
|
||||||
mTimeCount = 0;
|
mTimeCount = 0;
|
||||||
mTimer.parent = this;
|
mTimer.parent = this;
|
||||||
mTimer.Start(kTimerInterval, FALSE);
|
mTimer.Start(kTimerInterval, FALSE);
|
||||||
@ -1551,7 +1549,7 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//For OD regions, we need to override and display the percent complete for this task.
|
//For OD regions, we need to override and display the percent complete for this task.
|
||||||
//first, make sure it's a wavetrack.
|
//first, make sure it's a wavetrack.
|
||||||
if(t->GetKind() == Track::Wave)
|
if(t->GetKind() == Track::Wave)
|
||||||
{
|
{
|
||||||
@ -4765,6 +4763,7 @@ int TrackPanel::DetermineToolToUse( ToolsToolBar * pTtb, wxMouseEvent & event)
|
|||||||
} else if( trackKind != Track::Wave) {
|
} else if( trackKind != Track::Wave) {
|
||||||
currentTool = selectTool;
|
currentTool = selectTool;
|
||||||
// So we are in a wave track.
|
// So we are in a wave track.
|
||||||
|
//FIX-ME: Not necessarily. Haven't checked Track::Note (#if defined(USE_MIDI)).
|
||||||
// From here on the order in which we hit test determines
|
// From here on the order in which we hit test determines
|
||||||
// which tool takes priority in the rare cases where it
|
// which tool takes priority in the rare cases where it
|
||||||
// could be more than one.
|
// could be more than one.
|
||||||
@ -5184,7 +5183,7 @@ void TrackPanel::DrawOutside(Track * t, wxDC * dc, const wxRect rec,
|
|||||||
mTrackInfo.DrawTitleBar(dc, r, t, (captured && mMouseCapture==IsPopping));
|
mTrackInfo.DrawTitleBar(dc, r, t, (captured && mMouseCapture==IsPopping));
|
||||||
|
|
||||||
mTrackInfo.DrawMinimize(dc, r, t, (captured && mMouseCapture==IsMinimizing));
|
mTrackInfo.DrawMinimize(dc, r, t, (captured && mMouseCapture==IsMinimizing));
|
||||||
//vvvvv mTrackInfo.DrawBordersWithin( dc, r, bIsWave );
|
mTrackInfo.DrawBordersWithin( dc, r, bIsWave );
|
||||||
|
|
||||||
if (bIsWave) {
|
if (bIsWave) {
|
||||||
mTrackInfo.DrawMuteSolo(dc, r, t, (captured && mMouseCapture == IsMuting), false, HasSoloButton());
|
mTrackInfo.DrawMuteSolo(dc, r, t, (captured && mMouseCapture == IsMuting), false, HasSoloButton());
|
||||||
@ -5587,10 +5586,8 @@ void TrackPanel::OnCursorLeft( bool shift, bool ctrl )
|
|||||||
mViewInfo->sel1 = mViewInfo->sel0;
|
mViewInfo->sel1 = mViewInfo->sel0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure it's visible
|
// Make sure it's visible.
|
||||||
ScrollIntoView( mViewInfo->sel1 );
|
ScrollIntoView( mViewInfo->sel1 );
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
// Extend selection toward the left
|
// Extend selection toward the left
|
||||||
@ -5616,10 +5613,8 @@ void TrackPanel::OnCursorLeft( bool shift, bool ctrl )
|
|||||||
mViewInfo->sel0 = 0.0;
|
mViewInfo->sel0 = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure it's visible
|
// Make sure it's visible.
|
||||||
ScrollIntoView( mViewInfo->sel0 );
|
ScrollIntoView( mViewInfo->sel0 );
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
// Move the cursor toward the left
|
// Move the cursor toward the left
|
||||||
@ -5654,10 +5649,8 @@ void TrackPanel::OnCursorLeft( bool shift, bool ctrl )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Transition to cursor mode
|
// Transition to cursor mode.
|
||||||
mViewInfo->sel1 = mViewInfo->sel0;
|
mViewInfo->sel1 = mViewInfo->sel0;
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5702,10 +5695,8 @@ void TrackPanel::OnCursorRight( bool shift, bool ctrl )
|
|||||||
mViewInfo->sel0 = mViewInfo->sel1;
|
mViewInfo->sel0 = mViewInfo->sel1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure new position is in view
|
// Make sure new position is in view.
|
||||||
ScrollIntoView( mViewInfo->sel0 );
|
ScrollIntoView( mViewInfo->sel0 );
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
// Extend selection toward the right
|
// Extend selection toward the right
|
||||||
@ -5732,10 +5723,8 @@ void TrackPanel::OnCursorRight( bool shift, bool ctrl )
|
|||||||
mViewInfo->sel1 = end;
|
mViewInfo->sel1 = end;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure new position is in view
|
// Make sure new position is in view.
|
||||||
ScrollIntoView( mViewInfo->sel1 );
|
ScrollIntoView( mViewInfo->sel1 );
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
// Move the cursor toward the right
|
// Move the cursor toward the right
|
||||||
@ -5771,10 +5760,8 @@ void TrackPanel::OnCursorRight( bool shift, bool ctrl )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Transition to cursor mode
|
// Transition to cursor mode.
|
||||||
mViewInfo->sel0 = mViewInfo->sel1;
|
mViewInfo->sel0 = mViewInfo->sel1;
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5904,7 +5891,6 @@ void TrackPanel::OnBoundaryMove(bool left, bool boundaryContract)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
MakeParentModifyState();
|
MakeParentModifyState();
|
||||||
}
|
}
|
||||||
@ -5972,15 +5958,14 @@ void TrackPanel::OnCursorMove(bool forward, bool jump, bool longjump )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Transition to cursor mode
|
// Transition to cursor mode.
|
||||||
mViewInfo->sel1 = mViewInfo->sel0;
|
mViewInfo->sel1 = mViewInfo->sel0;
|
||||||
|
|
||||||
// Make it happen
|
|
||||||
Refresh( false );
|
Refresh( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure it's visible
|
// Make sure it's visible
|
||||||
ScrollIntoView( mViewInfo->sel0 );
|
ScrollIntoView( mViewInfo->sel0 );
|
||||||
|
|
||||||
MakeParentModifyState();
|
MakeParentModifyState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -7016,7 +7001,6 @@ wxRect TrackPanel::FindTrackRect(Track * target, bool label)
|
|||||||
|
|
||||||
int TrackPanel::GetVRulerWidth() const
|
int TrackPanel::GetVRulerWidth() const
|
||||||
{
|
{
|
||||||
//return 36;
|
|
||||||
return vrulerSize.x;
|
return vrulerSize.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7260,21 +7244,23 @@ void TrackInfo::SetTrackInfoFont(wxDC * dc)
|
|||||||
dc->SetFont(mFont);
|
dc->SetFont(mFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::DrawBordersWithin(wxDC * dc, const wxRect r, bool bHasMuteSolo )
|
void TrackInfo::DrawBordersWithin(wxDC* dc, const wxRect r, bool bHasMuteSolo)
|
||||||
{
|
{
|
||||||
dc->SetPen(*wxBLACK_PEN);
|
//vvvvv dc->SetPen(*wxBLACK_PEN);
|
||||||
// These black lines are actually within TrackInfo...
|
//vvvvv dc->SetPen(wxColour(96, 96, 96));
|
||||||
AColor::Line(*dc, r.x, r.y + 16, GetTitleWidth(), r.y + 16); // title bar
|
AColor::Dark(dc, false); //vvvvv same color as border of toolbars (ToolBar::OnPaint())
|
||||||
AColor::Line(*dc, r.x + 16, r.y, r.x + 16, r.y + 16); // close box
|
|
||||||
|
AColor::Line(*dc, r.x, r.y + 16, GetTitleWidth(), r.y + 16); // below title bar
|
||||||
|
AColor::Line(*dc, r.x + 16, r.y, r.x + 16, r.y + 16); // below close box
|
||||||
|
|
||||||
if( bHasMuteSolo && (r.height > (66+18) ))
|
if( bHasMuteSolo && (r.height > (66+18) ))
|
||||||
{
|
{
|
||||||
AColor::Line(*dc, r.x, r.y + 50, GetTitleWidth(), r.y + 50); // bevel above mute/solo
|
AColor::Line(*dc, r.x, r.y + 50, GetTitleWidth(), r.y + 50); // bevel above mute/solo
|
||||||
AColor::Line(*dc, r.x+48 , r.y+50, r.x+48, r.y + 66); // line between mute/solo
|
AColor::Line(*dc, r.x + 48 , r.y + 50, r.x + 48, r.y + 66); // line between mute/solo
|
||||||
AColor::Line(*dc, r.x, r.y + 66, GetTitleWidth(), r.y + 66); // bevel below mute/solo
|
AColor::Line(*dc, r.x, r.y + 66, GetTitleWidth(), r.y + 66); // bevel below mute/solo
|
||||||
}
|
}
|
||||||
|
|
||||||
AColor::Line(*dc, r.x, r.y + r.height - 19, GetTitleWidth(), r.y + r.height - 19); // minimize button
|
AColor::Line(*dc, r.x, r.y + r.height - 19, GetTitleWidth(), r.y + r.height - 19); // above minimize button
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackInfo::DrawBackground(wxDC * dc, const wxRect r, bool bSelected,
|
void TrackInfo::DrawBackground(wxDC * dc, const wxRect r, bool bSelected,
|
||||||
|
@ -147,7 +147,7 @@ void EditToolBar::Populate()
|
|||||||
|
|
||||||
AddSeparator();
|
AddSeparator();
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
AddButton(bmpSyncLockTracks, bmpSyncLockTracksDisabled, ETBSyncLockID,
|
AddButton(bmpSyncLockTracks, bmpSyncLockTracksDisabled, ETBSyncLockID,
|
||||||
_("Sync-Lock Tracks"), true);
|
_("Sync-Lock Tracks"), true);
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ void EditToolBar::Populate()
|
|||||||
mButtons[ETBZoomFitID]->SetEnabled(false);
|
mButtons[ETBZoomFitID]->SetEnabled(false);
|
||||||
mButtons[ETBPasteID]->SetEnabled(false);
|
mButtons[ETBPasteID]->SetEnabled(false);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
mButtons[ETBSyncLockID]->PushDown();
|
mButtons[ETBSyncLockID]->PushDown();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ void EditToolBar::RegenerateTooltips()
|
|||||||
mButtons[ETBSilenceID]->SetToolTip(_("Silence"));
|
mButtons[ETBSilenceID]->SetToolTip(_("Silence"));
|
||||||
mButtons[ETBUndoID]->SetToolTip(_("Undo"));
|
mButtons[ETBUndoID]->SetToolTip(_("Undo"));
|
||||||
mButtons[ETBRedoID]->SetToolTip(_("Redo"));
|
mButtons[ETBRedoID]->SetToolTip(_("Redo"));
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
mButtons[ETBSyncLockID]->SetToolTip(_("Sync-Lock Tracks"));
|
mButtons[ETBSyncLockID]->SetToolTip(_("Sync-Lock Tracks"));
|
||||||
#endif
|
#endif
|
||||||
mButtons[ETBZoomInID]->SetToolTip(_("Zoom In"));
|
mButtons[ETBZoomInID]->SetToolTip(_("Zoom In"));
|
||||||
@ -239,7 +239,7 @@ void EditToolBar::OnButton(wxCommandEvent &event)
|
|||||||
case ETBRedoID:
|
case ETBRedoID:
|
||||||
if (!busy) p->OnRedo();
|
if (!busy) p->OnRedo();
|
||||||
break;
|
break;
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
case ETBSyncLockID:
|
case ETBSyncLockID:
|
||||||
if (!busy) p->OnSyncLock();
|
if (!busy) p->OnSyncLock();
|
||||||
return;//avoiding the call to SetButton()
|
return;//avoiding the call to SetButton()
|
||||||
@ -305,7 +305,7 @@ void EditToolBar::EnableDisableButtons()
|
|||||||
|
|
||||||
mButtons[ETBPasteID]->SetEnabled(p->Clipboard());
|
mButtons[ETBPasteID]->SetEnabled(p->Clipboard());
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
bool bSyncLockTracks;
|
bool bSyncLockTracks;
|
||||||
gPrefs->Read(wxT("/GUI/SyncLockTracks"), &bSyncLockTracks, false);
|
gPrefs->Read(wxT("/GUI/SyncLockTracks"), &bSyncLockTracks, false);
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ enum {
|
|||||||
ETBUndoID,
|
ETBUndoID,
|
||||||
ETBRedoID,
|
ETBRedoID,
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
ETBSyncLockID,
|
ETBSyncLockID,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -584,7 +584,7 @@ void ToolManager::ReadConfig()
|
|||||||
bar->Create( mBotDock );
|
bar->Create( mBotDock );
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_LINKING
|
#ifdef EXPERIMENTAL_SYNC_LOCK
|
||||||
// Set the width
|
// Set the width
|
||||||
if( width[ ndx ] >= bar->GetSize().x )
|
if( width[ ndx ] >= bar->GetSize().x )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user