mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-09 06:06:24 +01:00
Move error dialog functions into the BasicUI facade...
... now ErrorDialog.h is included only in ErrorDialog.cpp and wxWidgetsBasicUI.cpp
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#include "../toolbars/ControlToolBar.h"
|
||||
#include "../toolbars/TranscriptionToolBar.h"
|
||||
#include "../widgets/AudacityMessageBox.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "BasicUI.h"
|
||||
#include "../widgets/ProgressDialog.h"
|
||||
|
||||
#include <float.h>
|
||||
@@ -197,7 +197,6 @@ bool DoStopPlaying(const CommandContext &context)
|
||||
auto &projectAudioManager = ProjectAudioManager::Get(project);
|
||||
auto gAudioIO = AudioIOBase::Get();
|
||||
auto &toolbar = ControlToolBar::Get(project);
|
||||
auto &window = ProjectWindow::Get(project);
|
||||
auto token = ProjectAudioIO::Get(project).GetAudioIOToken();
|
||||
|
||||
//If this project is playing, stop playing, make sure everything is unpaused.
|
||||
@@ -498,7 +497,6 @@ void OnPunchAndRoll(const CommandContext &context)
|
||||
{
|
||||
AudacityProject &project = context.project;
|
||||
auto &viewInfo = ViewInfo::Get( project );
|
||||
auto &window = GetProjectFrame( project );
|
||||
|
||||
static const auto url =
|
||||
wxT("Punch_and_Roll_Record#Using_Punch_and_Roll_Record");
|
||||
@@ -537,7 +535,8 @@ void OnPunchAndRoll(const CommandContext &context)
|
||||
: (recordingChannels == 2)
|
||||
? XO("Please select in a stereo track or two mono tracks.")
|
||||
: XO("Please select at least %d channels.").Format( recordingChannels );
|
||||
ShowErrorDialog(&window, XO("Error"), message, url);
|
||||
BasicUI::ShowErrorDialog( *ProjectFramePlacement(&project),
|
||||
XO("Error"), message, url);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -579,7 +578,8 @@ void OnPunchAndRoll(const CommandContext &context)
|
||||
|
||||
if (error) {
|
||||
auto message = XO("Please select a time within a clip.");
|
||||
ShowErrorDialog( &window, XO("Error"), message, url);
|
||||
BasicUI::ShowErrorDialog(
|
||||
*ProjectFramePlacement(&project), XO("Error"), message, url);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user