Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox! But it seems safe to me, despite the great number of touched files.
This commit is contained in:
parent
378c96fda1
commit
ccb4bbac33
|
@ -1079,7 +1079,7 @@ void NyqBench::OnSave(wxCommandEvent & e)
|
|||
|
||||
if (!mScript->SaveFile(mPath.GetFullPath()))
|
||||
{
|
||||
wxMessageBox(_("Script was not saved."),
|
||||
AudacityMessageBox(_("Script was not saved."),
|
||||
_("Warning"),
|
||||
wxICON_EXCLAMATION,
|
||||
this);
|
||||
|
@ -1109,7 +1109,7 @@ void NyqBench::OnSaveAs(wxCommandEvent & e)
|
|||
|
||||
if (!mScript->SaveFile(mPath.GetFullPath()))
|
||||
{
|
||||
wxMessageBox(_("Script was not saved."),
|
||||
AudacityMessageBox(_("Script was not saved."),
|
||||
_("Warning"),
|
||||
wxICON_EXCLAMATION,
|
||||
this);
|
||||
|
@ -1484,7 +1484,7 @@ void NyqBench::OnFindDialog(wxFindDialogEvent & e)
|
|||
}
|
||||
|
||||
if (pos == wxString::npos) {
|
||||
wxMessageBox(_("No matches found"),
|
||||
AudacityMessageBox(_("No matches found"),
|
||||
_("Nyquist Effect Workbench"),
|
||||
wxOK | wxCENTER,
|
||||
e.GetDialog());
|
||||
|
@ -1621,7 +1621,7 @@ bool NyqBench::Validate()
|
|||
{
|
||||
if (mScript->GetLastPosition() > 0 && mScript->IsModified()) {
|
||||
int ans;
|
||||
ans = wxMessageBox(_("Code has been modified. Are you sure?"),
|
||||
ans = AudacityMessageBox(_("Code has been modified. Are you sure?"),
|
||||
_("Warning"),
|
||||
wxYES_NO | wxICON_QUESTION,
|
||||
this);
|
||||
|
|
|
@ -35,7 +35,6 @@ It handles initialization and termination by subclassing wxApp.
|
|||
#include <wx/window.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/snglinst.h>
|
||||
#include <wx/splash.h>
|
||||
#include <wx/stdpaths.h>
|
||||
|
@ -802,7 +801,7 @@ bool AudacityApp::MRUOpen(const wxString &fullPathStr) {
|
|||
}
|
||||
else {
|
||||
// File doesn't exist - remove file from history
|
||||
wxMessageBox(wxString::Format(_("%s could not be found.\n\nIt has been removed from the list of recent files."),
|
||||
AudacityMessageBox(wxString::Format(_("%s could not be found.\n\nIt has been removed from the list of recent files."),
|
||||
fullPathStr.c_str()));
|
||||
return(false);
|
||||
}
|
||||
|
@ -1008,7 +1007,7 @@ wxString AudacityApp::InitLang( const wxString & lang )
|
|||
if (!lang.empty()) {
|
||||
info = wxLocale::FindLanguageInfo(lang);
|
||||
if (!info)
|
||||
::wxMessageBox(wxString::Format(_("Language \"%s\" is unknown"), lang));
|
||||
::AudacityMessageBox(wxString::Format(_("Language \"%s\" is unknown"), lang));
|
||||
}
|
||||
if (!info)
|
||||
{
|
||||
|
@ -1761,9 +1760,9 @@ bool AudacityApp::InitTempDir()
|
|||
if (temp == wxT("")) {
|
||||
// Failed
|
||||
if( !IsTempDirectoryNameOK( tempFromPrefs ) ) {
|
||||
wxMessageBox(_("Audacity could not find a safe place to store temporary files.\nAudacity needs a place where automatic cleanup programs won't delete the temporary files.\nPlease enter an appropriate directory in the preferences dialog."));
|
||||
AudacityMessageBox(_("Audacity could not find a safe place to store temporary files.\nAudacity needs a place where automatic cleanup programs won't delete the temporary files.\nPlease enter an appropriate directory in the preferences dialog."));
|
||||
} else {
|
||||
wxMessageBox(_("Audacity could not find a place to store temporary files.\nPlease enter an appropriate directory in the preferences dialog."));
|
||||
AudacityMessageBox(_("Audacity could not find a place to store temporary files.\nPlease enter an appropriate directory in the preferences dialog."));
|
||||
}
|
||||
|
||||
// Only want one page of the preferences
|
||||
|
@ -1773,7 +1772,7 @@ bool AudacityApp::InitTempDir()
|
|||
GlobalPrefsDialog dialog(NULL, factories);
|
||||
dialog.ShowModal();
|
||||
|
||||
wxMessageBox(_("Audacity is now going to exit. Please launch Audacity again to use the new temporary directory."));
|
||||
AudacityMessageBox(_("Audacity is now going to exit. Please launch Audacity again to use the new temporary directory."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1818,7 +1817,7 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||
_("Audacity was not able to lock the temporary files directory.\nThis folder may be in use by another copy of Audacity.\n") +
|
||||
runningTwoCopiesStr +
|
||||
_("Do you still want to start Audacity?");
|
||||
int action = wxMessageBox(prompt,
|
||||
int action = AudacityMessageBox(prompt,
|
||||
_("Error Locking Temporary Folder"),
|
||||
wxYES_NO | wxICON_EXCLAMATION,
|
||||
NULL);
|
||||
|
@ -1912,7 +1911,7 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||
_("The system has detected that another copy of Audacity is running.\n") +
|
||||
runningTwoCopiesStr +
|
||||
_("Use the New or Open commands in the currently running Audacity\nprocess to open multiple projects simultaneously.\n");
|
||||
wxMessageBox(prompt, _("Audacity is already running"),
|
||||
AudacityMessageBox(prompt, _("Audacity is already running"),
|
||||
wxOK | wxICON_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
@ -2287,7 +2286,7 @@ void AudacityApp::AssociateFileTypes()
|
|||
// Either there's no pref or user does want associations
|
||||
// and they got stepped on, so ask.
|
||||
int wantAssoc =
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
_("Audacity project (.AUP) files are not currently \nassociated with Audacity. \n\nAssociate them, so they open on double-click?"),
|
||||
_("Audacity Project Files"),
|
||||
wxYES_NO | wxICON_QUESTION);
|
||||
|
|
|
@ -23,7 +23,8 @@ got to show.
|
|||
#include "AudacityException.h"
|
||||
|
||||
#include <wx/atomic.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
AudacityException::~AudacityException()
|
||||
{
|
||||
|
@ -100,9 +101,9 @@ void MessageBoxException::DelayedHandlerAction()
|
|||
// common cause such as exhaustion of disk space so that the others
|
||||
// give the user no useful added information.
|
||||
if ( wxAtomicDec( sOutstandingMessages ) == 0 )
|
||||
::wxMessageBox(
|
||||
::AudacityMessageBox(
|
||||
ErrorMessage(),
|
||||
caption.IsEmpty() ? wxMessageBoxCaptionStr : caption,
|
||||
caption.IsEmpty() ? AudacityMessageBoxCaptionStr() : caption,
|
||||
wxICON_ERROR
|
||||
);
|
||||
moved = true;
|
||||
|
|
|
@ -23,11 +23,11 @@ Provides thread-safe logging based on the wxWidgets log facility.
|
|||
#include <wx/log.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
|
||||
#include "../images/AudacityLogoAlpha.xpm"
|
||||
#include "Experimental.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
//
|
||||
// AudacityLogger class
|
||||
|
@ -307,7 +307,7 @@ void AudacityLogger::OnSave(wxCommandEvent & WXUNUSED(e))
|
|||
}
|
||||
|
||||
if (!mText->SaveFile(fName)) {
|
||||
wxMessageBox(_("Couldn't save log to file: ") + fName,
|
||||
AudacityMessageBox(_("Couldn't save log to file: ") + fName,
|
||||
_("Warning"),
|
||||
wxICON_EXCLAMATION,
|
||||
mFrame.get());
|
||||
|
|
|
@ -428,7 +428,6 @@ TimeTrack and AudioIOListener and whether the playback is looped.
|
|||
|
||||
#include <wx/log.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/debug.h>
|
||||
|
@ -450,6 +449,7 @@ TimeTrack and AudioIOListener and whether the playback is looped.
|
|||
|
||||
#include "toolbars/ControlToolBar.h"
|
||||
#include "widgets/Meter.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
#define MIDI_SLEEP 10 /* milliseconds */
|
||||
|
@ -1222,7 +1222,7 @@ AudioIO::AudioIO()
|
|||
errStr += _("Error: ")+paErrStr;
|
||||
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
||||
// long-term solution will probably involve exceptions
|
||||
wxMessageBox(errStr, _("Error Initializing Audio"), wxICON_ERROR|wxOK);
|
||||
AudacityMessageBox(errStr, _("Error Initializing Audio"), wxICON_ERROR|wxOK);
|
||||
|
||||
// Since PortAudio is not initialized, all calls to PortAudio
|
||||
// functions will fail. This will give reasonable behavior, since
|
||||
|
@ -1242,7 +1242,7 @@ AudioIO::AudioIO()
|
|||
errStr += _("Error: ") + pmErrStr;
|
||||
// XXX: we are in libaudacity, popping up dialogs not allowed! A
|
||||
// long-term solution will probably involve exceptions
|
||||
wxMessageBox(errStr, _("Error Initializing Midi"), wxICON_ERROR|wxOK);
|
||||
AudacityMessageBox(errStr, _("Error Initializing Midi"), wxICON_ERROR|wxOK);
|
||||
|
||||
// Same logic for PortMidi as described above for PortAudio
|
||||
}
|
||||
|
@ -2131,7 +2131,7 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
|||
if(captureBufferSize < 100)
|
||||
{
|
||||
StartStreamCleanup();
|
||||
wxMessageBox(_("Out of memory!"));
|
||||
AudacityMessageBox(_("Out of memory!"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2165,7 +2165,7 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
|||
if(playbackBufferSize < 100 || playbackMixBufferSize < 100)
|
||||
{
|
||||
StartStreamCleanup();
|
||||
wxMessageBox(_("Out of memory!"));
|
||||
AudacityMessageBox(_("Out of memory!"));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -2289,7 +2289,7 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
|||
if (mListener && mNumCaptureChannels > 0)
|
||||
mListener->OnAudioIOStopRecording();
|
||||
StartStreamCleanup();
|
||||
wxMessageBox(LAT1CTOWX(Pa_GetErrorText(err)));
|
||||
AudacityMessageBox(LAT1CTOWX(Pa_GetErrorText(err)));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ text or binary format to a file.
|
|||
#include <wx/app.h>
|
||||
|
||||
#include "WaveTrack.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
enum {
|
||||
ID_RECOVER_ALL = 10000,
|
||||
|
@ -138,7 +139,7 @@ void AutoRecoveryDialog::OnQuitAudacity(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
void AutoRecoveryDialog::OnRecoverNone(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
int ret = wxMessageBox(
|
||||
int ret = AudacityMessageBox(
|
||||
_("Are you sure you want to discard all recoverable projects?\n\nChoosing \"Yes\" discards all recoverable projects immediately."),
|
||||
_("Confirm Discard Projects"), wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT, this);
|
||||
|
||||
|
@ -158,7 +159,7 @@ static bool HaveFilesToRecover()
|
|||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
wxMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
@ -181,7 +182,7 @@ static bool RemoveAllAutoSaveFiles()
|
|||
{
|
||||
// I don't think this error message is actually useful.
|
||||
// -dmazzoni
|
||||
//wxMessageBox(wxT("Could not remove auto save file: " + files[i]),
|
||||
//AudacityMessageBox(wxT("Could not remove auto save file: " + files[i]),
|
||||
// _("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
@ -195,7 +196,7 @@ static bool RecoverAllProjects(AudacityProject** pproj)
|
|||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened())
|
||||
{
|
||||
wxMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ See also BatchCommandDialog and BatchProcessDialog.
|
|||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/dir.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/textfile.h>
|
||||
|
||||
|
@ -43,6 +42,7 @@ See also BatchCommandDialog and BatchProcessDialog.
|
|||
#include "AllThemeResources.h"
|
||||
|
||||
#include "Track.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
// KLUDGE: All commands should be on the same footing
|
||||
// however, for historical reasons we distinguish between
|
||||
|
@ -366,13 +366,13 @@ double BatchCommands::GetEndTime()
|
|||
AudacityProject *project = GetActiveProject();
|
||||
if( project == NULL )
|
||||
{
|
||||
//wxMessageBox( _("No project to process!") );
|
||||
//AudacityMessageBox( _("No project to process!") );
|
||||
return -1.0;
|
||||
}
|
||||
TrackList * tracks = project->GetTracks();
|
||||
if( tracks == NULL )
|
||||
{
|
||||
//wxMessageBox( _("No tracks to process!") );
|
||||
//AudacityMessageBox( _("No tracks to process!") );
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
|
@ -385,14 +385,14 @@ bool BatchCommands::IsMono()
|
|||
AudacityProject *project = GetActiveProject();
|
||||
if( project == NULL )
|
||||
{
|
||||
//wxMessageBox( _("No project and no Audio to process!") );
|
||||
//AudacityMessageBox( _("No project and no Audio to process!") );
|
||||
return false;
|
||||
}
|
||||
|
||||
TrackList * tracks = project->GetTracks();
|
||||
if( tracks == NULL )
|
||||
{
|
||||
//wxMessageBox( _("No tracks to process!") );
|
||||
//AudacityMessageBox( _("No tracks to process!") );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
|
|||
// double startTime = 0.0;
|
||||
//OnSelectAll();
|
||||
pathName = FileNames::FindDefaultPath(FileNames::Operation::Export);
|
||||
::wxMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"),
|
||||
::AudacityMessageBox(wxString::Format(_("Export recording to %s\n/%s/%s%s"),
|
||||
pathName.c_str(), cleanedString.c_str(), justName.c_str(), extension.c_str()),
|
||||
_("Export recording"),
|
||||
wxOK | wxCENTRE);
|
||||
|
@ -445,7 +445,7 @@ wxString BatchCommands::BuildCleanFileName(const wxString &fileName, const wxStr
|
|||
cleanedName += cleanedString;
|
||||
bool flag = ::wxFileName::FileExists(cleanedName);
|
||||
if (flag == true) {
|
||||
::wxMessageBox(_("Cannot create directory 'cleaned'. \nFile already exists that is not a directory"));
|
||||
::AudacityMessageBox(_("Cannot create directory 'cleaned'. \nFile already exists that is not a directory"));
|
||||
return wxString{};
|
||||
}
|
||||
::wxFileName::Mkdir(cleanedName, 0777, wxPATH_MKDIR_FULL); // make sure it exists
|
||||
|
@ -569,7 +569,7 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString &
|
|||
}
|
||||
return mExporter.Process(project, numChannels, wxT("OGG"), filename, false, 0.0, endTime);
|
||||
#else
|
||||
wxMessageBox(_("Ogg Vorbis support is not included in this build of Audacity"));
|
||||
AudacityMessageBox(_("Ogg Vorbis support is not included in this build of Audacity"));
|
||||
return false;
|
||||
#endif
|
||||
} else if (command == wxT("ExportFLAC")) {
|
||||
|
@ -581,11 +581,11 @@ bool BatchCommands::ApplySpecialCommand(int WXUNUSED(iCommand), const wxString &
|
|||
}
|
||||
return mExporter.Process(project, numChannels, wxT("FLAC"), filename, false, 0.0, endTime);
|
||||
#else
|
||||
wxMessageBox(_("FLAC support is not included in this build of Audacity"));
|
||||
AudacityMessageBox(_("FLAC support is not included in this build of Audacity"));
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
wxMessageBox(wxString::Format(_("Command %s not implemented yet"),command.c_str()));
|
||||
AudacityMessageBox(wxString::Format(_("Command %s not implemented yet"),command.c_str()));
|
||||
return false;
|
||||
}
|
||||
// end CLEANSPEECH remnant
|
||||
|
@ -639,7 +639,7 @@ bool BatchCommands::ApplyCommand(const wxString & command, const wxString & para
|
|||
return ApplyEffectCommand(ID, command, params);
|
||||
}
|
||||
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Your batch command of %s was not recognized."), command.c_str() ));
|
||||
|
||||
|
@ -762,12 +762,12 @@ bool BatchCommands::ReportAndSkip(const wxString & command, const wxString & par
|
|||
//TODO: Add a cancel button to these, and add the logic so that we can abort.
|
||||
if( params != wxT("") )
|
||||
{
|
||||
wxMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command.c_str(), params.c_str()),
|
||||
AudacityMessageBox( wxString::Format(_("Apply %s with parameter(s)\n\n%s"),command.c_str(), params.c_str()),
|
||||
_("Test Mode"));
|
||||
}
|
||||
else
|
||||
{
|
||||
wxMessageBox( wxString::Format(_("Apply %s"),command.c_str()),
|
||||
AudacityMessageBox( wxString::Format(_("Apply %s"),command.c_str()),
|
||||
_("Test Mode"));
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <wx/radiobut.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/imaglist.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
|
||||
#include "AudacityException.h"
|
||||
|
@ -52,6 +51,7 @@
|
|||
#include "FileDialog.h"
|
||||
#include "FileNames.h"
|
||||
#include "import/Import.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#define ChainsListID 7001
|
||||
#define CommandsListID 7002
|
||||
|
@ -150,7 +150,7 @@ void BatchProcessDialog::OnApplyToProject(wxCommandEvent & WXUNUSED(event))
|
|||
wxLIST_NEXT_ALL,
|
||||
wxLIST_STATE_SELECTED);
|
||||
if (item == -1) {
|
||||
wxMessageBox(_("No chain selected"));
|
||||
AudacityMessageBox(_("No chain selected"));
|
||||
return;
|
||||
}
|
||||
wxString name = mChains->GetItemText(item);
|
||||
|
@ -224,7 +224,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
|||
wxLIST_NEXT_ALL,
|
||||
wxLIST_STATE_SELECTED);
|
||||
if (item == -1) {
|
||||
wxMessageBox(_("No chain selected"));
|
||||
AudacityMessageBox(_("No chain selected"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ void BatchProcessDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
AudacityProject *project = GetActiveProject();
|
||||
if (!project->GetIsEmpty()) {
|
||||
wxMessageBox(_("Please save and close the current project first."));
|
||||
AudacityMessageBox(_("Please save and close the current project first."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -645,7 +645,7 @@ bool EditChainsDialog::ChangeOK()
|
|||
title.Printf(_("%s changed"), mActiveChain.c_str());
|
||||
msg = _("Do you want to save the changes?");
|
||||
|
||||
id = wxMessageBox(msg, title, wxYES_NO | wxCANCEL);
|
||||
id = AudacityMessageBox(msg, title, wxYES_NO | wxCANCEL);
|
||||
if (id == wxCANCEL) {
|
||||
return false;
|
||||
}
|
||||
|
@ -792,7 +792,7 @@ void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
|||
name = d.GetValue().Strip(wxString::both);
|
||||
|
||||
if (name.Length() == 0) {
|
||||
wxMessageBox(_("Name must not be blank"),
|
||||
AudacityMessageBox(_("Name must not be blank"),
|
||||
GetTitle(),
|
||||
wxOK | wxICON_ERROR,
|
||||
this);
|
||||
|
@ -802,7 +802,7 @@ void EditChainsDialog::OnAdd(wxCommandEvent & WXUNUSED(event))
|
|||
if (name.Contains(wxFILE_SEP_PATH) ||
|
||||
name.Contains(wxFILE_SEP_PATH_UNIX)) {
|
||||
/*i18n-hint: The %c will be replaced with 'forbidden characters', like '/' and '\'.*/
|
||||
wxMessageBox(wxString::Format(_("Names may not contain '%c' and '%c'"),
|
||||
AudacityMessageBox(wxString::Format(_("Names may not contain '%c' and '%c'"),
|
||||
wxFILE_SEP_PATH, wxFILE_SEP_PATH_UNIX),
|
||||
GetTitle(),
|
||||
wxOK | wxICON_ERROR,
|
||||
|
|
|
@ -26,7 +26,6 @@ of the BlockFile system.
|
|||
#include <wx/choice.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/timer.h>
|
||||
|
@ -42,6 +41,7 @@ of the BlockFile system.
|
|||
#include "Prefs.h"
|
||||
|
||||
#include "FileNames.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
class BenchmarkDialog final : public wxDialogWrapper
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ private:
|
|||
void RunBenchmark(wxWindow *parent)
|
||||
{
|
||||
/*
|
||||
int action = wxMessageBox(
|
||||
int action = AudacityMessageBox(
|
||||
_("This will close all project windows (without saving)\nand open the Audacity Benchmark dialog.\n\nAre you sure you want to do this?"),
|
||||
_("Benchmark"),
|
||||
wxYES_NO | wxICON_EXCLAMATION,
|
||||
|
@ -323,17 +323,17 @@ void BenchmarkDialog::OnRun( wxCommandEvent & WXUNUSED(event))
|
|||
mRandSeedStr.ToLong(&randSeed);
|
||||
|
||||
if (blockSize < 1 || blockSize > 1024) {
|
||||
wxMessageBox(_("Block size should be in the range 1 - 1024 KB."));
|
||||
AudacityMessageBox(_("Block size should be in the range 1 - 1024 KB."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (numEdits < 1 || numEdits > 10000) {
|
||||
wxMessageBox(_("Number of edits should be in the range 1 - 10000."));
|
||||
AudacityMessageBox(_("Number of edits should be in the range 1 - 10000."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (dataSize < 1 || dataSize > 2000) {
|
||||
wxMessageBox(_("Test data size should be in the range 1 - 2000 MB."));
|
||||
AudacityMessageBox(_("Test data size should be in the range 1 - 2000 MB."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ AliasedFile s.
|
|||
#include "ShuttleGui.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "WaveClip.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
WX_DECLARE_HASH_MAP(wxString, AliasedFile *,
|
||||
wxStringHash, wxStringEqual, AliasedFileHash);
|
||||
|
@ -523,7 +524,7 @@ void DependencyDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
|||
{
|
||||
if (mIsSaving)
|
||||
{
|
||||
int ret = wxMessageBox(
|
||||
int ret = AudacityMessageBox(
|
||||
_("If you proceed, your project will not be saved to disk. Is this what you want?"),
|
||||
_("Cancel Save"), wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT, this);
|
||||
if (ret != wxYES)
|
||||
|
@ -568,7 +569,7 @@ _("Your project is currently self-contained; it does not depend on any external
|
|||
\n\nIf you change the project to a state that has external dependencies on imported \
|
||||
files, it will no longer be self-contained. If you then Save without copying those files in, \
|
||||
you may lose data.");
|
||||
wxMessageBox(msg,
|
||||
AudacityMessageBox(msg,
|
||||
_("Dependency Check"),
|
||||
wxOK | wxICON_INFORMATION,
|
||||
project);
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
#include <wx/log.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/hash.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/intl.h>
|
||||
|
@ -106,6 +105,7 @@
|
|||
#include "Sequence.h"
|
||||
#include "widgets/Warning.h"
|
||||
#include "widgets/MultiDialog.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#include "ondemand/ODManager.h"
|
||||
|
||||
|
@ -1893,7 +1893,7 @@ other projects. \
|
|||
|
||||
// In auto-recover mode, we didn't do any ShowMultiDialog calls above, so put up an alert.
|
||||
if (bAutoRecoverMode)
|
||||
::wxMessageBox(
|
||||
::AudacityMessageBox(
|
||||
_("Project check found file inconsistencies during automatic recovery.\n\nSelect 'Show Log...' in the Help menu to see details."),
|
||||
_("Warning: Problems in Automatic Recovery"),
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
|
|
|
@ -22,6 +22,7 @@ License: GPL v2. See License.txt.
|
|||
#include "FileNames.h"
|
||||
#include "Internat.h"
|
||||
#include "widgets/HelpSystem.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#include <wx/file.h>
|
||||
#include <wx/filedlg.h>
|
||||
|
@ -99,7 +100,7 @@ void FFmpegStartup()
|
|||
{
|
||||
if (enabled)
|
||||
{
|
||||
wxMessageBox(_("FFmpeg was configured in Preferences and successfully loaded before, \
|
||||
AudacityMessageBox(_("FFmpeg was configured in Preferences and successfully loaded before, \
|
||||
\nbut this time Audacity failed to load it at startup. \
|
||||
\n\nYou may want to go back to Preferences > Libraries and re-configure it."),
|
||||
_("FFmpeg startup failed"));
|
||||
|
@ -702,7 +703,7 @@ bool FFmpegLibs::LoadLibs(wxWindow * WXUNUSED(parent), bool showerr)
|
|||
if (!ValidLibsLoaded()) {
|
||||
wxString msg = _("Failed to find compatible FFmpeg libraries.");
|
||||
if (showerr)
|
||||
wxMessageBox(msg);
|
||||
AudacityMessageBox(msg);
|
||||
wxLogError(msg);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,6 @@ extern "C" {
|
|||
#include <wx/string.h>
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/log.h> // for wxLogNull
|
||||
#include <wx/msgdlg.h> // for wxMessageBox
|
||||
#include <wx/utils.h>
|
||||
#include "widgets/LinkingHtmlWindow.h"
|
||||
#include "ShuttleGui.h"
|
||||
|
|
|
@ -20,6 +20,7 @@ information.
|
|||
#include <wx/arrstr.h>
|
||||
#include <wx/intl.h>
|
||||
#include "sndfile.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#ifndef SNDFILE_1
|
||||
#error Requires libsndfile 1.0 or higher
|
||||
|
@ -285,7 +286,6 @@ OSType sf_header_mactype(int format)
|
|||
|
||||
#endif // __WXMAC__
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
ODLock libSndFileMutex;
|
||||
|
||||
void SFFileCloser::operator() (SNDFILE *sf) const
|
||||
|
@ -294,7 +294,7 @@ void SFFileCloser::operator() (SNDFILE *sf) const
|
|||
if (err) {
|
||||
char buffer[1000];
|
||||
sf_error_str(sf, buffer, 1000);
|
||||
wxMessageBox(wxString::Format
|
||||
AudacityMessageBox(wxString::Format
|
||||
/* i18n-hint: %s will be the error message from libsndfile */
|
||||
(_("Error (file may not have been written): %s"),
|
||||
buffer));
|
||||
|
|
|
@ -51,7 +51,6 @@ and in the spectrogram spectral selection.
|
|||
#include <wx/font.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/intl.h>
|
||||
|
@ -84,6 +83,7 @@ and in the spectrogram spectral selection.
|
|||
|
||||
#include "./widgets/LinkingHtmlWindow.h"
|
||||
#include "./widgets/HelpSystem.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
DEFINE_EVENT_TYPE(EVT_FREQWINDOW_RECALC);
|
||||
|
||||
|
@ -590,7 +590,7 @@ void FreqWindow::GetAudio()
|
|||
}
|
||||
else {
|
||||
if (track->GetRate() != mRate) {
|
||||
wxMessageBox(_("To plot the spectrum, all selected tracks must be the same sample rate."));
|
||||
AudacityMessageBox(_("To plot the spectrum, all selected tracks must be the same sample rate."));
|
||||
mData.reset();
|
||||
mDataLen = 0;
|
||||
return;
|
||||
|
@ -615,7 +615,7 @@ void FreqWindow::GetAudio()
|
|||
wxString msg;
|
||||
msg.Printf(_("Too much audio was selected. Only the first %.1f seconds of audio will be analyzed."),
|
||||
(mDataLen / mRate));
|
||||
wxMessageBox(msg);
|
||||
AudacityMessageBox(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ void FreqWindow::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||
#endif
|
||||
f.Open();
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Couldn't write to file: ") + fName);
|
||||
AudacityMessageBox(_("Couldn't write to file: ") + fName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ and on Mac OS X for the filesystem.
|
|||
|
||||
*//*******************************************************************/
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/filename.h>
|
||||
|
@ -243,7 +242,7 @@ char *Internat::VerifyFilename(const wxString &s, bool input)
|
|||
wxFileName ff(name);
|
||||
wxString ext;
|
||||
while ((char *) (const char *)name.mb_str() == NULL) {
|
||||
wxMessageBox(_("The specified filename could not be converted due to Unicode character use."));
|
||||
AudacityMessageBox(_("The specified filename could not be converted due to Unicode character use."));
|
||||
|
||||
ext = ff.GetExt();
|
||||
name = FileNames::SelectFile(FileNames::Operation::_None,
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include <wx/filedlg.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "Project.h"
|
||||
#include "ViewInfo.h"
|
||||
#include "widgets/NumericTextCtrl.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#include "FileNames.h"
|
||||
#include <limits>
|
||||
|
@ -603,7 +603,7 @@ void LabelDialog::OnImport(wxCommandEvent & WXUNUSED(event))
|
|||
// Get at the data
|
||||
f.Open(fileName);
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Could not open file: ") + fileName);
|
||||
AudacityMessageBox(_("Could not open file: ") + fileName);
|
||||
}
|
||||
else {
|
||||
// Create a temporary label track and load the labels
|
||||
|
@ -628,7 +628,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
// Silly user (could just disable the button, but that's a hassle ;-))
|
||||
if (cnt == 0) {
|
||||
wxMessageBox(_("No labels to export."));
|
||||
AudacityMessageBox(_("No labels to export."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -671,7 +671,7 @@ void LabelDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||
#endif
|
||||
f.Open();
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Couldn't write to file: ") + fName);
|
||||
AudacityMessageBox(_("Couldn't write to file: ") + fName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ for drawing different aspects of the label and its text box.
|
|||
#include <wx/event.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/pen.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textfile.h>
|
||||
|
@ -69,6 +68,7 @@ for drawing different aspects of the label and its text box.
|
|||
#include "commands/CommandManager.h"
|
||||
|
||||
#include "effects/TimeWarper.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -2285,7 +2285,7 @@ void LabelTrack::Import(wxTextFile & in)
|
|||
catch(const LabelStruct::BadFormatException&) { error = true; }
|
||||
}
|
||||
if (error)
|
||||
::wxMessageBox( _("One or more saved labels could not be read.") );
|
||||
::AudacityMessageBox( _("One or more saved labels could not be read.") );
|
||||
SortLabels();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ of languages for Audacity.
|
|||
#include <wx/button.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
|
@ -29,6 +28,7 @@ of languages for Audacity.
|
|||
#include "Languages.h"
|
||||
#include "ShuttleGui.h"
|
||||
#include "widgets/wxPanelWrapper.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
class LangChoiceDialog final : public wxDialogWrapper {
|
||||
public:
|
||||
|
@ -132,7 +132,7 @@ void LangChoiceDialog::OnOk(wxCommandEvent & WXUNUSED(event))
|
|||
mLang.c_str(),
|
||||
sname.c_str(),
|
||||
slang.c_str());
|
||||
if (wxMessageBox(msg, _("Confirm"), wxYES_NO) == wxNO) {
|
||||
if (AudacityMessageBox(msg, _("Confirm"), wxYES_NO) == wxNO) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,12 +36,12 @@ On failure the old version is put back in place.
|
|||
#include <wx/ffile.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textfile.h>
|
||||
|
||||
#include "Internat.h"
|
||||
#include "Legacy.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "xml/XMLWriter.h"
|
||||
|
||||
static bool ConvertLegacyTrack(wxTextFile *f, XMLFileWriter &xmlFile)
|
||||
|
@ -301,7 +301,7 @@ bool ConvertLegacyProjectFile(const wxFileName &filename)
|
|||
xmlFile.EndTag(wxT("audacityproject"));
|
||||
xmlFile.Commit();
|
||||
|
||||
::wxMessageBox(wxString::Format(_("Converted a 1.0 project file to the new format.\nThe old file has been saved as '%s'"), xmlFile.GetBackupName().c_str()),
|
||||
::AudacityMessageBox(wxString::Format(_("Converted a 1.0 project file to the new format.\nThe old file has been saved as '%s'"), xmlFile.GetBackupName().c_str()),
|
||||
_("Opening Audacity Project"));
|
||||
|
||||
return true;
|
||||
|
|
|
@ -42,7 +42,6 @@ simplifies construction of menu items.
|
|||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/docview.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/textfile.h>
|
||||
#include <wx/textdlg.h>
|
||||
|
@ -139,6 +138,7 @@ simplifies construction of menu items.
|
|||
#include "prefs/TracksPrefs.h"
|
||||
|
||||
#include "widgets/Meter.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
enum {
|
||||
kAlignStartZero = 0,
|
||||
|
@ -4529,7 +4529,7 @@ void AudacityProject::OnExportLabels()
|
|||
}
|
||||
|
||||
if (numLabelTracks == 0) {
|
||||
wxMessageBox(_("There are no label tracks to export."));
|
||||
AudacityMessageBox(_("There are no label tracks to export."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4565,7 +4565,7 @@ void AudacityProject::OnExportLabels()
|
|||
f.Create();
|
||||
f.Open();
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Couldn't write to file: ") + fName);
|
||||
AudacityMessageBox(_("Couldn't write to file: ") + fName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4602,12 +4602,12 @@ void AudacityProject::OnExportMIDI(){
|
|||
}
|
||||
|
||||
if(numNoteTracksSelected > 1) {
|
||||
wxMessageBox(wxString::Format(_(
|
||||
AudacityMessageBox(wxString::Format(_(
|
||||
"Please select only one Note Track at a time.")));
|
||||
return;
|
||||
}
|
||||
else if(numNoteTracksSelected < 1) {
|
||||
wxMessageBox(wxString::Format(_(
|
||||
AudacityMessageBox(wxString::Format(_(
|
||||
"Please select a Note Track.")));
|
||||
return;
|
||||
}
|
||||
|
@ -4659,7 +4659,7 @@ void AudacityProject::OnExportMIDI(){
|
|||
} else {
|
||||
wxString msg = _("You have selected a filename with an unrecognized file extension.\nDo you want to continue?");
|
||||
wxString title = _("Export MIDI");
|
||||
int id = wxMessageBox(msg, title, wxYES_NO);
|
||||
int id = AudacityMessageBox(msg, title, wxYES_NO);
|
||||
if (id == wxNO) {
|
||||
continue;
|
||||
} else if (id == wxYES) {
|
||||
|
@ -4755,7 +4755,7 @@ void AudacityProject::OnPrint()
|
|||
void AudacityProject::OnUndo()
|
||||
{
|
||||
if (!GetUndoManager()->UndoAvailable()) {
|
||||
wxMessageBox(_("Nothing to undo"));
|
||||
AudacityMessageBox(_("Nothing to undo"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -4785,7 +4785,7 @@ void AudacityProject::OnUndo()
|
|||
void AudacityProject::OnRedo()
|
||||
{
|
||||
if (!GetUndoManager()->RedoAvailable()) {
|
||||
wxMessageBox(_("Nothing to redo"));
|
||||
AudacityMessageBox(_("Nothing to redo"));
|
||||
return;
|
||||
}
|
||||
// Can't redo whilst dragging
|
||||
|
@ -6878,7 +6878,7 @@ void AudacityProject::OnImportLabels()
|
|||
|
||||
f.Open(fileName);
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Could not open file: ") + fileName);
|
||||
AudacityMessageBox(_("Could not open file: ") + fileName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7805,7 +7805,7 @@ void AudacityProject::OnScoreAlign()
|
|||
if(numWaveTracksSelected == 0 ||
|
||||
numNoteTracksSelected != 1 ||
|
||||
numOtherTracksSelected != 0){
|
||||
wxMessageBox(wxString::Format(wxT("Please select at least one audio track and one MIDI track.")));
|
||||
AudacityMessageBox(wxString::Format(wxT("Please select at least one audio track and one MIDI track.")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7875,13 +7875,13 @@ void AudacityProject::OnScoreAlign()
|
|||
if (result == SA_SUCCESS) {
|
||||
mTracks->Replace(nt, std::move(holder));
|
||||
RedrawProject();
|
||||
wxMessageBox(wxString::Format(
|
||||
AudacityMessageBox(wxString::Format(
|
||||
_("Alignment completed: MIDI from %.2f to %.2f secs, Audio from %.2f to %.2f secs."),
|
||||
params.mMidiStart, params.mMidiEnd,
|
||||
params.mAudioStart, params.mAudioEnd));
|
||||
PushState(_("Sync MIDI with Audio"), _("Sync MIDI with Audio"));
|
||||
} else if (result == SA_TOOSHORT) {
|
||||
wxMessageBox(wxString::Format(
|
||||
AudacityMessageBox(wxString::Format(
|
||||
_("Alignment error: input too short: MIDI from %.2f to %.2f secs, Audio from %.2f to %.2f secs."),
|
||||
params.mMidiStart, params.mMidiEnd,
|
||||
params.mAudioStart, params.mAudioEnd));
|
||||
|
@ -7891,7 +7891,7 @@ void AudacityProject::OnScoreAlign()
|
|||
return; // no message when user cancels alignment
|
||||
} else {
|
||||
//GetActiveProject()->OnUndo(); // recover any changes to note track
|
||||
wxMessageBox(_("Internal error reported by alignment process."));
|
||||
AudacityMessageBox(_("Internal error reported by alignment process."));
|
||||
}
|
||||
}
|
||||
#endif /* EXPERIMENTAL_SCOREALIGN */
|
||||
|
@ -7947,7 +7947,7 @@ void AudacityProject::OnNewLabelTrack()
|
|||
void AudacityProject::OnNewTimeTrack()
|
||||
{
|
||||
if (mTracks->GetTimeTrack()) {
|
||||
wxMessageBox(_("This version of Audacity only allows one time track for each project window."));
|
||||
AudacityMessageBox(_("This version of Audacity only allows one time track for each project window."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7969,7 +7969,7 @@ void AudacityProject::OnTimerRecord()
|
|||
// it is now safer to disable Timer Recording when there is more than
|
||||
// one open project.
|
||||
if (GetOpenProjectCount() > 1) {
|
||||
wxMessageBox(_("Timer Recording cannot be used with more than one open project.\n\nPlease close any additional projects and try again."),
|
||||
AudacityMessageBox(_("Timer Recording cannot be used with more than one open project.\n\nPlease close any additional projects and try again."),
|
||||
_("Timer Recording"),
|
||||
wxICON_INFORMATION | wxOK);
|
||||
return;
|
||||
|
@ -7980,7 +7980,7 @@ void AudacityProject::OnTimerRecord()
|
|||
// preventing issues surrounding "dirty" projects when Automatic Save/Export
|
||||
// is used in Timer Recording.
|
||||
if ((GetUndoManager()->UnsavedChanges()) && (ProjectHasTracks() || mEmptyCanBeDirty)) {
|
||||
wxMessageBox(_("Timer Recording cannot be used while you have unsaved changes.\n\nPlease save or close this project and try again."),
|
||||
AudacityMessageBox(_("Timer Recording cannot be used while you have unsaved changes.\n\nPlease save or close this project and try again."),
|
||||
_("Timer Recording"),
|
||||
wxICON_INFORMATION | wxOK);
|
||||
return;
|
||||
|
@ -8357,7 +8357,7 @@ void AudacityProject::OnAudioDeviceInfo()
|
|||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
wxMessageBox(_("Unable to save device info"), _("Save Device Info"));
|
||||
AudacityMessageBox(_("Unable to save device info"), _("Save Device Info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8398,7 +8398,7 @@ void AudacityProject::OnMidiDeviceInfo()
|
|||
{
|
||||
if (!text->SaveFile(fName))
|
||||
{
|
||||
wxMessageBox(_("Unable to save MIDI device info"), _("Save MIDI Device Info"));
|
||||
AudacityMessageBox(_("Unable to save MIDI device info"), _("Save MIDI Device Info"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8531,7 +8531,7 @@ void AudacityProject::OnLockPlayRegion()
|
|||
double start, end;
|
||||
GetPlayRegion(&start, &end);
|
||||
if (start >= mTracks->GetEndTime()) {
|
||||
wxMessageBox(_("Cannot lock region beyond\nend of project."),
|
||||
AudacityMessageBox(_("Cannot lock region beyond\nend of project."),
|
||||
_("Error"));
|
||||
}
|
||||
else {
|
||||
|
@ -8611,7 +8611,7 @@ void AudacityProject::OnResample()
|
|||
break;
|
||||
}
|
||||
|
||||
wxMessageBox(_("The entered value is invalid"), _("Error"),
|
||||
AudacityMessageBox(_("The entered value is invalid"), _("Error"),
|
||||
wxICON_ERROR, this);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <math.h>
|
||||
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/intl.h>
|
||||
|
|
|
@ -22,7 +22,6 @@ i.e. an alternative to the usual interface, for Audacity.
|
|||
#include <wx/dynlib.h>
|
||||
#include <wx/list.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/filename.h>
|
||||
|
||||
|
@ -48,6 +47,7 @@ i.e. an alternative to the usual interface, for Audacity.
|
|||
#include <wx/arrimpl.cpp>
|
||||
|
||||
#include "Experimental.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#define initFnName "ExtensionModuleInit"
|
||||
#define versionFnName "GetVersionString"
|
||||
|
@ -116,7 +116,7 @@ bool Module::Load()
|
|||
tVersionFn versionFn = (tVersionFn)(mLib->GetSymbol(wxT(versionFnName)));
|
||||
if (versionFn == NULL){
|
||||
wxString ShortName = wxFileName( mName ).GetName();
|
||||
wxMessageBox(wxString::Format(_("The module %s does not provide a version string.\nIt will not be loaded."), ShortName.c_str()), _("Module Unsuitable"));
|
||||
AudacityMessageBox(wxString::Format(_("The module %s does not provide a version string.\nIt will not be loaded."), ShortName.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module %s does not provide a version string. It will not be loaded."), mName.c_str()));
|
||||
mLib->Unload();
|
||||
return false;
|
||||
|
@ -125,7 +125,7 @@ bool Module::Load()
|
|||
wxString moduleVersion = versionFn();
|
||||
if( !moduleVersion.IsSameAs(AUDACITY_VERSION_STRING)) {
|
||||
wxString ShortName = wxFileName( mName ).GetName();
|
||||
wxMessageBox(wxString::Format(_("The module %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName.c_str(), moduleVersion.c_str()), _("Module Unsuitable"));
|
||||
AudacityMessageBox(wxString::Format(_("The module %s is matched with Audacity version %s.\n\nIt will not be loaded."), ShortName.c_str(), moduleVersion.c_str()), _("Module Unsuitable"));
|
||||
wxLogMessage(wxString::Format(_("The module %s is matched with Audacity version %s. It will not be loaded."), mName.c_str(), moduleVersion.c_str()));
|
||||
mLib->Unload();
|
||||
return false;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "Prefs.h"
|
||||
#include "ShuttleGui.h"
|
||||
#include "effects/EffectManager.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "widgets/ProgressDialog.h"
|
||||
|
||||
#include "PluginManager.h"
|
||||
|
@ -1009,7 +1010,7 @@ void PluginRegistrationDialog::OnOK(wxCommandEvent & WXUNUSED(evt))
|
|||
}
|
||||
}
|
||||
if (!errMsgs.empty())
|
||||
::wxMessageBox( wxString::Format(
|
||||
AudacityMessageBox( wxString::Format(
|
||||
_("Effect at %s failed to register:\n%s"),
|
||||
path, errMsgs
|
||||
) );
|
||||
|
@ -1778,7 +1779,7 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||
dst.SetFullName( src.GetFullName() );
|
||||
if ( dst.Exists() ) {
|
||||
// Query whether to overwrite
|
||||
bool overwrite = (wxYES == ::wxMessageBox(
|
||||
bool overwrite = (wxYES == ::AudacityMessageBox(
|
||||
wxString::Format(_("Overwrite the plug-in file %s ?"),
|
||||
dst.GetFullPath() ),
|
||||
_("Plug-in already exists"),
|
||||
|
@ -1803,7 +1804,7 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||
}
|
||||
|
||||
if (!copied) {
|
||||
::wxMessageBox(
|
||||
::AudacityMessageBox(
|
||||
_("Plug-in file is in use. Failed to overwrite"));
|
||||
return true;
|
||||
}
|
||||
|
@ -1824,7 +1825,7 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||
});
|
||||
if ( ! nPlugIns ) {
|
||||
// Unlikely after the dry run succeeded
|
||||
::wxMessageBox( wxString::Format(
|
||||
::AudacityMessageBox( wxString::Format(
|
||||
_("Failed to register:\n%s"), errMsg ) );
|
||||
return true;
|
||||
}
|
||||
|
@ -1839,7 +1840,7 @@ bool PluginManager::DropFile(const wxString &fileName)
|
|||
format += wxT("\n");
|
||||
for (const auto &name : names)
|
||||
format += name + wxT("\n");
|
||||
bool enable = (wxYES == ::wxMessageBox(
|
||||
bool enable = (wxYES == ::AudacityMessageBox(
|
||||
wxString::Format( format, nIds ),
|
||||
_("Enable new plug-ins"),
|
||||
wxYES_NO
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "Audacity.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/app.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/intl.h>
|
||||
|
@ -66,6 +65,7 @@
|
|||
#include "Languages.h"
|
||||
|
||||
#include "Prefs.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
std::unique_ptr<wxFileConfig> ugPrefs {};
|
||||
wxFileConfig *gPrefs = NULL;
|
||||
|
@ -180,7 +180,7 @@ void InitPreferences()
|
|||
bool gone = wxRemoveFile(fullPath); // remove FirstTime.ini
|
||||
if (!gone)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Failed to remove %s"), fullPath.c_str()), _("Failed!"));
|
||||
AudacityMessageBox(wxString::Format(_("Failed to remove %s"), fullPath.c_str()), _("Failed!"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ void InitPreferences()
|
|||
{
|
||||
// pop up a dialogue
|
||||
wxString prompt = _("Reset Preferences?\n\nThis is a one-time question, after an 'install' where you asked to have the Preferences reset.");
|
||||
int action = wxMessageBox(prompt, _("Reset Audacity Preferences"),
|
||||
int action = AudacityMessageBox(prompt, _("Reset Audacity Preferences"),
|
||||
wxYES_NO, NULL);
|
||||
if (action == wxYES) // reset
|
||||
{
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <wx/defs.h>
|
||||
#include <wx/dc.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/print.h>
|
||||
#include <wx/printdlg.h>
|
||||
|
||||
|
@ -29,6 +28,7 @@
|
|||
#include "ViewInfo.h"
|
||||
#include "WaveTrack.h"
|
||||
#include "widgets/Ruler.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#include "Experimental.h"
|
||||
|
||||
|
@ -163,7 +163,7 @@ void HandlePrint(wxWindow *parent, const wxString &name, TrackList *tracks)
|
|||
AudacityPrintout printout(name, tracks);
|
||||
if (!printer.Print(parent, &printout, true)) {
|
||||
if (wxPrinter::GetLastError() == wxPRINTER_ERROR) {
|
||||
wxMessageBox(_("There was a problem printing."),
|
||||
AudacityMessageBox(_("There was a problem printing."),
|
||||
_("Print"), wxOK);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -71,7 +71,6 @@ scroll information. It also has some status flags.
|
|||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/scrolbar.h>
|
||||
|
@ -2539,7 +2538,7 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
|
|||
{
|
||||
Message += _("\nIf saved, the project will have no tracks.\n\nTo save any previously open tracks:\nCancel, Edit > Undo until all tracks\nare open, then File > Save Project.");
|
||||
}
|
||||
int result = wxMessageBox( Message,
|
||||
int result = AudacityMessageBox( Message,
|
||||
Title,
|
||||
wxYES_NO | wxCANCEL | wxICON_QUESTION,
|
||||
this);
|
||||
|
@ -2856,7 +2855,7 @@ bool AudacityProject::IsAlreadyOpen(const wxString & projPathName)
|
|||
wxString::Format(_("%s is already open in another window."),
|
||||
newProjPathName.GetName().c_str());
|
||||
wxLogError(errMsg);
|
||||
wxMessageBox(errMsg, _("Error Opening Project"), wxOK | wxCENTRE);
|
||||
AudacityMessageBox(errMsg, _("Error Opening Project"), wxOK | wxCENTRE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -2936,7 +2935,7 @@ bool AudacityProject::WarnOfLegacyFile( )
|
|||
|
||||
// Stop icon, and choose 'NO' by default.
|
||||
int action =
|
||||
wxMessageBox(msg,
|
||||
AudacityMessageBox(msg,
|
||||
_("Warning - Opening Old Project File"),
|
||||
wxYES_NO | wxICON_STOP | wxNO_DEFAULT | wxCENTRE,
|
||||
this);
|
||||
|
@ -2982,7 +2981,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
// So we always refuse to open such files.
|
||||
if (fileName.Lower().EndsWith(wxT(".aup.bak")))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
_("You are trying to open an automatically created backup file.\nDoing this may result in severe data loss.\n\nPlease open the actual Audacity project file instead."),
|
||||
_("Warning - Backup File Detected"),
|
||||
wxOK | wxCENTRE, this);
|
||||
|
@ -2990,7 +2989,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
}
|
||||
|
||||
if (!::wxFileExists(fileName)) {
|
||||
wxMessageBox(_("Could not open file: ") + fileName,
|
||||
AudacityMessageBox(_("Could not open file: ") + fileName,
|
||||
_("Error Opening File"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return;
|
||||
|
@ -3005,14 +3004,14 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
{
|
||||
wxFFile ff(fileName, wxT("rb"));
|
||||
if (!ff.IsOpened()) {
|
||||
wxMessageBox(_("Could not open file: ") + fileName,
|
||||
AudacityMessageBox(_("Could not open file: ") + fileName,
|
||||
_("Error opening file"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return;
|
||||
}
|
||||
int numRead = ff.Read(buf, 15);
|
||||
if (numRead != 15) {
|
||||
wxMessageBox(wxString::Format(_("File may be invalid or corrupted: \n%s"),
|
||||
AudacityMessageBox(wxString::Format(_("File may be invalid or corrupted: \n%s"),
|
||||
(const wxChar*)fileName), _("Error Opening File or Project"),
|
||||
wxOK | wxCENTRE, this);
|
||||
ff.Close();
|
||||
|
@ -3031,7 +3030,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
// Convert to the NEW format.
|
||||
bool success = ConvertLegacyProjectFile(wxFileName{ fileName });
|
||||
if (!success) {
|
||||
wxMessageBox(_("Audacity was unable to convert an Audacity 1.0 project to the new project format."),
|
||||
AudacityMessageBox(_("Audacity was unable to convert an Audacity 1.0 project to the new project format."),
|
||||
_("Error Opening Project"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return;
|
||||
|
@ -3073,7 +3072,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
AutoSaveFile asf;
|
||||
if (!asf.Decode(fileName))
|
||||
{
|
||||
wxMessageBox(_("Could not decode file: ") + fileName,
|
||||
AudacityMessageBox(_("Could not decode file: ") + fileName,
|
||||
_("Error decoding file"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return;
|
||||
|
@ -3207,7 +3206,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
this->PushState(_("Project was recovered"), _("Recover"));
|
||||
|
||||
if (!wxRemoveFile(fileName))
|
||||
wxMessageBox(_("Could not remove old auto save file"),
|
||||
AudacityMessageBox(_("Could not remove old auto save file"),
|
||||
_("Error"), wxICON_STOP, this);
|
||||
}
|
||||
else
|
||||
|
@ -3288,7 +3287,7 @@ void AudacityProject::OpenFile(const wxString &fileNameArg, bool addtohistory)
|
|||
SetProjectTitle();
|
||||
|
||||
wxLogError(wxT("Could not parse file \"%s\". \nError: %s"), fileName.c_str(), xmlFile.GetErrorStr().c_str());
|
||||
wxMessageBox(xmlFile.GetErrorStr(),
|
||||
AudacityMessageBox(xmlFile.GetErrorStr(),
|
||||
_("Error Opening Project"),
|
||||
wxOK | wxCENTRE, this);
|
||||
}
|
||||
|
@ -3461,7 +3460,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
{
|
||||
projName = GetName() + wxT("_data");
|
||||
if (!mDirManager->SetProject(projPath, projName, false)) {
|
||||
wxMessageBox(wxString::Format(_("Couldn't find the project data folder: \"%s\""),
|
||||
AudacityMessageBox(wxString::Format(_("Couldn't find the project data folder: \"%s\""),
|
||||
projName.c_str()),
|
||||
_("Error Opening Project"),
|
||||
wxOK | wxCENTRE, this);
|
||||
|
@ -3520,7 +3519,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
msg.Printf(_("This file was saved using Audacity %s.\nYou are using Audacity %s. You may need to upgrade to a newer version to open this file."),
|
||||
audacityVersion.c_str(),
|
||||
AUDACITY_VERSION_STRING);
|
||||
wxMessageBox(msg,
|
||||
AudacityMessageBox(msg,
|
||||
_("Can't open project file"),
|
||||
wxOK | wxICON_EXCLAMATION | wxCENTRE, this);
|
||||
return false;
|
||||
|
@ -3552,7 +3551,7 @@ bool AudacityProject::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
// Stop icon, and choose 'NO' by default.
|
||||
icon_choice = wxICON_STOP | wxNO_DEFAULT;
|
||||
int action =
|
||||
wxMessageBox(msg,
|
||||
AudacityMessageBox(msg,
|
||||
_("Warning - Opening Old Project File"),
|
||||
wxYES_NO | icon_choice | wxCENTRE,
|
||||
this);
|
||||
|
@ -3781,7 +3780,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
|
|||
if (!bHasTracks)
|
||||
{
|
||||
if (GetUndoManager()->UnsavedChanges() && mEmptyCanBeDirty) {
|
||||
int result = wxMessageBox(_("Your project is now empty.\nIf saved, the project will have no tracks.\n\nTo save any previously open tracks:\nClick 'No', Edit > Undo until all tracks\nare open, then File > Save Project.\n\nSave anyway?"),
|
||||
int result = AudacityMessageBox(_("Your project is now empty.\nIf saved, the project will have no tracks.\n\nTo save any previously open tracks:\nClick 'No', Edit > Undo until all tracks\nare open, then File > Save Project.\n\nSave anyway?"),
|
||||
_("Warning - Empty Project"),
|
||||
wxYES_NO | wxICON_QUESTION, this);
|
||||
if (result == wxNO)
|
||||
|
@ -3822,7 +3821,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
|
|||
wxRemoveFile(safetyFileName);
|
||||
|
||||
if ( !wxRenameFile(mFileName, safetyFileName) ) {
|
||||
wxMessageBox(_("Could not create safety file: ") + safetyFileName,
|
||||
AudacityMessageBox(_("Could not create safety file: ") + safetyFileName,
|
||||
_("Error"), wxICON_STOP, this);
|
||||
return false;
|
||||
}
|
||||
|
@ -3841,7 +3840,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
|
|||
// mStrOtherNamesArray is a temporary array of file names, used only when
|
||||
// saving compressed
|
||||
if (!success) {
|
||||
wxMessageBox(wxString::Format(_("Could not save project. Perhaps %s \nis not writable or the disk is full."),
|
||||
AudacityMessageBox(wxString::Format(_("Could not save project. Perhaps %s \nis not writable or the disk is full."),
|
||||
project.c_str()),
|
||||
_("Error Saving Project"),
|
||||
wxICON_ERROR, this);
|
||||
|
@ -3866,7 +3865,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
|
|||
projPath = wxPathOnly(project);
|
||||
|
||||
if( !wxDir::Exists( projPath ) ){
|
||||
wxMessageBox(wxString::Format(
|
||||
AudacityMessageBox(wxString::Format(
|
||||
_("Could not save project. Path not found. Try creating \ndirectory \"%s\" before saving project with this name."),
|
||||
projPath.c_str()),
|
||||
_("Error Saving Project"),
|
||||
|
@ -5282,7 +5281,7 @@ void AudacityProject::AutoSave()
|
|||
|
||||
if (!wxRenameFile(fn + wxT(".tmp"), fn + wxT(".autosave")))
|
||||
{
|
||||
wxMessageBox(_("Could not create autosave file: ") + fn +
|
||||
AudacityMessageBox(_("Could not create autosave file: ") + fn +
|
||||
wxT(".autosave"), _("Error"), wxICON_STOP, this);
|
||||
return;
|
||||
}
|
||||
|
@ -5301,7 +5300,7 @@ void AudacityProject::DeleteCurrentAutoSaveFile()
|
|||
{
|
||||
if (!wxRemoveFile(mAutoSaveFileName))
|
||||
{
|
||||
wxMessageBox(_("Could not remove old autosave file: ") +
|
||||
AudacityMessageBox(_("Could not remove old autosave file: ") +
|
||||
mAutoSaveFileName, _("Error"), wxICON_STOP, this);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
|
||||
#include "InconsistencyException.h"
|
||||
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
size_t Sequence::sMaxDiskBlockSize = 1048576;
|
||||
|
||||
// Sequence methods
|
||||
|
@ -1060,7 +1062,7 @@ void Sequence::WriteXML(XMLWriter &xmlFile) const
|
|||
wxString::Format(
|
||||
_("Sequence has block file exceeding maximum %s samples per block.\nTruncating to this maximum length."),
|
||||
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
|
||||
wxMessageBox(sMsg, _("Warning - Truncating Overlong Block File"), wxICON_EXCLAMATION | wxOK);
|
||||
AudacityMessageBox(sMsg, _("Warning - Truncating Overlong Block File"), wxICON_EXCLAMATION | wxOK);
|
||||
wxLogWarning(sMsg);
|
||||
bb.f->SetLength(mMaxSamples);
|
||||
}
|
||||
|
|
12
src/Tags.cpp
12
src/Tags.cpp
|
@ -47,6 +47,7 @@
|
|||
#include "ShuttleGui.h"
|
||||
#include "TranslatableStringArray.h"
|
||||
#include "widgets/Grid.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
#include "xml/XMLFileReader.h"
|
||||
|
||||
#include <wx/button.h>
|
||||
|
@ -55,7 +56,6 @@
|
|||
#include <wx/filename.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/sizer.h>
|
||||
|
@ -1112,7 +1112,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event))
|
|||
wxFileName fn(FileNames::DataDir(), wxT("genres.txt"));
|
||||
wxFile f(fn.GetFullPath(), wxFile::write);
|
||||
if (!f.IsOpened() || !f.Write(tc->GetValue())) {
|
||||
wxMessageBox(_("Unable to save genre file."), _("Reset Genres"));
|
||||
AudacityMessageBox(_("Unable to save genre file."), _("Reset Genres"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ void TagsEditor::OnEdit(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
void TagsEditor::OnReset(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
int id = wxMessageBox(_("Are you sure you want to reset the genre list to defaults?"),
|
||||
int id = AudacityMessageBox(_("Are you sure you want to reset the genre list to defaults?"),
|
||||
_("Reset Genres"),
|
||||
wxYES_NO);
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ void TagsEditor::OnReset(wxCommandEvent & WXUNUSED(event))
|
|||
(!tf.Exists() && tf.Create());
|
||||
|
||||
if (!open) {
|
||||
wxMessageBox(_("Unable to open genre file."), _("Reset Genres"));
|
||||
AudacityMessageBox(_("Unable to open genre file."), _("Reset Genres"));
|
||||
mLocal.LoadGenres();
|
||||
return;
|
||||
}
|
||||
|
@ -1151,7 +1151,7 @@ void TagsEditor::OnReset(wxCommandEvent & WXUNUSED(event))
|
|||
}
|
||||
|
||||
if (!tf.Write()) {
|
||||
wxMessageBox(_("Unable to save genre file."), _("Reset Genres"));
|
||||
AudacityMessageBox(_("Unable to save genre file."), _("Reset Genres"));
|
||||
mLocal.LoadGenres();
|
||||
return;
|
||||
}
|
||||
|
@ -1198,7 +1198,7 @@ void TagsEditor::OnLoad(wxCommandEvent & WXUNUSED(event))
|
|||
XMLFileReader reader;
|
||||
if (!reader.Parse(&mLocal, fn)) {
|
||||
// Inform user of load failure
|
||||
wxMessageBox(reader.GetErrorStr(),
|
||||
AudacityMessageBox(reader.GetErrorStr(),
|
||||
_("Error Loading Metadata"),
|
||||
wxOK | wxCENTRE,
|
||||
this);
|
||||
|
|
|
@ -66,7 +66,6 @@ can't be.
|
|||
#include <wx/file.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/mstream.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
|
||||
#include "Project.h"
|
||||
|
@ -81,6 +80,7 @@ can't be.
|
|||
#include "Prefs.h"
|
||||
#include "AColor.h"
|
||||
#include "ImageManipulation.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#include <wx/arrimpl.cpp>
|
||||
|
||||
|
@ -756,7 +756,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||
#if 0
|
||||
if( wxFileExist( FileName ))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
// _("Theme cache file:\n %s\nalready exists.\nAre you sure you want to replace it?"),
|
||||
FileName.c_str() )
|
||||
|
@ -774,13 +774,13 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||
#endif
|
||||
if( !ImageCache.SaveFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not write file:\n %s."),
|
||||
FileName.c_str() ));
|
||||
return;
|
||||
}
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
/* i18n-hint: A theme is a consistent visual style across an application's
|
||||
graphical user interface, including choices of colors, and similarity of images
|
||||
|
@ -796,7 +796,7 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||
const wxString &FileName = FileNames::ThemeCacheAsCee( );
|
||||
if( !OutStream.OpenFile( FileName ))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not open file:\n %s\nfor writing."),
|
||||
FileName.c_str() ));
|
||||
|
@ -804,13 +804,13 @@ void ThemeBase::CreateImageCache( bool bBinarySave )
|
|||
}
|
||||
if( !ImageCache.SaveFile(OutStream, wxBITMAP_TYPE_PNG ) )
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not write images to file:\n %s."),
|
||||
FileName.c_str() ));
|
||||
return;
|
||||
}
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
/* i18n-hint "Cee" means the C computer programming language */
|
||||
_("Theme as Cee code written to:\n %s."),
|
||||
|
@ -965,7 +965,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
|
|||
{
|
||||
if( bOkIfNotFound )
|
||||
return false; // did not load the images, so return false.
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not find file:\n %s.\nTheme not loaded."),
|
||||
FileName.c_str() ));
|
||||
|
@ -974,7 +974,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
|
|||
if( !ImageCache.LoadFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||
{
|
||||
/* i18n-hint: Do not translate png. It is the name of a file format.*/
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
|
||||
FileName.c_str() ));
|
||||
|
@ -1014,7 +1014,7 @@ bool ThemeBase::ReadImageCache( teThemeType type, bool bOkIfNotFound)
|
|||
// was not a valid png image.
|
||||
// Most likely someone edited it by mistake,
|
||||
// Or some experiment is being tried with NEW formats for it.
|
||||
wxMessageBox(_("Audacity could not read its default theme.\nPlease report the problem."));
|
||||
AudacityMessageBox(_("Audacity could not read its default theme.\nPlease report the problem."));
|
||||
return false;
|
||||
}
|
||||
//wxLogDebug("Read %i by %i", ImageCache.GetWidth(), ImageCache.GetHeight() );
|
||||
|
@ -1092,7 +1092,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
|
|||
if( !mImages[i].LoadFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||
{
|
||||
/* i18n-hint: Do not translate png. It is the name of a file format.*/
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not load file:\n %s.\nBad png format perhaps?"),
|
||||
FileName.c_str() ));
|
||||
|
@ -1116,7 +1116,7 @@ void ThemeBase::LoadComponents( bool bOkIfNotFound )
|
|||
{
|
||||
if( bOkIfNotFound )
|
||||
return;
|
||||
wxMessageBox(wxString::Format(_("None of the expected theme component files\n were found in:\n %s."),
|
||||
AudacityMessageBox(wxString::Format(_("None of the expected theme component files\n were found in:\n %s."),
|
||||
FileNames::ThemeComponentsDir().c_str()));
|
||||
}
|
||||
}
|
||||
|
@ -1138,7 +1138,7 @@ void ThemeBase::SaveComponents()
|
|||
#endif
|
||||
if( !wxDirExists( FileNames::ThemeComponentsDir() ))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Could not create directory:\n %s"),
|
||||
FileNames::ThemeComponentsDir().c_str() ));
|
||||
|
@ -1166,11 +1166,11 @@ void ThemeBase::SaveComponents()
|
|||
if (n > 0)
|
||||
{
|
||||
auto result =
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Some required files in:\n %s\nwere already present. Overwrite?"),
|
||||
FileNames::ThemeComponentsDir().c_str()),
|
||||
wxMessageBoxCaptionStr,
|
||||
AudacityMessageBoxCaptionStr(),
|
||||
wxYES_NO | wxNO_DEFAULT);
|
||||
if(result == wxNO)
|
||||
return;
|
||||
|
@ -1183,7 +1183,7 @@ void ThemeBase::SaveComponents()
|
|||
FileName = FileNames::ThemeComponent( mBitmapNames[i] );
|
||||
if( !mImages[i].SaveFile( FileName, wxBITMAP_TYPE_PNG ))
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Audacity could not save file:\n %s"),
|
||||
FileName.c_str() ));
|
||||
|
@ -1191,7 +1191,7 @@ void ThemeBase::SaveComponents()
|
|||
}
|
||||
}
|
||||
}
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Theme written to:\n %s."),
|
||||
FileNames::ThemeComponentsDir().c_str() ));
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include <wx/string.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/dynlib.h> //<! For windows.h
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "ShuttleGui.h"
|
||||
#include "Project.h"
|
||||
|
@ -40,6 +39,7 @@
|
|||
#include "Prefs.h"
|
||||
#include "widgets/NumericTextCtrl.h"
|
||||
#include "widgets/HelpSystem.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
#define TIMER_ID 7000
|
||||
|
||||
|
@ -364,7 +364,7 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
|||
this->TransferDataFromWindow();
|
||||
if (!m_TimeSpan_Duration.IsPositive())
|
||||
{
|
||||
wxMessageBox(_("Duration is zero. Nothing will be recorded."),
|
||||
AudacityMessageBox(_("Duration is zero. Nothing will be recorded."),
|
||||
_("Error in Duration"), wxICON_EXCLAMATION | wxOK);
|
||||
return;
|
||||
}
|
||||
|
@ -373,14 +373,14 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
|||
wxString sTemp = m_fnAutoSaveFile.GetFullPath();
|
||||
if (m_pTimerAutoSaveCheckBoxCtrl->IsChecked()) {
|
||||
if (!m_fnAutoSaveFile.IsOk() || m_fnAutoSaveFile.IsDir()) {
|
||||
wxMessageBox(_("Automatic Save path is invalid."),
|
||||
AudacityMessageBox(_("Automatic Save path is invalid."),
|
||||
_("Error in Automatic Save"), wxICON_EXCLAMATION | wxOK);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (m_pTimerAutoExportCheckBoxCtrl->IsChecked()) {
|
||||
if (!m_fnAutoExportFile.IsOk() || m_fnAutoExportFile.IsDir()) {
|
||||
wxMessageBox(_("Automatic Export path is invalid."),
|
||||
AudacityMessageBox(_("Automatic Export path is invalid."),
|
||||
_("Error in Automatic Export"), wxICON_EXCLAMATION | wxOK);
|
||||
return;
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ bool TimerRecordDialog::HaveFilesToRecover()
|
|||
{
|
||||
wxDir dir(FileNames::AutoSaveDir());
|
||||
if (!dir.IsOpened()) {
|
||||
wxMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
AudacityMessageBox(_("Could not enumerate files in auto save directory."),
|
||||
_("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ bool TimerRecordDialog::RemoveAllAutoSaveFiles()
|
|||
{
|
||||
// I don't think this error message is actually useful.
|
||||
// -dmazzoni
|
||||
//wxMessageBox(_("Could not remove auto save file: " + files[i]),
|
||||
//AudacityMessageBox(_("Could not remove auto save file: " + files[i]),
|
||||
// _("Error"), wxICON_STOP);
|
||||
return false;
|
||||
}
|
||||
|
@ -648,7 +648,7 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
|
|||
}
|
||||
|
||||
// Show Error Message Box
|
||||
wxMessageBox(sMessage, _("Error"), wxICON_EXCLAMATION | wxOK);
|
||||
AudacityMessageBox(sMessage, _("Error"), wxICON_EXCLAMATION | wxOK);
|
||||
} else {
|
||||
|
||||
if (bWasStopped && (iOverriddenAction != POST_TIMER_RECORD_NOTHING)) {
|
||||
|
@ -657,7 +657,7 @@ int TimerRecordDialog::ExecutePostRecordActions(bool bWasStopped) {
|
|||
m_pTimerAfterCompleteChoiceCtrl->GetString(iOverriddenAction));
|
||||
}
|
||||
|
||||
wxMessageBox(sMessage, _("Timer Recording"), wxICON_INFORMATION | wxOK);
|
||||
AudacityMessageBox(sMessage, _("Timer Recording"), wxICON_INFORMATION | wxOK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,17 +22,16 @@ or "OFF" point
|
|||
|
||||
#include "VoiceKey.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/textfile.h>
|
||||
#include <wx/intl.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "WaveTrack.h"
|
||||
#include "widgets/ErrorDialog.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
@ -96,7 +95,7 @@ sampleCount VoiceKey::OnForward (
|
|||
backwards by words. So 'key' is being used in the sense of an index.
|
||||
This error message means that you've selected too short
|
||||
a region of audio to be able to use this feature.*/
|
||||
wxMessageBox(_("Selection is too small to use voice key."));
|
||||
AudacityMessageBox(_("Selection is too small to use voice key."));
|
||||
return start;
|
||||
}
|
||||
else {
|
||||
|
@ -244,7 +243,7 @@ sampleCount VoiceKey::OnBackward (
|
|||
|
||||
if((mWindowSize) >= (len + 10).as_double() ){
|
||||
|
||||
wxMessageBox(_("Selection is too small to use voice key."));
|
||||
AudacityMessageBox(_("Selection is too small to use voice key."));
|
||||
return end;
|
||||
}
|
||||
else {
|
||||
|
@ -381,7 +380,7 @@ sampleCount VoiceKey::OffForward (
|
|||
{
|
||||
|
||||
if((mWindowSize) >= (len + 10).as_double() ){
|
||||
wxMessageBox(_("Selection is too small to use voice key."));
|
||||
AudacityMessageBox(_("Selection is too small to use voice key."));
|
||||
|
||||
return start;
|
||||
}
|
||||
|
@ -519,7 +518,7 @@ sampleCount VoiceKey::OffBackward (
|
|||
|
||||
if((mWindowSize) >= (len + 10).as_double() ){
|
||||
|
||||
wxMessageBox(_("Selection is too small to use voice key."));
|
||||
AudacityMessageBox(_("Selection is too small to use voice key."));
|
||||
return end;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/longlong.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ CommandManager. It holds the callback for one command.
|
|||
#include <wx/hash.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
#include "../AudacityException.h"
|
||||
|
@ -1710,7 +1709,7 @@ bool CommandManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
void CommandManager::HandleXMLEndTag(const wxChar *tag)
|
||||
{
|
||||
if (!wxStrcmp(tag, wxT("audacitykeyboard"))) {
|
||||
wxMessageBox(wxString::Format(_("Loaded %d keyboard shortcuts\n"),
|
||||
AudacityMessageBox(wxString::Format(_("Loaded %d keyboard shortcuts\n"),
|
||||
mXMLKeysRead),
|
||||
_("Loading Keyboard Shortcuts"),
|
||||
wxOK | wxCENTRE);
|
||||
|
|
|
@ -24,11 +24,11 @@ should be reference-counted.
|
|||
|
||||
#include "../MemoryX.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/statusbr.h>
|
||||
#include "../widgets/ProgressDialog.h"
|
||||
#include "../commands/ResponseQueue.h"
|
||||
#include "../src/Project.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
/// Interface for objects that can receive command progress information
|
||||
class CommandProgressTarget /* not final */
|
||||
|
@ -96,14 +96,14 @@ public:
|
|||
void Update(const wxString &) override {}
|
||||
};
|
||||
|
||||
/// Displays messages from a command in a wxMessageBox
|
||||
/// Displays messages from a command in an AudacityMessageBox
|
||||
class MessageBoxTarget final : public CommandMessageTarget
|
||||
{
|
||||
public:
|
||||
virtual ~MessageBoxTarget() {}
|
||||
void Update(const wxString &message) override
|
||||
{
|
||||
wxMessageBox(message);
|
||||
AudacityMessageBox(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <wx/dcmemory.h>
|
||||
#include <wx/dynarray.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../AColor.h"
|
||||
#include "../AllThemeResources.h"
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "../widgets/valnum.h"
|
||||
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
// Define keys, defaults, minimums, and maximums for the effect parameters
|
||||
//
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
#include <math.h>
|
||||
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/valgen.h>
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "../widgets/valnum.h"
|
||||
|
||||
#include "../WaveTrack.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include <wx/dcclient.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../AColor.h"
|
||||
#include "../Prefs.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "../widgets/LinkingHtmlWindow.h"
|
||||
#include "../widgets/HelpSystem.h"
|
||||
#include "../widgets/NumericTextCtrl.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
@ -512,7 +513,7 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||
#endif
|
||||
f.Open();
|
||||
if (!f.IsOpened()) {
|
||||
wxMessageBox(_("Couldn't write to file: ") + fName);
|
||||
AudacityMessageBox(_("Couldn't write to file: ") + fName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <wx/intl.h>
|
||||
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "../widgets/valnum.h"
|
||||
#include "../SampleFormat.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ greater use in future.
|
|||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/hashmap.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stockitem.h>
|
||||
#include <wx/string.h>
|
||||
|
@ -2646,7 +2645,7 @@ int Effect::MessageBox
|
|||
title = GetTranslatedName();
|
||||
else
|
||||
title = wxString::Format(_("%s: %s"), GetTranslatedName(), titleStr);
|
||||
return wxMessageBox(message, title, style, mUIParent);
|
||||
return AudacityMessageBox(message, title, style, mUIParent);
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(EffectDialog, wxDialogWrapper)
|
||||
|
@ -3554,7 +3553,7 @@ void EffectUIHost::OnDeletePreset(wxCommandEvent & evt)
|
|||
{
|
||||
wxString preset = mUserPresets[evt.GetId() - kDeletePresetID];
|
||||
|
||||
int res = wxMessageBox(wxString::Format(_("Are you sure you want to delete \"%s\"?"), preset.c_str()),
|
||||
int res = AudacityMessageBox(wxString::Format(_("Are you sure you want to delete \"%s\"?"), preset.c_str()),
|
||||
_("Delete Preset"),
|
||||
wxICON_QUESTION | wxYES_NO);
|
||||
if (res == wxYES)
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
#include "../Audacity.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/stopwatch.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#if defined(EXPERIMENTAL_EFFECTS_RACK)
|
||||
#include "EffectRack.h"
|
||||
|
@ -717,7 +717,7 @@ Effect *EffectManager::GetEffect(const PluginID & ID)
|
|||
}
|
||||
}
|
||||
|
||||
wxMessageBox(wxString::Format(_("Attempting to initialize the following effect failed:\n\n%s\n\nMore information may be available in Help->Show Log"),
|
||||
AudacityMessageBox(wxString::Format(_("Attempting to initialize the following effect failed:\n\n%s\n\nMore information may be available in Help->Show Log"),
|
||||
PluginManager::Get().GetName(ID).c_str()),
|
||||
_("Effect failed to initialize"));
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/brush.h>
|
||||
#include <wx/button.h> // not really needed here
|
||||
#include <wx/dcmemory.h>
|
||||
|
|
|
@ -506,7 +506,7 @@ bool EffectEqualization48x::Benchmark(EffectEqualization* effectEqualization)
|
|||
wxTimeSpan tsDefaultThreaded(0, 0, 0, times[3]);
|
||||
wxTimeSpan tsDefault(0, 0, 0, times[4]);
|
||||
|
||||
Effect::MessageBox(wxString::Format(_("Benchmark times:\nOriginal: %s\nDefault Segmented: %s\nDefault Threaded: %s\nSSE: %s\nSSE Threaded: %s\n"),tsDefault.Format(wxT("%M:%S.%l")).c_str(),
|
||||
Effect::MessageBox(wxString::Format(_("Benchmark times:\nOriginal: %s\nDefault Segmented: %s\nDefault Threaded: %s\nSSE: %s\nSSE Threaded: %s\n"),tsDefault.Format(wxT("%M:%S.%l")).c_str(),
|
||||
tsDefaultEnhanced.Format(wxT("%M:%S.%l")).c_str(), tsDefaultThreaded.Format(wxT("%M:%S.%l")).c_str(),tsSSE.Format(wxT("%M:%S.%l")).c_str(),tsSSEThreaded.Format(wxT("%M:%S.%l")).c_str()));
|
||||
return bBreakLoop; // return !bBreakLoop ?
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/valnum.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "../LabelTrack.h"
|
||||
#include "../WaveTrack.h"
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "TimeWarper.h"
|
||||
|
||||
#include "../MemoryX.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
bool Generator::Process()
|
||||
{
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "../Prefs.h"
|
||||
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
#include <wx/dcmemory.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/stattext.h>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "../ShuttleGui.h"
|
||||
#include "../FFT.h"
|
||||
#include "../widgets/valnum.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "../Prefs.h"
|
||||
|
||||
#include "../WaveTrack.h"
|
||||
|
|
|
@ -26,10 +26,10 @@ the audio, rather than actually finding the clicks.
|
|||
#include <math.h>
|
||||
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../InterpolateAudio.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Repair.h"
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ a graph for EffectScienFilter.
|
|||
#include <wx/brush.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valgen.h>
|
||||
|
@ -55,6 +54,7 @@ a graph for EffectScienFilter.
|
|||
#include "../Theme.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/valnum.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Equalization.h" // For SliderAx
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ It \TODO: description
|
|||
#include <wx/choice.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/intl.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "../ShuttleGui.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/valnum.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
// Declaration of RegionList
|
||||
class RegionList : public std::list < Region > {};
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include <wx/listctrl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/module.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/process.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/recguard.h>
|
||||
|
@ -91,6 +90,7 @@
|
|||
#include "../../widgets/NumericTextCtrl.h"
|
||||
#include "../../widgets/wxPanelWrapper.h"
|
||||
#include "../../widgets/valnum.h"
|
||||
#include "../../widgets/ErrorDialog.h"
|
||||
#include "../../xml/XMLFileReader.h"
|
||||
#include "../../xml/XMLWriter.h"
|
||||
|
||||
|
@ -1874,7 +1874,7 @@ void VSTEffect::ExportPresets()
|
|||
else
|
||||
{
|
||||
// This shouldn't happen, but complain anyway
|
||||
wxMessageBox(_("Unrecognized file extension."),
|
||||
AudacityMessageBox(_("Unrecognized file extension."),
|
||||
_("Error Saving VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -1926,7 +1926,7 @@ void VSTEffect::ImportPresets()
|
|||
else
|
||||
{
|
||||
// This shouldn't happen, but complain anyway
|
||||
wxMessageBox(_("Unrecognized file extension."),
|
||||
AudacityMessageBox(_("Unrecognized file extension."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -1936,7 +1936,7 @@ void VSTEffect::ImportPresets()
|
|||
|
||||
if (!success)
|
||||
{
|
||||
wxMessageBox(_("Unable to load presets file."),
|
||||
AudacityMessageBox(_("Unable to load presets file."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3040,7 +3040,7 @@ bool VSTEffect::LoadFXB(const wxFileName & fn)
|
|||
ArrayOf<unsigned char> data{ size_t(f.Length()) };
|
||||
if (!data)
|
||||
{
|
||||
wxMessageBox(_("Unable to allocate memory when loading presets file."),
|
||||
AudacityMessageBox(_("Unable to allocate memory when loading presets file."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3054,7 +3054,7 @@ bool VSTEffect::LoadFXB(const wxFileName & fn)
|
|||
ssize_t len = f.Read((void *) bptr, f.Length());
|
||||
if (f.Error())
|
||||
{
|
||||
wxMessageBox(_("Unable to read presets file."),
|
||||
AudacityMessageBox(_("Unable to read presets file."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3211,7 +3211,7 @@ bool VSTEffect::LoadFXP(const wxFileName & fn)
|
|||
ArrayOf<unsigned char> data{ size_t(f.Length()) };
|
||||
if (!data)
|
||||
{
|
||||
wxMessageBox(_("Unable to allocate memory when loading presets file."),
|
||||
AudacityMessageBox(_("Unable to allocate memory when loading presets file."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3225,7 +3225,7 @@ bool VSTEffect::LoadFXP(const wxFileName & fn)
|
|||
ssize_t len = f.Read((void *) bptr, f.Length());
|
||||
if (f.Error())
|
||||
{
|
||||
wxMessageBox(_("Unable to read presets file."),
|
||||
AudacityMessageBox(_("Unable to read presets file."),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3421,7 +3421,7 @@ bool VSTEffect::LoadXML(const wxFileName & fn)
|
|||
if (!ok)
|
||||
{
|
||||
// Inform user of load failure
|
||||
wxMessageBox(reader.GetErrorStr(),
|
||||
AudacityMessageBox(reader.GetErrorStr(),
|
||||
_("Error Loading VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3438,7 +3438,7 @@ void VSTEffect::SaveFXB(const wxFileName & fn)
|
|||
wxFFile f(fullPath, wxT("wb"));
|
||||
if (!f.IsOpened())
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
|
||||
_("Error Saving VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3505,7 +3505,7 @@ void VSTEffect::SaveFXB(const wxFileName & fn)
|
|||
|
||||
if (f.Error())
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
|
||||
_("Error Saving VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3523,7 +3523,7 @@ void VSTEffect::SaveFXP(const wxFileName & fn)
|
|||
wxFFile f(fullPath, wxT("wb"));
|
||||
if (!f.IsOpened())
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("Could not open file: \"%s\""), fullPath.c_str()),
|
||||
_("Error Saving VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3538,7 +3538,7 @@ void VSTEffect::SaveFXP(const wxFileName & fn)
|
|||
f.Write(buf.GetData(), buf.GetDataLen());
|
||||
if (f.Error())
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("Error writing to file: \"%s\""), fullPath.c_str()),
|
||||
_("Error Saving VST Presets"),
|
||||
wxOK | wxCENTRE,
|
||||
mParent);
|
||||
|
@ -3733,7 +3733,7 @@ bool VSTEffect::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
{
|
||||
wxString msg;
|
||||
msg.Printf(_("This parameter file was saved from %s. Continue?"), value);
|
||||
int result = wxMessageBox(msg, wxT("Confirm"), wxYES_NO, mParent);
|
||||
int result = AudacityMessageBox(msg, wxT("Confirm"), wxYES_NO, mParent);
|
||||
if (result == wxNO)
|
||||
{
|
||||
return false;
|
||||
|
|
|
@ -37,7 +37,6 @@ effects from this one class.
|
|||
#include <wx/filename.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/statbox.h>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <wx/evtloop.h>
|
||||
#endif
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
@ -38,6 +37,7 @@
|
|||
#include "../../ShuttleGui.h"
|
||||
#include "../../widgets/valnum.h"
|
||||
#include "../../widgets/wxPanelWrapper.h"
|
||||
#include "../../widgets/ErrorDialog.h"
|
||||
|
||||
#include "lilv/lilv.h"
|
||||
#include "suil/suil.h"
|
||||
|
@ -1034,7 +1034,7 @@ bool LV2Effect::PopulateUI(wxWindow *parent)
|
|||
mMaster = InitInstance(mSampleRate);
|
||||
if (mMaster == NULL)
|
||||
{
|
||||
wxMessageBox(_("Couldn't instantiate effect"));
|
||||
AudacityMessageBox(_("Couldn't instantiate effect"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ effects from this one class.
|
|||
#include <wx/datetime.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sstream.h>
|
||||
#include <wx/textdlg.h>
|
||||
#include <wx/txtstrm.h>
|
||||
|
@ -55,6 +54,7 @@ effects from this one class.
|
|||
#include "../../WaveClip.h"
|
||||
#include "../../WaveTrack.h"
|
||||
#include "../../widgets/valnum.h"
|
||||
#include "../../widgets/ErrorDialog.h"
|
||||
#include "../../Prefs.h"
|
||||
#include "../../prefs/WaveformSettings.h"
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <wx/button.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/combobox.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/statbox.h>
|
||||
|
@ -39,6 +38,7 @@
|
|||
|
||||
#include "../../ShuttleGui.h"
|
||||
#include "../../widgets/valnum.h"
|
||||
#include "../../widgets/ErrorDialog.h"
|
||||
|
||||
#include "../../LabelTrack.h"
|
||||
#include "../../WaveTrack.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <wx/dynarray.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
|
@ -66,6 +65,7 @@
|
|||
#include "../Project.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "../widgets/Warning.h"
|
||||
#include "../AColor.h"
|
||||
#include "../Dependencies.h"
|
||||
|
@ -474,7 +474,7 @@ bool Exporter::ExamineTracks()
|
|||
message = _("All selected audio is muted.");
|
||||
else
|
||||
message = _("All audio is muted.");
|
||||
wxMessageBox(message,
|
||||
AudacityMessageBox(message,
|
||||
_("Unable to export"),
|
||||
wxOK | wxICON_INFORMATION);
|
||||
return false;
|
||||
|
@ -599,7 +599,7 @@ bool Exporter::GetFilename()
|
|||
mFilename.GetFullName() +
|
||||
wxT("\"?\n");
|
||||
|
||||
int action = wxMessageBox(prompt,
|
||||
int action = AudacityMessageBox(prompt,
|
||||
_("Warning"),
|
||||
wxYES_NO | wxICON_EXCLAMATION);
|
||||
if (action != wxYES) {
|
||||
|
@ -620,7 +620,7 @@ bool Exporter::GetFilename()
|
|||
mFilename.GetFullName().c_str(),
|
||||
defext.c_str());
|
||||
|
||||
int action = wxMessageBox(prompt,
|
||||
int action = AudacityMessageBox(prompt,
|
||||
_("Warning"),
|
||||
wxYES_NO | wxICON_EXCLAMATION);
|
||||
if (action != wxYES) {
|
||||
|
@ -629,7 +629,7 @@ bool Exporter::GetFilename()
|
|||
}
|
||||
|
||||
if (mFilename.GetFullPath().Length() >= 256) {
|
||||
wxMessageBox(_("Sorry, pathnames longer than 256 characters not supported."));
|
||||
AudacityMessageBox(_("Sorry, pathnames longer than 256 characters not supported."));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -646,7 +646,7 @@ bool Exporter::GetFilename()
|
|||
if (mFilename.GetFullPath() == aliasedFile.mFileName.GetFullPath() &&
|
||||
!mFilename.FileExists()) {
|
||||
// Warn and return to the dialog
|
||||
wxMessageBox(_("You are attempting to overwrite an aliased file that is missing.\n\
|
||||
AudacityMessageBox(_("You are attempting to overwrite an aliased file that is missing.\n\
|
||||
The file cannot be written because the path is needed to restore the original audio to the project.\n\
|
||||
Choose File > Check Dependencies to view the locations of all missing files.\n\
|
||||
If you still wish to export, please choose a different filename or folder."));
|
||||
|
@ -663,7 +663,7 @@ bool Exporter::GetFilename()
|
|||
prompt.Printf(_("A file named \"%s\" already exists. Replace?"),
|
||||
mFilename.GetFullPath().c_str());
|
||||
|
||||
int action = wxMessageBox(prompt,
|
||||
int action = AudacityMessageBox(prompt,
|
||||
_("Warning"),
|
||||
wxYES_NO | wxICON_EXCLAMATION);
|
||||
if (action != wxYES) {
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <wx/combobox.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/process.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -33,6 +32,7 @@
|
|||
#include "../Internat.h"
|
||||
#include "../float_cast.h"
|
||||
#include "../widgets/FileHistory.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "../Track.h"
|
||||
|
||||
|
@ -370,7 +370,7 @@ ProgressResult ExportCL::Export(AudacityProject *project,
|
|||
}
|
||||
|
||||
if (!rc) {
|
||||
wxMessageBox(wxString::Format(_("Cannot export audio to %s"),
|
||||
AudacityMessageBox(wxString::Format(_("Cannot export audio to %s"),
|
||||
fName.c_str()));
|
||||
process.Detach();
|
||||
process.CloseOutput();
|
||||
|
|
|
@ -25,7 +25,6 @@ function.
|
|||
#include <wx/choice.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -41,6 +40,7 @@ function.
|
|||
#include "../Project.h"
|
||||
#include "../Tags.h"
|
||||
#include "../Track.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Export.h"
|
||||
#include "ExportFFmpeg.h"
|
||||
|
@ -63,7 +63,7 @@ static bool CheckFFmpegPresence(bool quiet = false)
|
|||
{
|
||||
if (!quiet)
|
||||
{
|
||||
wxMessageBox(_("Properly configured FFmpeg is required to proceed.\nYou can configure it at Preferences > Libraries."));
|
||||
AudacityMessageBox(_("Properly configured FFmpeg is required to proceed.\nYou can configure it at Preferences > Libraries."));
|
||||
}
|
||||
result = false;
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
|
|||
// and the default video/audio codecs that the format uses.
|
||||
if ((mEncFormatDesc = av_guess_format(shortname, OSINPUT(mName), NULL)) == NULL)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't determine format description for file \"%s\"."), mName.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't determine format description for file \"%s\"."), mName.c_str()),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
|
|||
mEncFormatCtx.reset(avformat_alloc_context());
|
||||
if (!mEncFormatCtx)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate output format context.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate output format context.")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
|
|||
// At the moment Audacity can export only one audio stream
|
||||
if ((mEncAudioStream = avformat_new_stream(mEncFormatCtx.get(), NULL)) == NULL)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't add audio stream to output file \"%s\"."), mName.c_str()),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't add audio stream to output file \"%s\"."), mName.c_str()),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
|
|||
{
|
||||
if ((err = ufile_fopen(&mEncFormatCtx->pb, mName, AVIO_FLAG_WRITE)) < 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName.c_str(), err),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open output file \"%s\" to write. Error code is %d."), mName.c_str(), err),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ bool ExportFFmpeg::Init(const char *shortname, AudacityProject *project, const T
|
|||
// Write headers to the output file.
|
||||
if ((err = avformat_write_header(mEncFormatCtx.get(), NULL)) < 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't write headers to output file \"%s\". Error code is %d."), mName.c_str(),err),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't write headers to output file \"%s\". Error code is %d."), mName.c_str(),err),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
|||
// Is the required audio codec compiled into libavcodec?
|
||||
if (codec == NULL)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg cannot find audio codec 0x%x.\nSupport for this codec is probably not compiled in."), (unsigned int) mEncAudioCodecCtx->codec_id),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg cannot find audio codec 0x%x.\nSupport for this codec is probably not compiled in."), (unsigned int) mEncAudioCodecCtx->codec_id),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
|||
// Open the codec.
|
||||
if (avcodec_open2(mEncAudioCodecCtx.get(), codec, &options) < 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open audio codec 0x%x."),mEncAudioCodecCtx->codec_id),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't open audio codec 0x%x."),mEncAudioCodecCtx->codec_id),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ bool ExportFFmpeg::InitCodecs(AudacityProject *project)
|
|||
mEncAudioFifoOutBuf.reset(static_cast<int16_t*>(av_malloc(mEncAudioFifoOutBufSiz)));
|
||||
if (!mEncAudioFifoOutBuf)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate buffer to read into from audio FIFO.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't allocate buffer to read into from audio FIFO.")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -576,13 +576,13 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam
|
|||
buffer_size = av_samples_get_buffer_size(NULL, avctx->channels, frame->nb_samples,
|
||||
avctx->sample_fmt, 0);
|
||||
if (buffer_size < 0) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not get sample buffer size")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not get sample buffer size")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return buffer_size;
|
||||
}
|
||||
samples.reset(static_cast<uint8_t*>(av_malloc(buffer_size)));
|
||||
if (!samples) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not allocate bytes for samples buffer")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not allocate bytes for samples buffer")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
@ -590,7 +590,7 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam
|
|||
ret = avcodec_fill_audio_frame(frame.get(), avctx->channels, avctx->sample_fmt,
|
||||
samples.get(), buffer_size, 0);
|
||||
if (ret < 0) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not setup audio frame")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Could not setup audio frame")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return ret;
|
||||
}
|
||||
|
@ -638,7 +638,7 @@ static int encode_audio(AVCodecContext *avctx, AVPacket *pkt, int16_t *audio_sam
|
|||
|
||||
ret = avcodec_encode_audio2(avctx, pkt, frame.get(), &got_output);
|
||||
if (ret < 0) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - encoding frame failed")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - encoding frame failed")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return ret;
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ bool ExportFFmpeg::Finalize()
|
|||
int nAudioFrameSizeOut = default_frame_size * mEncAudioCodecCtx->channels * sizeof(int16_t);
|
||||
|
||||
if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz || nFifoBytes > mEncAudioFifoOutBufSiz) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Too much remaining data.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Too much remaining data.")),
|
||||
_("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -727,7 +727,7 @@ bool ExportFFmpeg::Finalize()
|
|||
|
||||
if (av_interleaved_write_frame(mEncFormatCtx.get(), &pkt) != 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Couldn't write last audio frame to output file.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Couldn't write last audio frame to output file.")),
|
||||
_("FFmpeg Error"), wxOK | wxCENTER | wxICON_EXCLAMATION);
|
||||
break;
|
||||
}
|
||||
|
@ -777,7 +777,7 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize)
|
|||
return false;
|
||||
|
||||
if (nAudioFrameSizeOut > mEncAudioFifoOutBufSiz) {
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - nAudioFrameSizeOut too large.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - nAudioFrameSizeOut too large.")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -795,7 +795,7 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize)
|
|||
default_frame_size);
|
||||
if (ret < 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't encode audio frame.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Can't encode audio frame.")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -814,7 +814,7 @@ bool ExportFFmpeg::EncodeAudioFrame(int16_t *pFrame, size_t frameSize)
|
|||
// Write the encoded audio frame to the output file.
|
||||
if ((ret = av_interleaved_write_frame(mEncFormatCtx.get(), &pkt)) < 0)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("FFmpeg : ERROR - Failed to write audio frame to file.")),
|
||||
AudacityMessageBox(wxString::Format(_("FFmpeg : ERROR - Failed to write audio frame to file.")),
|
||||
_("FFmpeg Error"), wxOK|wxCENTER|wxICON_EXCLAMATION);
|
||||
return false;
|
||||
}
|
||||
|
@ -834,7 +834,7 @@ ProgressResult ExportFFmpeg::Export(AudacityProject *project,
|
|||
mSubFormat = AdjustFormatIndex(subformat);
|
||||
if (channels > ExportFFmpegOptions::fmts[mSubFormat].maxchannels)
|
||||
{
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("Attempted to export %d channels, but maximum number of channels for selected output format is %d"),
|
||||
channels,
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include <wx/choice.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -62,6 +61,7 @@
|
|||
#include "../Project.h"
|
||||
#include "../Tags.h"
|
||||
#include "../TranslatableStringArray.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Export.h"
|
||||
|
||||
|
@ -568,7 +568,7 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
if (preset)
|
||||
{
|
||||
wxString query = wxString::Format(_("Overwrite preset '%s'?"),name.c_str());
|
||||
int action = wxMessageBox(query,_("Confirm Overwrite"),wxYES_NO | wxCENTRE);
|
||||
int action = AudacityMessageBox(query,_("Confirm Overwrite"),wxYES_NO | wxCENTRE);
|
||||
if (action == wxNO) return;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
lb = dynamic_cast<wxListBox*>(wnd);
|
||||
if (lb->GetSelection() < 0)
|
||||
{
|
||||
wxMessageBox(_("Please select format before saving a profile"));
|
||||
AudacityMessageBox(_("Please select format before saving a profile"));
|
||||
return;
|
||||
}
|
||||
format = lb->GetStringSelection();
|
||||
|
@ -588,7 +588,7 @@ void FFmpegPresets::SavePreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
lb = dynamic_cast<wxListBox*>(wnd);
|
||||
if (lb->GetSelection() < 0)
|
||||
{
|
||||
wxMessageBox(_("Please select codec before saving a profile"));
|
||||
AudacityMessageBox(_("Please select codec before saving a profile"));
|
||||
return;
|
||||
}
|
||||
codec = lb->GetStringSelection();
|
||||
|
@ -661,7 +661,7 @@ void FFmpegPresets::LoadPreset(ExportFFmpegOptions *parent, wxString &name)
|
|||
FFmpegPreset *preset = FindPreset(name);
|
||||
if (!preset)
|
||||
{
|
||||
wxMessageBox(wxString::Format(_("Preset '%s' does not exist."),name.c_str()));
|
||||
AudacityMessageBox(wxString::Format(_("Preset '%s' does not exist."),name.c_str()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -763,7 +763,7 @@ bool FFmpegPresets::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
|||
if (mPreset)
|
||||
{
|
||||
wxString query = wxString::Format(_("Replace preset '%s'?"), value.c_str());
|
||||
int action = wxMessageBox(query, _("Confirm Overwrite"), wxYES_NO | wxCANCEL | wxCENTRE);
|
||||
int action = AudacityMessageBox(query, _("Confirm Overwrite"), wxYES_NO | wxCANCEL | wxCENTRE);
|
||||
if (action == wxCANCEL)
|
||||
{
|
||||
mAbortImport = true;
|
||||
|
@ -1791,12 +1791,12 @@ void ExportFFmpegOptions::OnDeletePreset(wxCommandEvent& WXUNUSED(event))
|
|||
wxString presetname = preset->GetValue();
|
||||
if (presetname.IsEmpty())
|
||||
{
|
||||
wxMessageBox(_("You can't delete a preset without name"));
|
||||
AudacityMessageBox(_("You can't delete a preset without name"));
|
||||
return;
|
||||
}
|
||||
|
||||
wxString query = wxString::Format(_("Delete preset '%s'?"),presetname.c_str());
|
||||
int action = wxMessageBox(query,_("Confirm Deletion"),wxYES_NO | wxCENTRE);
|
||||
int action = AudacityMessageBox(query,_("Confirm Deletion"),wxYES_NO | wxCENTRE);
|
||||
if (action == wxNO) return;
|
||||
|
||||
mPresets->DeletePreset(presetname);
|
||||
|
@ -1814,7 +1814,7 @@ void ExportFFmpegOptions::OnSavePreset(wxCommandEvent& WXUNUSED(event))
|
|||
wxString name = preset->GetValue();
|
||||
if (name.IsEmpty())
|
||||
{
|
||||
wxMessageBox(_("You can't save a preset without name"));
|
||||
AudacityMessageBox(_("You can't save a preset without name"));
|
||||
return;
|
||||
}
|
||||
mPresets->SavePreset(this,name);
|
||||
|
|
|
@ -28,7 +28,6 @@ and libvorbis examples, Monty <monty@xiph.org>
|
|||
#include <wx/progdlg.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "FLAC++/encoder.h"
|
||||
|
||||
|
@ -42,6 +41,7 @@ and libvorbis examples, Monty <monty@xiph.org>
|
|||
#include "../Tags.h"
|
||||
|
||||
#include "../Track.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ExportFLACOptions Class
|
||||
|
@ -301,7 +301,7 @@ ProgressResult ExportFLAC::Export(AudacityProject *project,
|
|||
#else
|
||||
wxFFile f; // will be closed when it goes out of scope
|
||||
if (!f.Open(fName, wxT("w+b"))) {
|
||||
wxMessageBox(wxString::Format(_("FLAC export couldn't open %s"), fName.c_str()));
|
||||
AudacityMessageBox(wxString::Format(_("FLAC export couldn't open %s"), fName.c_str()));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ ProgressResult ExportFLAC::Export(AudacityProject *project,
|
|||
// libflac can't (under Windows).
|
||||
int status = encoder.init(f.fp());
|
||||
if (status != FLAC__STREAM_ENCODER_INIT_STATUS_OK) {
|
||||
wxMessageBox(wxString::Format(_("FLAC encoder failed to initialize\nStatus: %d"), status));
|
||||
AudacityMessageBox(wxString::Format(_("FLAC encoder failed to initialize\nStatus: %d"), status));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include <wx/defs.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/dynlib.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/window.h>
|
||||
|
@ -56,6 +55,7 @@
|
|||
#include "../ShuttleGui.h"
|
||||
#include "../Tags.h"
|
||||
#include "../Track.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#define LIBTWOLAME_STATIC
|
||||
#include "twolame.h"
|
||||
|
@ -226,7 +226,7 @@ ProgressResult ExportMP2::Export(AudacityProject *project,
|
|||
|
||||
if (twolame_init_params(encodeOptions) != 0)
|
||||
{
|
||||
wxMessageBox(_("Cannot export MP2 with this sample rate and bit rate"),
|
||||
AudacityMessageBox(_("Cannot export MP2 with this sample rate and bit rate"),
|
||||
_("Error"), wxICON_STOP);
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ ProgressResult ExportMP2::Export(AudacityProject *project,
|
|||
|
||||
FileIO outFile(fName, FileIO::Output);
|
||||
if (!outFile.IsOpened()) {
|
||||
wxMessageBox(_("Unable to open target file for writing"));
|
||||
AudacityMessageBox(_("Unable to open target file for writing"));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
#include <wx/mimetype.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -92,6 +91,7 @@
|
|||
#include "../Track.h"
|
||||
#include "../widgets/HelpSystem.h"
|
||||
#include "../widgets/LinkingHtmlWindow.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Export.h"
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ bool MP3Exporter::LoadLibrary(wxWindow *parent, AskUser askuser)
|
|||
if (!ValidLibraryLoaded()) {
|
||||
#if defined(__WXMSW__)
|
||||
if (askuser && !mBladeVersion.IsEmpty()) {
|
||||
wxMessageBox(mBladeVersion);
|
||||
AudacityMessageBox(mBladeVersion);
|
||||
}
|
||||
#endif
|
||||
wxLogMessage(wxT("Failed to locate LAME library"));
|
||||
|
@ -1642,7 +1642,7 @@ bool ExportMP3::CheckFileName(wxFileName & WXUNUSED(filename), int WXUNUSED(form
|
|||
MP3Exporter exporter;
|
||||
|
||||
if (!exporter.LoadLibrary(wxTheApp->GetTopWindow(), MP3Exporter::Maybe)) {
|
||||
wxMessageBox(_("Could not open MP3 encoding library!"));
|
||||
AudacityMessageBox(_("Could not open MP3 encoding library!"));
|
||||
gPrefs->Write(wxT("/MP3/MP3LibPath"), wxString(wxT("")));
|
||||
gPrefs->Flush();
|
||||
|
||||
|
@ -1681,7 +1681,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
|
||||
#ifdef DISABLE_DYNAMIC_LOADING_LAME
|
||||
if (!exporter.InitLibrary(wxT(""))) {
|
||||
wxMessageBox(_("Could not initialize MP3 encoding library!"));
|
||||
AudacityMessageBox(_("Could not initialize MP3 encoding library!"));
|
||||
gPrefs->Write(wxT("/MP3/MP3LibPath"), wxString(wxT("")));
|
||||
gPrefs->Flush();
|
||||
|
||||
|
@ -1689,7 +1689,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
}
|
||||
#else
|
||||
if (!exporter.LoadLibrary(parent, MP3Exporter::Maybe)) {
|
||||
wxMessageBox(_("Could not open MP3 encoding library!"));
|
||||
AudacityMessageBox(_("Could not open MP3 encoding library!"));
|
||||
gPrefs->Write(wxT("/MP3/MP3LibPath"), wxString(wxT("")));
|
||||
gPrefs->Flush();
|
||||
|
||||
|
@ -1697,7 +1697,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
}
|
||||
|
||||
if (!exporter.ValidLibraryLoaded()) {
|
||||
wxMessageBox(_("Not a valid or supported MP3 encoding library!"));
|
||||
AudacityMessageBox(_("Not a valid or supported MP3 encoding library!"));
|
||||
gPrefs->Write(wxT("/MP3/MP3LibPath"), wxString(wxT("")));
|
||||
gPrefs->Flush();
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
|
||||
auto inSamples = exporter.InitializeStream(channels, rate);
|
||||
if (((int)inSamples) < 0) {
|
||||
wxMessageBox(_("Unable to initialize MP3 stream"));
|
||||
AudacityMessageBox(_("Unable to initialize MP3 stream"));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
@ -1792,7 +1792,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
// Open file for writing
|
||||
wxFFile outFile(fName, wxT("w+b"));
|
||||
if (!outFile.IsOpened()) {
|
||||
wxMessageBox(_("Unable to open target file for writing"));
|
||||
AudacityMessageBox(_("Unable to open target file for writing"));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
@ -1875,7 +1875,7 @@ ProgressResult ExportMP3::Export(AudacityProject *project,
|
|||
if (bytes < 0) {
|
||||
wxString msg;
|
||||
msg.Printf(_("Error %ld returned from MP3 encoder"), bytes);
|
||||
wxMessageBox(msg);
|
||||
AudacityMessageBox(msg);
|
||||
updateResult = ProgressResult::Cancelled;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include <wx/filefn.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
|
@ -50,6 +49,7 @@
|
|||
#include "../Tags.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "../widgets/HelpSystem.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
|
||||
/* define our dynamic array of export settings */
|
||||
|
@ -180,7 +180,7 @@ int ExportMultiple::ShowModal()
|
|||
// Cannot export if all audio tracks are muted.
|
||||
if (mNumWaveTracks == 0)
|
||||
{
|
||||
::wxMessageBox(_("All audio is muted."),
|
||||
::AudacityMessageBox(_("All audio is muted."),
|
||||
_("Cannot Export Multiple"),
|
||||
wxOK | wxCENTRE, this);
|
||||
return wxID_CANCEL;
|
||||
|
@ -188,7 +188,7 @@ int ExportMultiple::ShowModal()
|
|||
|
||||
if ((mNumWaveTracks == 1) && (mNumLabels < 1))
|
||||
{
|
||||
::wxMessageBox(_(
|
||||
::AudacityMessageBox(_(
|
||||
"You have only one unmuted Audio Track and no applicable \
|
||||
\nlabels, so you cannot export to separate audio files."),
|
||||
_("Cannot Export Multiple"),
|
||||
|
@ -472,7 +472,7 @@ void ExportMultiple::OnCreate(wxCommandEvent& WXUNUSED(event))
|
|||
return;
|
||||
}
|
||||
|
||||
::wxMessageBox(wxString::Format(_("\"%s\" successfully created."),
|
||||
::AudacityMessageBox(wxString::Format(_("\"%s\" successfully created."),
|
||||
fn.GetPath().c_str()),
|
||||
_("Export Multiple"),
|
||||
wxOK | wxCENTRE, this);
|
||||
|
@ -626,7 +626,7 @@ bool ExportMultiple::DirOk()
|
|||
prompt.Printf(_("\"%s\" doesn't exist.\n\nWould you like to create it?"),
|
||||
fn.GetFullPath().c_str());
|
||||
|
||||
int action = wxMessageBox(prompt,
|
||||
int action = AudacityMessageBox(prompt,
|
||||
wxT("Warning"),
|
||||
wxYES_NO | wxICON_EXCLAMATION);
|
||||
if (action != wxYES) {
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "Export.h"
|
||||
|
||||
#include <wx/log.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/slider.h>
|
||||
|
||||
#include <vorbis/vorbisenc.h>
|
||||
|
@ -37,6 +36,7 @@
|
|||
#include "../Internat.h"
|
||||
#include "../Tags.h"
|
||||
#include "../Track.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// ExportOGGOptions
|
||||
|
@ -179,7 +179,7 @@ ProgressResult ExportOGG::Export(AudacityProject *project,
|
|||
FileIO outFile(fName, FileIO::Output);
|
||||
|
||||
if (!outFile.IsOpened()) {
|
||||
wxMessageBox(_("Unable to open target file for writing"));
|
||||
AudacityMessageBox(_("Unable to open target file for writing"));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <wx/filename.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
@ -36,6 +35,7 @@
|
|||
#include "../Tags.h"
|
||||
#include "../Track.h"
|
||||
#include "../ondemand/ODManager.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "Export.h"
|
||||
|
||||
|
@ -440,7 +440,7 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
|
|||
if (!sf_format_check(&info))
|
||||
info.format = (info.format & SF_FORMAT_TYPEMASK);
|
||||
if (!sf_format_check(&info)) {
|
||||
wxMessageBox(_("Cannot export audio in this format."));
|
||||
AudacityMessageBox(_("Cannot export audio in this format."));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
||||
|
@ -454,7 +454,7 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
|
|||
}
|
||||
|
||||
if (!sf) {
|
||||
wxMessageBox(wxString::Format(_("Cannot export audio to %s"),
|
||||
AudacityMessageBox(wxString::Format(_("Cannot export audio to %s"),
|
||||
fName.c_str()));
|
||||
return ProgressResult::Cancelled;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
|
|||
if (samplesWritten != numSamples) {
|
||||
char buffer2[1000];
|
||||
sf_error_str(sf.get(), buffer2, 1000);
|
||||
wxMessageBox(wxString::Format(
|
||||
AudacityMessageBox(wxString::Format(
|
||||
/* i18n-hint: %s will be the error message from libsndfile, which
|
||||
* is usually something unhelpful (and untranslated) like "system
|
||||
* error" */
|
||||
|
|
|
@ -42,7 +42,6 @@ and ImportLOF.cpp.
|
|||
#include "ImportPlugin.h"
|
||||
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/log.h>
|
||||
|
|
|
@ -306,7 +306,7 @@ std::unique_ptr<ImportFileHandle> FFmpegImportPlugin::Open(const wxString &filen
|
|||
//officially supported by this plugin.
|
||||
//If we don't have FFmpeg configured - tell the user about it.
|
||||
//Since this will be happening often, use disableable "FFmpeg not found" dialog
|
||||
//insdead of usual wxMessageBox()
|
||||
//insdead of usual AudacityMessageBox()
|
||||
bool newsession = false;
|
||||
gPrefs->Read(wxT("/NewImportingSession"), &newsession);
|
||||
if (!FFmpegLibsInst()->ValidLibsLoaded())
|
||||
|
|
|
@ -955,7 +955,7 @@ GStreamerImportFileHandle::Init()
|
|||
// Add the decoder to the pipeline
|
||||
if (!gst_bin_add(GST_BIN(mPipeline.get()), mDec))
|
||||
{
|
||||
wxMessageBox(_("Unable to add decoder to pipeline"),
|
||||
AudacityMessageBox(_("Unable to add decoder to pipeline"),
|
||||
_("GStreamer Importer"));
|
||||
|
||||
// Cleanup expected to occur in destructor
|
||||
|
@ -966,7 +966,7 @@ GStreamerImportFileHandle::Init()
|
|||
GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PAUSED);
|
||||
if (state == GST_STATE_CHANGE_FAILURE)
|
||||
{
|
||||
wxMessageBox(_("Unable to set stream state to paused."),
|
||||
AudacityMessageBox(_("Unable to set stream state to paused."),
|
||||
_("GStreamer Importer"));
|
||||
return false;
|
||||
}
|
||||
|
@ -1095,7 +1095,7 @@ GStreamerImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
// Can't do much if we don't have any streams to process
|
||||
if (!haveStreams)
|
||||
{
|
||||
wxMessageBox(_("File doesn't contain any audio streams."),
|
||||
AudacityMessageBox(_("File doesn't contain any audio streams."),
|
||||
_("GStreamer Importer"));
|
||||
return ProgressResult::Failed;
|
||||
}
|
||||
|
@ -1104,7 +1104,7 @@ GStreamerImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
GstStateChangeReturn state = gst_element_set_state(mPipeline.get(), GST_STATE_PLAYING);
|
||||
if (state == GST_STATE_CHANGE_FAILURE)
|
||||
{
|
||||
wxMessageBox(_("Unable to import file, state change failed."),
|
||||
AudacityMessageBox(_("Unable to import file, state change failed."),
|
||||
_("GStreamer Importer"));
|
||||
return ProgressResult::Failed;
|
||||
}
|
||||
|
@ -1235,7 +1235,7 @@ GStreamerImportFileHandle::ProcessBusMessage(bool & success)
|
|||
debug ? wxT("\n") : wxT(""),
|
||||
debug ? wxString::FromUTF8(debug.get()).c_str() : wxT(""));
|
||||
#if defined(_DEBUG)
|
||||
wxMessageBox(wxString::Format(_("GStreamer Error: %s"), m));
|
||||
AudacityMessageBox(wxString::Format(_("GStreamer Error: %s"), m));
|
||||
#else
|
||||
wxLogMessage(wxT("GStreamer Error: %s"), m.c_str());
|
||||
#endif
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
#include <wx/utils.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/textfile.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
#ifdef USE_MIDI
|
||||
|
@ -91,6 +90,7 @@
|
|||
#include "../FileFormats.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../Internat.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#define BINARY_FILE_CHECK_BUFFER_SIZE 1024
|
||||
|
||||
|
@ -332,7 +332,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
else
|
||||
{
|
||||
/* i18n-hint: You do not need to translate "LOF" */
|
||||
wxMessageBox(_("Invalid window offset in LOF file."),
|
||||
AudacityMessageBox(_("Invalid window offset in LOF file."),
|
||||
/* i18n-hint: You do not need to translate "LOF" */
|
||||
_("LOF Error"), wxOK | wxCENTRE);
|
||||
}
|
||||
|
@ -353,7 +353,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
else
|
||||
{
|
||||
/* i18n-hint: You do not need to translate "LOF" */
|
||||
wxMessageBox(_("Invalid duration in LOF file."),
|
||||
AudacityMessageBox(_("Invalid duration in LOF file."),
|
||||
/* i18n-hint: You do not need to translate "LOF" */
|
||||
_("LOF Error"), wxOK | wxCENTRE);
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
if (targetfile.AfterLast(wxT('.')).IsSameAs(wxT("mid"), false) ||
|
||||
targetfile.AfterLast(wxT('.')).IsSameAs(wxT("midi"), false))
|
||||
{
|
||||
wxMessageBox(_("MIDI tracks cannot be offset individually, only audio files can be."),
|
||||
AudacityMessageBox(_("MIDI tracks cannot be offset individually, only audio files can be."),
|
||||
_("LOF Error"), wxOK | wxCENTRE);
|
||||
}
|
||||
else
|
||||
|
@ -473,7 +473,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
|||
else
|
||||
{
|
||||
/* i18n-hint: You do not need to translate "LOF" */
|
||||
wxMessageBox(_("Invalid track offset in LOF file."),
|
||||
AudacityMessageBox(_("Invalid track offset in LOF file."),
|
||||
_("LOF Error"), wxOK | wxCENTRE);
|
||||
}
|
||||
} // End if statement for "offset" parameters
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "ImportMIDI.h"
|
||||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/intl.h>
|
||||
|
||||
|
@ -24,11 +23,14 @@
|
|||
|
||||
#include "../Internat.h"
|
||||
#include "../NoteTrack.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
bool ImportMIDI(const wxString &fName, NoteTrack * dest)
|
||||
{
|
||||
if (fName.Length() <= 4){
|
||||
wxMessageBox( _("Could not open file ") + fName + _(": Filename too short."));
|
||||
AudacityMessageBox(
|
||||
_("Could not open file ") + fName + _(": Filename too short.")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -36,13 +38,17 @@ bool ImportMIDI(const wxString &fName, NoteTrack * dest)
|
|||
if (fName.Right(4).CmpNoCase(wxT(".mid")) == 0 || fName.Right(5).CmpNoCase(wxT(".midi")) == 0)
|
||||
is_midi = true;
|
||||
else if(fName.Right(4).CmpNoCase(wxT(".gro")) != 0) {
|
||||
wxMessageBox( _("Could not open file ") + fName + _(": Incorrect filetype."));
|
||||
AudacityMessageBox(
|
||||
_("Could not open file ") + fName + _(": Incorrect filetype.")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
wxFFile mf(fName, wxT("rb"));
|
||||
if (!mf.IsOpened()) {
|
||||
wxMessageBox( _("Could not open file ") + fName + wxT("."));
|
||||
AudacityMessageBox(
|
||||
_("Could not open file ") + fName + wxT(".")
|
||||
);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -51,7 +57,9 @@ bool ImportMIDI(const wxString &fName, NoteTrack * dest)
|
|||
|
||||
//Should we also check if(seq->tracks() == 0) ?
|
||||
if(new_seq->get_read_error() == alg_error_open){
|
||||
wxMessageBox( _("Could not open file ") + fName + wxT("."));
|
||||
AudacityMessageBox(
|
||||
_("Could not open file ") + fName + wxT(".")
|
||||
);
|
||||
mf.Close();
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,6 @@ void GetMP3ImportPlugin(ImportPluginList &importPluginList,
|
|||
#include <wx/textctrl.h>
|
||||
#include <wx/file.h>
|
||||
#include <wx/thread.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/timer.h>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "../Audacity.h"
|
||||
#include "ImportQT.h"
|
||||
#include "ImportPlugin.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#define DESC _("QuickTime files")
|
||||
|
||||
|
@ -43,8 +44,6 @@ void GetQTImportPlugin(ImportPluginList &importPluginList,
|
|||
|
||||
#else /* USE_QUICKTIME */
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
// There's a name collision between our Track and QuickTime's...workaround it
|
||||
#define Track XTrack
|
||||
|
||||
|
@ -259,7 +258,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
{
|
||||
err = MovieAudioExtractionBegin(mMovie, 0, &maer);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to start QuickTime extraction"));
|
||||
AudacityMessageBox(_("Unable to start QuickTime extraction"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -269,7 +268,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
sizeof(quality),
|
||||
&quality);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to set QuickTime render quality"));
|
||||
AudacityMessageBox(_("Unable to set QuickTime render quality"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -279,7 +278,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
sizeof(discrete),
|
||||
&discrete);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to set QuickTime discrete channels property"));
|
||||
AudacityMessageBox(_("Unable to set QuickTime discrete channels property"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -290,7 +289,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
&maxSampleSize,
|
||||
NULL);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to get QuickTime sample size property"));
|
||||
AudacityMessageBox(_("Unable to get QuickTime sample size property"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -301,7 +300,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
&desc,
|
||||
NULL);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to retrieve stream description"));
|
||||
AudacityMessageBox(_("Unable to retrieve stream description"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -370,7 +369,7 @@ ProgressResult QTImportFileHandle::Import(TrackFactory *trackFactory,
|
|||
abl.get(),
|
||||
&flags);
|
||||
if (err != noErr) {
|
||||
wxMessageBox(_("Unable to get fill buffer"));
|
||||
AudacityMessageBox(_("Unable to get fill buffer"));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ and sample size to help you importing data of an unknown format.
|
|||
#include <wx/button.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
#include <wx/event.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "../AudacityApp.h"
|
||||
#include "../Internat.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
#include "DirectoriesPrefs.h"
|
||||
|
||||
enum {
|
||||
|
@ -205,7 +205,7 @@ bool DirectoriesPrefs::Validate()
|
|||
|
||||
wxString path{tempDir.GetPath()};
|
||||
if( !AudacityApp::IsTempDirectoryNameOK( path ) ) {
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(_("Directory %s is not suitable (at risk of being cleaned out)"),
|
||||
path.c_str()),
|
||||
_("Error"),
|
||||
|
@ -213,7 +213,7 @@ bool DirectoriesPrefs::Validate()
|
|||
return false;
|
||||
}
|
||||
if (!tempDir.DirExists()) {
|
||||
int ans = wxMessageBox(
|
||||
int ans = AudacityMessageBox(
|
||||
wxString::Format(_("Directory %s does not exist. Create it?"),
|
||||
path.c_str()),
|
||||
_("New Temporary Directory"),
|
||||
|
@ -234,7 +234,7 @@ bool DirectoriesPrefs::Validate()
|
|||
tempDir.AppendDir(wxT("canicreate"));
|
||||
path = tempDir.GetPath();
|
||||
if (!tempDir.Mkdir(0755)) {
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
wxString::Format(_("Directory %s is not writable"),
|
||||
path.c_str()),
|
||||
_("Error"),
|
||||
|
@ -248,7 +248,7 @@ bool DirectoriesPrefs::Validate()
|
|||
wxFileName oldDir;
|
||||
oldDir.SetPath(gPrefs->Read(wxT("/Directories/TempDir")));
|
||||
if (tempDir != oldDir) {
|
||||
wxMessageBox(
|
||||
AudacityMessageBox(
|
||||
_("Changes to temporary directory will not take effect until Audacity is restarted"),
|
||||
_("Temp Directory Update"),
|
||||
wxOK | wxCENTRE | wxICON_INFORMATION);
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/dnd.h>
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "../Prefs.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#define EXTIMPORT_MIME_SUPPORT 0
|
||||
|
||||
|
@ -506,7 +506,7 @@ void ExtImportPrefs::OnRuleTableEdit (wxGridEvent& event)
|
|||
{
|
||||
if (!askedAboutSpaces)
|
||||
{
|
||||
fixSpaces = wxMessageBox(_(
|
||||
fixSpaces = AudacityMessageBox(_(
|
||||
"There are space characters (spaces, newlines, tabs or linefeeds) in one of \
|
||||
the items. They are likely to break the pattern matching. Unless you know \
|
||||
what you are doing, it is recommended to trim spaces. Do you want \
|
||||
|
@ -597,7 +597,7 @@ void ExtImportPrefs::OnDelRule(wxCommandEvent& WXUNUSED(event))
|
|||
return;
|
||||
auto &items = Importer::Get().GetImportItems();
|
||||
|
||||
int msgres = wxMessageBox (_("Do you really want to delete selected rule?"),
|
||||
int msgres = AudacityMessageBox (_("Do you really want to delete selected rule?"),
|
||||
_("Rule deletion confirmation"), wxYES_NO, RuleTable);
|
||||
if (msgres == wxNO || msgres != wxYES)
|
||||
return;
|
||||
|
|
|
@ -28,7 +28,6 @@ KeyConfigPrefs and MousePrefs use.
|
|||
#include <wx/intl.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
|
@ -42,6 +41,7 @@ KeyConfigPrefs and MousePrefs use.
|
|||
#include "../FileNames.h"
|
||||
|
||||
#include "../widgets/KeyView.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
//
|
||||
// KeyConfigPrefs
|
||||
|
@ -348,7 +348,7 @@ void KeyConfigPrefs::OnImport(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
XMLFileReader reader;
|
||||
if (!reader.Parse(mManager, file)) {
|
||||
wxMessageBox(reader.GetErrorStr(),
|
||||
AudacityMessageBox(reader.GetErrorStr(),
|
||||
_("Error Importing Keyboard Shortcuts"),
|
||||
wxOK | wxCENTRE, this);
|
||||
}
|
||||
|
@ -585,7 +585,7 @@ void KeyConfigPrefs::SetKeyForSelected(const wxString & key)
|
|||
|
||||
if (!mView->CanSetKey(mCommandSelected))
|
||||
{
|
||||
wxMessageBox(_("You may not assign a key to this entry"),
|
||||
AudacityMessageBox(_("You may not assign a key to this entry"),
|
||||
_("Error"), wxICON_ERROR | wxCENTRE, this);
|
||||
return;
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ void KeyConfigPrefs::SetKeyForSelected(const wxString & key)
|
|||
void KeyConfigPrefs::OnSet(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
if (mCommandSelected == wxNOT_FOUND) {
|
||||
wxMessageBox(_("You must select a binding before assigning a shortcut"),
|
||||
AudacityMessageBox(_("You must select a binding before assigning a shortcut"),
|
||||
_("Error"), wxICON_WARNING | wxCENTRE, this);
|
||||
return;
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ void KeyConfigPrefs::OnSet(wxCommandEvent & WXUNUSED(event))
|
|||
mManager->GetPrefixedLabelFromName(oldname);
|
||||
wxString newlabel = mManager->GetCategoryFromName(newname) + wxT(" - ") +
|
||||
mManager->GetPrefixedLabelFromName(newname);
|
||||
if (wxMessageBox(
|
||||
if (AudacityMessageBox(
|
||||
wxString::Format(
|
||||
_("The keyboard shortcut '%s' is already assigned to:\n\n\t'%s'\n\nClick OK to assign the shortcut to\n\n\t'%s'\n\ninstead. Otherwise, click Cancel."),
|
||||
key.c_str(),
|
||||
|
|
|
@ -26,6 +26,7 @@ MP3 and FFmpeg encoding libraries.
|
|||
#include "../export/ExportMP3.h"
|
||||
#include "../widgets/LinkingHtmlWindow.h"
|
||||
#include "../widgets/HelpSystem.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "LibraryPrefs.h"
|
||||
|
||||
|
@ -207,7 +208,7 @@ void LibraryPrefs::OnFFmpegFindButton(wxCommandEvent & WXUNUSED(event))
|
|||
|
||||
// Libs are fine, don't show "locate" dialog unless user really wants it
|
||||
if (!locate) {
|
||||
int response = wxMessageBox(_("Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"),
|
||||
int response = AudacityMessageBox(_("Audacity has automatically detected valid FFmpeg libraries.\nDo you still want to locate them manually?"),
|
||||
wxT("Success"),
|
||||
wxCENTRE | wxYES_NO | wxNO_DEFAULT |wxICON_QUESTION);
|
||||
if (response == wxYES) {
|
||||
|
|
|
@ -39,6 +39,7 @@ other settings.
|
|||
#include "../Prefs.h"
|
||||
#include "../Project.h"
|
||||
#include "../ShuttleGui.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
#include "MidiIOPrefs.h"
|
||||
|
||||
|
@ -281,7 +282,7 @@ bool MidiIOPrefs::Validate()
|
|||
{
|
||||
long latency;
|
||||
if (!mLatency->GetValue().ToLong(&latency)) {
|
||||
wxMessageBox(_("The MIDI Synthesizer Latency must be an integer"));
|
||||
AudacityMessageBox(_("The MIDI Synthesizer Latency must be an integer"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#include <wx/gdicmn.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/sizer.h>
|
||||
|
||||
#include <wx/listbook.h>
|
||||
|
|
|
@ -19,7 +19,6 @@ Paul Licameli
|
|||
#include "../TranslatableStringArray.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "../FFT.h"
|
||||
#include "../Prefs.h"
|
||||
|
@ -28,6 +27,7 @@ Paul Licameli
|
|||
#include <cmath>
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
SpectrogramSettings::Globals::Globals()
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||
{
|
||||
if (!quiet &&
|
||||
maxFreq < 100) {
|
||||
wxMessageBox(_("Maximum frequency must be 100 Hz or above"));
|
||||
AudacityMessageBox(_("Maximum frequency must be 100 Hz or above"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -194,7 +194,7 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||
|
||||
if (!quiet &&
|
||||
minFreq < 0) {
|
||||
wxMessageBox(_("Minimum frequency must be at least 0 Hz"));
|
||||
AudacityMessageBox(_("Minimum frequency must be at least 0 Hz"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -202,7 +202,7 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||
|
||||
if (!quiet &&
|
||||
maxFreq <= minFreq) {
|
||||
wxMessageBox(_("Minimum frequency must be less than maximum frequency"));
|
||||
AudacityMessageBox(_("Minimum frequency must be less than maximum frequency"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -210,7 +210,7 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||
|
||||
if (!quiet &&
|
||||
range <= 0) {
|
||||
wxMessageBox(_("The range must be at least 1 dB"));
|
||||
AudacityMessageBox(_("The range must be at least 1 dB"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
@ -218,12 +218,12 @@ bool SpectrogramSettings::Validate(bool quiet)
|
|||
|
||||
if (!quiet &&
|
||||
frequencyGain < 0) {
|
||||
wxMessageBox(_("The frequency gain cannot be negative"));
|
||||
AudacityMessageBox(_("The frequency gain cannot be negative"));
|
||||
return false;
|
||||
}
|
||||
else if (!quiet &&
|
||||
frequencyGain > 60) {
|
||||
wxMessageBox(_("The frequency gain must be no more than 60 dB/dec"));
|
||||
AudacityMessageBox(_("The frequency gain must be no more than 60 dB/dec"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <wx/defs.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/checkbox.h>
|
||||
|
||||
#include "../FFT.h"
|
||||
|
@ -32,6 +31,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "../Experimental.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
SpectrumPrefs::SpectrumPrefs(wxWindow * parent, WaveTrack *wt)
|
||||
: PrefsPanel(parent, wt ? _("Spectrogram Settings") : _("Spectrograms"))
|
||||
|
@ -314,48 +314,48 @@ bool SpectrumPrefs::Validate()
|
|||
|
||||
long maxFreq;
|
||||
if (!mMaxFreq->GetValue().ToLong(&maxFreq)) {
|
||||
wxMessageBox(_("The maximum frequency must be an integer"));
|
||||
AudacityMessageBox(_("The maximum frequency must be an integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
long minFreq;
|
||||
if (!mMinFreq->GetValue().ToLong(&minFreq)) {
|
||||
wxMessageBox(_("The minimum frequency must be an integer"));
|
||||
AudacityMessageBox(_("The minimum frequency must be an integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
long gain;
|
||||
if (!mGain->GetValue().ToLong(&gain)) {
|
||||
wxMessageBox(_("The gain must be an integer"));
|
||||
AudacityMessageBox(_("The gain must be an integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
long range;
|
||||
if (!mRange->GetValue().ToLong(&range)) {
|
||||
wxMessageBox(_("The range must be a positive integer"));
|
||||
AudacityMessageBox(_("The range must be a positive integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
long frequencygain;
|
||||
if (!mFrequencyGain->GetValue().ToLong(&frequencygain)) {
|
||||
wxMessageBox(_("The frequency gain must be an integer"));
|
||||
AudacityMessageBox(_("The frequency gain must be an integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_FIND_NOTES
|
||||
long findNotesMinA;
|
||||
if (!mFindNotesMinA->GetValue().ToLong(&findNotesMinA)) {
|
||||
wxMessageBox(_("The minimum amplitude (dB) must be an integer"));
|
||||
AudacityMessageBox(_("The minimum amplitude (dB) must be an integer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
long findNotesN;
|
||||
if (!mFindNotesN->GetValue().ToLong(&findNotesN)) {
|
||||
wxMessageBox(_("The maximum number of notes must be an integer"));
|
||||
AudacityMessageBox(_("The maximum number of notes must be an integer"));
|
||||
return false;
|
||||
}
|
||||
if (findNotesN < 1 || findNotesN > 128) {
|
||||
wxMessageBox(_("The maximum number of notes must be in the range 1..128"));
|
||||
AudacityMessageBox(_("The maximum number of notes must be in the range 1..128"));
|
||||
return false;
|
||||
}
|
||||
#endif //EXPERIMENTAL_FIND_NOTES
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "../Theme.h"
|
||||
#include "../widgets/Grabber.h"
|
||||
#include "../DeviceManager.h"
|
||||
#include "../widgets/ErrorDialog.h"
|
||||
|
||||
IMPLEMENT_CLASS(DeviceToolBar, ToolBar);
|
||||
|
||||
|
@ -777,7 +778,7 @@ void DeviceToolBar::ShowChannelsDialog()
|
|||
void DeviceToolBar::ShowComboDialog(wxChoice *combo, const wxString &title)
|
||||
{
|
||||
if (!combo || combo->GetCount() == 0) {
|
||||
wxMessageBox(_("Device information is not available."));
|
||||
AudacityMessageBox(_("Device information is not available."));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../ViewInfo.h"
|
||||
#include "../../../../WaveTrack.h"
|
||||
#include "../../../../../images/Cursors.h"
|
||||
#include "../../../../widgets/ErrorDialog.h"
|
||||
|
||||
|
||||
static const int SMOOTHING_KERNEL_RADIUS = 3;
|
||||
|
@ -183,7 +184,7 @@ namespace {
|
|||
const int display = wt->GetDisplay();
|
||||
if (WaveTrack::Waveform != display)
|
||||
{
|
||||
wxMessageBox(_(
|
||||
AudacityMessageBox(_(
|
||||
"To use Draw, choose 'Waveform' or 'Waveform (dB)' in the Track Dropdown Menu."),
|
||||
_("Draw Tool"));
|
||||
return false;
|
||||
|
@ -193,7 +194,7 @@ namespace {
|
|||
const double time = adjustTime(wt, viewInfo.PositionToTime(event.m_x, rect.x));
|
||||
if (!SampleResolutionTest(viewInfo, wt, time, width))
|
||||
{
|
||||
wxMessageBox(_(
|
||||
AudacityMessageBox(_(
|
||||
"To use Draw, zoom in further until you can see the individual samples."),
|
||||
_("Draw Tool"));
|
||||
return false;
|
||||
|
|
|
@ -29,6 +29,7 @@ Paul Licameli split from TrackPanel.cpp
|
|||
#include "../../../../prefs/SpectrumPrefs.h"
|
||||
#include "../../../../prefs/TracksBehaviorsPrefs.h"
|
||||
#include "../../../../prefs/WaveformPrefs.h"
|
||||
#include "../../../../widgets/ErrorDialog.h"
|
||||
|
||||
#include <wx/combobox.h>
|
||||
|
||||
|
@ -533,7 +534,7 @@ void RateMenuTable::OnRateOther(wxCommandEvent &)
|
|||
break;
|
||||
}
|
||||
|
||||
wxMessageBox(_("The entered value is invalid"), _("Error"),
|
||||
AudacityMessageBox(_("The entered value is invalid"), _("Error"),
|
||||
wxICON_ERROR, mpData->pParent);
|
||||
}
|
||||
|
||||
|
@ -781,7 +782,7 @@ void WaveTrackMenuTable::OnSpectrogramSettings(wxCommandEvent &)
|
|||
};
|
||||
|
||||
if (gAudioIO->IsBusy()){
|
||||
wxMessageBox(_("To change Spectrogram Settings, stop any\n"
|
||||
AudacityMessageBox(_("To change Spectrogram Settings, stop any\n"
|
||||
"playing or recording first."),
|
||||
_("Stop the Audio First"), wxOK | wxICON_EXCLAMATION | wxCENTRE);
|
||||
return;
|
||||
|
|
|
@ -45,7 +45,6 @@ or ASlider.
|
|||
#include <wx/dcmemory.h>
|
||||
#include <wx/graphics.h>
|
||||
#include <wx/image.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/debug.h>
|
||||
|
|
|
@ -232,3 +232,8 @@ void ShowAliasMissingDialog(AudacityProject *parent,
|
|||
// PRL: answer is that the parent window guarantees destruction of the dialog
|
||||
// but in practice Destroy() in OnOK does that
|
||||
}
|
||||
|
||||
extern wxString AudacityMessageBoxCaptionStr()
|
||||
{
|
||||
return _("Message");
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
|
||||
#include "../Audacity.h"
|
||||
#include <wx/defs.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/window.h>
|
||||
#include "LinkingHtmlWindow.h"
|
||||
#include "wxPanelWrapper.h"
|
||||
|
||||
class AudacityProject;
|
||||
|
@ -84,4 +86,16 @@ void ShowAliasMissingDialog(AudacityProject *parent,
|
|||
const wxString &helpPage,
|
||||
const bool Close = true);
|
||||
|
||||
extern wxString AudacityMessageBoxCaptionStr();
|
||||
|
||||
// Do not use wxMessageBox!! Its default window title does not translate!
|
||||
inline int AudacityMessageBox(const wxString& message,
|
||||
const wxString& caption = AudacityMessageBoxCaptionStr(),
|
||||
long style = wxOK | wxCENTRE,
|
||||
wxWindow *parent = NULL,
|
||||
int x = wxDefaultCoord, int y = wxDefaultCoord)
|
||||
{
|
||||
return ::wxMessageBox(message, caption, style, parent, x, y);
|
||||
}
|
||||
|
||||
#endif // __AUDACITY_ERRORDIALOG__
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#include <wx/numdlg.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <wx/evtloop.h>
|
||||
#include <wx/frame.h>
|
||||
#include <wx/intl.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/sound.h>
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <wx/gauge.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#include "wxPanelWrapper.h"
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "../Audacity.h"
|
||||
#include "valnum.h"
|
||||
#include "ErrorDialog.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
|
@ -32,7 +33,6 @@
|
|||
#if wxUSE_VALIDATORS && wxUSE_TEXTCTRL
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/textctrl.h>
|
||||
#endif
|
||||
|
||||
|
@ -91,7 +91,7 @@ bool NumValidatorBase::Validate(wxWindow *parent)
|
|||
|
||||
if ( !res )
|
||||
{
|
||||
wxMessageBox(errmsg, _("Validation error"),
|
||||
AudacityMessageBox(errmsg, _("Validation error"),
|
||||
wxOK | wxICON_ERROR, parent);
|
||||
wxTextEntry *te = GetTextEntry();
|
||||
if ( te )
|
||||
|
|
Loading…
Reference in New Issue