Remove short functions from namespace TransportActions

This commit is contained in:
Paul Licameli 2019-07-03 10:20:53 -04:00
parent c8c76cf294
commit 2c840a75c5
8 changed files with 10 additions and 28 deletions

View File

@ -1263,7 +1263,7 @@ auto AdornedRulerPanel::QPHandle::Click
if(scrubber.HasMark()) {
// We can't stop scrubbing yet (see comments in Bug 1391),
// but we can pause it.
TransportActions::DoPause(*pProject);
ProjectAudioManager::Get( *pProject ).OnPause();
}
// Store the initial play region state

View File

@ -1654,7 +1654,7 @@ void AudacityApp::OnKeyDown(wxKeyEvent &event)
gAudioIO->GetNumCaptureChannels() == 0) ||
scrubbing)
// ESC out of other play (but not record)
TransportActions::DoStop(*project);
ProjectAudioManager::Get( *project ).Stop();
else
event.Skip();
}

View File

@ -719,7 +719,7 @@ bool MacroCommands::DoAudacityCommand(
if (flags & EffectManager::kConfigured)
{
TransportActions::DoStop(project);
ProjectAudioManager::Get( project ).Stop();
// SelectAllIfNone();
}

View File

@ -1019,7 +1019,7 @@ namespace TransportActions {
void StopIfPaused( AudacityProject &project )
{
if( AudioIOBase::Get()->IsPaused() )
DoStop( project );
ProjectAudioManager::Get( project ).Stop();
}
bool DoPlayStopSelect
@ -1095,21 +1095,6 @@ void DoPlayStopSelect(AudacityProject &project)
}
}
void DoPause( AudacityProject &project )
{
ProjectAudioManager::Get( project ).OnPause();
}
void DoRecord( AudacityProject &project )
{
ProjectAudioManager::Get( project ).OnRecord(false);
}
void DoStop( AudacityProject &project )
{
ProjectAudioManager::Get( project ).Stop();
}
}
#include "CommonCommandFlags.h"

View File

@ -166,9 +166,6 @@ namespace TransportActions {
void StopIfPaused( AudacityProject &project );
bool DoPlayStopSelect( AudacityProject &project, bool click, bool shift );
void DoPlayStopSelect( AudacityProject &project );
void DoStop( AudacityProject & );
void DoPause( AudacityProject & );
void DoRecord( AudacityProject & );
}
#endif

View File

@ -543,7 +543,7 @@ int TimerRecordDialog::RunWaitDialog()
return POST_TIMER_RECORD_CANCEL_WAIT;
} else {
// Record for specified time.
TransportActions::DoRecord(*pProject);
ProjectAudioManager::Get( *pProject ).OnRecord(false);
bool bIsRecording = true;
wxString sPostAction = m_pTimerAfterCompleteChoiceCtrl->GetString(m_pTimerAfterCompleteChoiceCtrl->GetSelection());
@ -591,7 +591,7 @@ int TimerRecordDialog::RunWaitDialog()
// Must do this AFTER the timer project dialog has been deleted to ensure the application
// responds to the AUDIOIO events...see not about bug #334 in the ProgressDialog constructor.
TransportActions::DoStop(*pProject);
ProjectAudioManager::Get( *pProject ).Stop();
// Let the caller handle cancellation or failure from recording progress.
if (updateResult == ProgressResult::Cancelled || updateResult == ProgressResult::Failed)

View File

@ -130,7 +130,7 @@ void EffectManager::UnregisterEffect(const PluginID & ID)
// for batch commands
if (flags & EffectManager::kConfigured)
{
TransportActions::DoStop(project);
ProjectAudioManager::Get( project ).Stop();
SelectUtilities::SelectAllIfNone( project );
}

View File

@ -224,12 +224,12 @@ void OnPlayLooped(const CommandContext &context)
void OnPause(const CommandContext &context)
{
DoPause( context.project );
ProjectAudioManager::Get( context.project ).OnPause();
}
void OnRecord(const CommandContext &context)
{
DoRecord( context.project );
ProjectAudioManager::Get( context.project ).OnRecord(false);
}
// If first choice is record same track 2nd choice is record NEW track
@ -543,7 +543,7 @@ void OnToggleAutomatedInputLevelAdjustment(
void OnStop(const CommandContext &context)
{
DoStop( context.project );
ProjectAudioManager::Get( context.project ).Stop();
}
void OnPlayOneSecond(const CommandContext &context)