16#include <wx/evtloop.h>
62 auto result = std::make_shared< ProjectFileManager >( parent );
80 auto &project = tempProject.
Project();
81 auto &projectFileManager =
Get(project);
83 projectFileManager.ReadProjectFile(filename,
true);
85 if (projectFileManager.mLastSavedTracks) {
86 for (
auto wt : projectFileManager.mLastSavedTracks->Any<
WaveTrack>())
88 projectFileManager.mLastSavedTracks.reset();
105 "FAQ:Errors_on_opening_or_recovering_an_Audacity_project";
107using Pair = std::pair< const char *, const char * >;
110 "not well-formed (invalid token)",
111 "Error:_not_well-formed_(invalid_token)_at_line_x"
114 "reference to invalid character number",
115 "Error_Opening_Project:_Reference_to_invalid_character_number_at_line_x"
128 if ( !libraryError.
empty() ) {
131 auto msgid = libraryError.
MSGID().
GET();
133 [&](
const Pair &pair ) {
134 return msgid.Contains( pair.first ); }
137 auto url = found->second;
151 const FilePath &fileName,
bool discardAutosave )
154 auto &project = mProject;
161 bool bParseSuccess = projectFileIO.LoadProject(fileName, discardAutosave);
169 projectFileIO.AutoSaveDelete();
170 else if (projectFileIO.IsRecovered()) {
171 bool resaved =
false;
173 if (!projectFileIO.IsTemporary())
177 resaved = projectFileIO.SaveProject(fileName,
nullptr);
182 ?
XO(
"This project was not saved properly the last time Audacity ran.\n\n"
183 "It has been recovered to the last snapshot.")
184 :
XO(
"This project was not saved properly the last time Audacity ran.\n\n"
185 "It has been recovered to the last snapshot, but you must save it\n"
186 "to preserve its contents."),
187 XO(
"Project Recovered"),
200 for (
auto t : tracks.Any())
202 if (t->GetErrorOpening())
205 wxT(
"Track %s had error reading clip values from project file."),
210 err = ( !t->LinkConsistencyFix() ) || err;
212 mLastSavedTracks->Add(t->Duplicate());
220 projectFileIO.GetLastError(),
230 if (projectFileIO.IsTemporary())
235 return DoSave(projectFileIO.GetFileName(),
false);
255 ProjectDisabler(wxWindow *w)
258 mWindow->GetEventHandler()->SetEvtHandlerEnabled(
false);
262 mWindow->GetEventHandler()->SetEvtHandlerEnabled(
true);
294 "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?"),
295 XO(
"Warning - Empty Project"),
296 wxYES_NO | wxICON_QUESTION,
305 wxULongLong fileSize = wxFileName::GetSize(projectFileIO.GetFileName());
307 wxDiskspaceSize_t freeSpace;
310 if (freeSpace.GetValue() <= fileSize.GetValue())
313 XO(
"Insufficient Disk Space"),
314 XO(
"The project size exceeds the available free space on the target disk.\n\n"
315 "Please select a different disk with more free space."),
316 "Error:_Disk_full_or_not_writable"
326 std::optional<ProjectFileIO::BackupProject> pBackupProject;
327 if (fromSaveAs && wxFileExists(fileName))
329 pBackupProject.emplace(projectFileIO, fileName);
330 if (!pBackupProject->IsOk())
336 if (wxFileName::GetSize(projectFileIO.GetFileName()) > UINT32_MAX)
339 XO(
"Error Saving Project"),
340 XO(
"The project exceeds the maximum size of 4GB when writing to a FAT32 formatted filesystem."),
341 "Error:_Unsuitable_drive"
352 if (!projectFileIO.HasConnection()) {
355 XO(
"Error Saving Project"),
357 "Error:_Disk_full_or_not_writable",
363 proj.SetProjectName(wxFileName(fileName).GetName());
364 projectFileIO.SetProjectTitle();
376 for (
auto t : tracks.Any())
384 pBackupProject->Discard();
396 auto oldFileName = projectFileIO.GetFileName();
398 bool bOwnsNewName = !projectFileIO.IsTemporary() && (oldFileName == newFileName);
402 if( !bOwnsNewName && wxFileExists(newFileName)) {
405 XO(
"The project was not saved because the file name provided would overwrite another project.\nPlease try again and select an original name."),
406 XO(
"Error Saving Project"),
412 auto success =
DoSave(newFileName, !bOwnsNewName);
413 if (success && addToHistory) {
429 if (projectFileIO.IsTemporary()) {
430 filename.SetPath(defaultSavePath);
431 filename.SetName(project.GetProjectName());
434 filename = projectFileIO.GetFileName();
439 filename.SetPath(defaultSavePath);
445'Save Project' is for an Audacity project, not an audio file.\n\
446For an audio file that will open in other apps, use 'Export'.\n");
452 bool bPrompt = (project.mBatchMode == 0) || (projectFileIO.GetFileName().empty());
460 fName =
SelectFile(FileNames::Operation::Save,
463 filename.GetFullName(),
466 wxFD_SAVE | wxRESIZE_BORDER,
475 filename.SetExt(
wxT(
"aup3"));
477 if ((!bPrompt || !allowOverwrite) && filename.FileExists()) {
481 XO(
"The project was not saved because the file name provided would overwrite another project.\nPlease try again and select an original name."),
482 XO(
"Error Saving Project"),
488 fName = filename.GetFullPath();
490 bOwnsNewName = !projectFileIO.IsTemporary() && ( projectFileIO.GetFileName() == fName );
494 if (!bOwnsNewName && filename.FileExists()) {
501 int mayOverwrite = ( projectFileIO.GetFileName() == fName ) ? 2 : 1;
504 if (openProjectName.SameAs(fName)) {
506 if (mayOverwrite == 0)
511 if (mayOverwrite > 0) {
515 Do you want to overwrite the project:\n\"%s\"?\n\n\
516 If you select \"Yes\" the project\n\"%s\"\n\
517 will be irreversibly overwritten.").Format( fName, fName );
523 XO(
"Overwrite Project Warning"),
524 wxYES_NO | wxNO_DEFAULT | wxICON_WARNING,
526 if (result == wxNO) {
529 if (result == wxCANCEL) {
537 XO(
"The project was not saved because the selected project is open in another window.\nPlease try again and select an original name."),
538 XO(
"Error Saving Project"),
549 auto success =
DoSave(fName, !bOwnsNewName);
563 wxFileName filename = fileName;
566 if (fileName.empty())
568 if (projectFileIO.IsTemporary())
570 filename.SetPath(defaultSavePath);
574 filename = projectFileIO.GetFileName();
581 filename.SetPath(defaultSavePath);
585 XO(
"%sSave Copy of Project \"%s\" As...")
588 bool bPrompt = (project.mBatchMode == 0) || (projectFileIO.GetFileName().empty());
600 fName =
SelectFile(FileNames::Operation::Export,
603 filename.GetFullName(),
606 wxFD_SAVE | wxRESIZE_BORDER,
617 filename.SetExt(
wxT(
"aup3"));
621 if (project.mBatchMode)
629 if (filename.FileExists())
633 XO(
"Saving a copy must not overwrite an existing saved project.\nPlease try again and select an original name."),
634 XO(
"Error Saving Copy of Project"),
635 wxOK | wxICON_ERROR);
638 if (project.mBatchMode)
646 wxULongLong fileSize = wxFileName::GetSize(projectFileIO.GetFileName());
648 wxDiskspaceSize_t freeSpace;
651 if (freeSpace.GetValue() <= fileSize.GetValue())
654 XO(
"Insufficient Disk Space"),
655 XO(
"The project size exceeds the available free space on the target disk.\n\n"
656 "Please select a different disk with more free space."),
657 "Error:_Unsuitable_drive"
666 if (fileSize > UINT32_MAX)
669 XO(
"Error Saving Project"),
670 XO(
"The project exceeds the maximum size of 4GB when writing to a FAT32 formatted filesystem."),
671 "Error:_Unsuitable_drive"
674 if (project.mBatchMode)
683 fName = filename.GetFullPath();
687 if (!projectFileIO.SaveCopy(fName))
691 nullptr, msg,
XO(
"Error Saving Project"), wxOK | wxICON_ERROR);
709 wxString sNewFileName = fnFile.GetFullPath();
714 if (!projectFileIO.IsModified()) {
715 sOldFilename = projectFileIO.GetFileName();
721 if (wxFileExists(sNewFileName)) {
725 auto success =
DoSave(sNewFileName,
true);
752 if ( !projectFileIO.WasCompacted() &&
770 return projectFileIO.OpenProject();
794 projectFileIO.CloseProject();
816 wxArrayString selected;
819 XO(
"Select one or more files"),
823 wxFD_OPEN | wxFD_MULTIPLE | wxRESIZE_BORDER);
831 const auto &saveType = fileTypes[ index ];
836 if (dialogResult == wxID_OK) {
850 const wxFileName newProjPathName(projPathName);
852 iter = std::find_if( start, finish,
856 if (iter != finish) {
858 XO(
"%s is already open in another window.")
859 .Format( newProjPathName.GetName() );
860 wxLogError(errMsg.Translation());
863 XO(
"Error Opening Project"),
871 const FilePath &fileNameArg,
bool addtohistory)
891 if (fileName.Lower().EndsWith(
wxT(
".aup3.bak")))
895"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."),
896 XO(
"Warning - Backup File Detected"),
902 if (!::wxFileExists(fileName)) {
904 XO(
"Could not open file: %s").
Format( fileName ),
905 XO(
"Error Opening File"),
913 wxFFile ff(fileName,
wxT(
"rb"));
915 auto cleanup =
finally([&]
923 if (!ff.IsOpened()) {
925 XO(
"Could not open file: %s").
Format( fileName ),
926 XO(
"Error opening file"),
933 auto numRead = ff.Read(buf, 6);
936 XO(
"File may be invalid or corrupted: \n%s").
Format( fileName ),
937 XO(
"Error Opening File or Project"),
943 if (wxStrncmp(buf,
"SQLite", 6) != 0)
946#ifdef EXPERIMENTAL_DRAG_DROP_PLUG_INS
957 auto &project = chooser(
false);
965 auto &project = chooser(
false);
970 if (!fileName.AfterLast(
'.').IsSameAs(
wxT(
"lof"),
false))
981 XO(
"Project resides on FAT formatted drive.\n"
982 "Copy it to another drive to open it.")))
987 auto &project = chooser(
true);
992 const FilePath &fileName,
bool addtohistory)
1002 const bool bParseSuccess = results.parseSuccess;
1003 const auto &errorStr = results.errorString;
1004 const bool err = results.trackError;
1006 if (bParseSuccess) {
1008 window.mbInitializingScrollbar =
true;
1012 selectionManager.AS_SetSnapTo(
settings.GetSnapTo());
1013 selectionManager.AS_SetSelectionFormat(
settings.GetSelectionFormat());
1014 selectionManager.TT_SetAudioTimeFormat(
settings.GetAudioTimeFormat());
1015 selectionManager.SSBL_SetFrequencySelectionFormatName(
1016 settings.GetFrequencySelectionFormatName());
1017 selectionManager.SSBL_SetBandwidthSelectionFormatName(
1018 settings.GetBandwidthSelectionFormatName());
1025 window.HandleResize();
1026 trackPanel.Refresh(
false);
1030 trackPanel.Update();
1038 if (bParseSuccess) {
1039 if (projectFileIO.IsRecovered())
1042 history.PushState(
XO(
"Project was recovered"),
XO(
"Recover"));
1057 for (
auto pTrack : tracks.Any<
WaveTrack >() )
1058 pTrack->CloseLock();
1062 wxLogError(
wxT(
"Could not parse file \"%s\". \nError: %s"), fileName, errorStr.Debug());
1065 XO(
"Error Opening Project"),
1082 std::vector< std::shared_ptr< Track > > results;
1086 wxFileName
fn(fileName);
1088 bool initiallyEmpty = tracks.empty();
1090 wxString trackNameBase =
fn.GetName();
1096 const bool projectHasSolo =
1100 for (
auto& track : newTracks)
1101 for (
auto& channel : track)
1102 channel->SetMute(
true);
1106 for (
auto &group : newTracks) {
1107 if (group.empty()) {
1111 auto first = group.begin()->get();
1112 auto nChannels = group.size();
1113 for (
auto &uNewTrack : group) {
1114 auto newTrack = tracks.Add( uNewTrack );
1115 results.push_back(newTrack->SharedPointer());
1117 tracks.MakeMultiChannelTrack(*first, nChannels,
true);
1125 const bool useSuffix =
1127 .any_of( [](
decltype(*results.begin()) &pTrack )
1128 { return pTrack->IsLeader(); } );
1130 for (
const auto &newTrack : results) {
1131 if ( newTrack->IsLeader() )
1135 newTrack->SetSelected(
true);
1140 newTrack->SetName(
XC(
"%s %d",
"clip name template").
Format(trackNameBase, i + 1).Translation());
1142 newTrack->SetName(trackNameBase);
1144 newTrack->TypeSwitch([&](
WaveTrack *wt) {
1147 auto trackName = wt->
GetName();
1149 clip->SetName(trackName);
1155 if (initiallyEmpty && newRate > 0) {
1160 history.PushState(
XO(
"Imported '%s'").
Format( fileName ),
1163#if defined(__WXGTK__)
1169 wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI | wxEVT_CATEGORY_USER_INPUT);
1174 if (initiallyEmpty && projectFileIO.IsTemporary()) {
1175 project.SetProjectName(
fn.GetName());
1176 project.SetInitialImportPath(
fn.GetPath());
1177 projectFileIO.SetProjectTitle();
1188 auto &project = temp.
Project();
1191 if (!projectFileIO.LoadProject(fileName,
false))
1195 for (
const Track *pTrack : srcTracks.
Any()) {
1196 auto destTrack = pTrack->PasteInto(dest);
1198 if (destTrack.use_count() == 1)
1199 destTracks.Add(destTrack);
1214 auto oldTags =
Tags::Get( project ).shared_from_this();
1219#ifdef EXPERIMENTAL_IMPORT_AUP3
1221 if (fileName.AfterLast(
'.').IsSameAs(
wxT(
"aup3"),
false)) {
1227 if (initiallyEmpty && projectFileIO.IsTemporary()) {
1228 wxFileName
fn(fileName);
1229 project.SetProjectName(
fn.GetName());
1230 project.SetInitialImportPath(
fn.GetPath());
1231 projectFileIO.SetProjectTitle();
1234 history.PushState(
XO(
"Imported '%s'").
Format(fileName),
XO(
"Import"));
1241 errorMessage = projectFileIO.GetLastError();
1242 if (errorMessage.
empty()) {
1243 errorMessage =
XO(
"Failed to import project");
1248 XO(
"Error Importing"),
1249 errorMessage,
wxT(
"Importing_Audio"));
1258 bool committed =
false;
1259 auto cleanup =
finally([&]{
1263 auto newTags = oldTags->Duplicate();
1266#ifndef EXPERIMENTAL_IMPORT_AUP3
1268 if (fileName.AfterLast(
'.').IsSameAs(
wxT(
"aup3"),
false)) {
1270 XO(
"Error Importing"),
1271 XO(
"Cannot import AUP3 format. Use File > Open instead"),
1281 if (!errorMessage.
empty()) {
1285 XO(
"Error Importing"), errorMessage,
wxT(
"Importing_Audio"));
1300 if (fileName.AfterLast(
'.').IsSameAs(
wxT(
"lof"),
false)) {
1310 if (fileName.AfterLast(
'.').IsSameAs(
wxT(
"aup"),
false)) {
1313 if (initiallyEmpty && projectFileIO.IsTemporary()) {
1314 wxFileName
fn(fileName);
1315 project.SetProjectName(
fn.GetName());
1316 project.SetInitialImportPath(
fn.GetPath());
1317 projectFileIO.SetProjectTitle();
1322 history.PushState(
XO(
"Imported '%s'").
Format( fileName ),
XO(
"Import"));
1347 S.StartVerticalLay(
true);
1349 S.AddFixedText(text,
false, 500);
1355 FindWindowById(wxID_YES,
this)->Bind(wxEVT_BUTTON, &CompactDialog::OnYes,
this);
1356 FindWindowById(wxID_NO,
this)->Bind(wxEVT_BUTTON, &CompactDialog::OnNo,
this);
1357 FindWindowById(wxID_HELP,
this)->Bind(wxEVT_BUTTON, &CompactDialog::OnGetURL,
this);
1364 void OnYes(wxCommandEvent &WXUNUSED(evt))
1369 void OnNo(wxCommandEvent &WXUNUSED(evt))
1387 bool isBatch = project.mBatchMode > 0;
1390 projectFileIO.ReopenProject();
1392 auto savedState = undoManager.GetSavedState();
1393 const auto currentState = undoManager.GetCurrentState();
1394 if (savedState < 0) {
1395 undoManager.StateSaved();
1396 savedState = undoManager.GetSavedState();
1397 if (savedState < 0) {
1402 const auto least = std::min<size_t>(savedState, currentState);
1403 const auto greatest = std::max<size_t>(savedState, currentState);
1404 std::vector<const TrackList*> trackLists;
1405 auto fn = [&](
auto& elem){
1406 trackLists.push_back(elem.state.tracks.get()); };
1407 undoManager.VisitStates(
fn, least, 1 + least);
1408 if (least != greatest)
1409 undoManager.VisitStates(
fn, greatest, 1 + greatest);
1411 int64_t total = projectFileIO.GetTotalUsage();
1412 int64_t used = projectFileIO.GetCurrentUsage(trackLists);
1414 auto before = wxFileName::GetSize(projectFileIO.GetFileName());
1417 XO(
"Compacting this project will free up disk space by removing unused bytes within the file.\n\n"
1418 "There is %s of free disk space and this project is currently using %s.\n"
1420 "If you proceed, the current Undo/Redo History and clipboard contents will be discarded "
1421 "and you will recover approximately %s of disk space.\n"
1423 "Do you want to continue?")
1427 if (isBatch || dlg.ShowModal() == wxYES)
1430 undoManager.RemoveStates(1 + greatest, undoManager.GetNumStates());
1433 if (least < greatest)
1434 undoManager.RemoveStates(least + 1, greatest);
1437 undoManager.RemoveStates(0, least);
1440 if (&
mProject == clipboard.Project().lock().get())
1445 auto before = wxFileName::GetSize(projectFileIO.GetFileName());
1447 projectFileIO.Compact(trackLists,
true);
1449 auto after = wxFileName::GetSize(projectFileIO.GetFileName());
1454 XO(
"Compacting actually freed %s of disk space.")
1456 XO(
"Compact Project"));
1459 undoManager.RenameState( undoManager.GetCurrentState(),
1460 XO(
"Compacted project file"),
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Toolkit-neutral facade for basic user interface services.
Declare functions to perform UTF-8 to std::wstring conversions.
std::vector< std::vector< std::shared_ptr< WaveTrack > > > TrackHolders
bool DoImportMIDI(AudacityProject &project, const FilePath &fileName)
IteratorRange< Iterator > make_iterator_range(const Iterator &i1, const Iterator &i2)
std::unique_ptr< const BasicUI::WindowPlacement > ProjectFramePlacement(AudacityProject *project)
Make a WindowPlacement object suitable for project (which may be null)
static const AudacityProject::AttachedObjects::RegisteredFactory sFileManagerKey
an object holding per-project preferred sample rate
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
accessors for certain important windows associated with each project
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
for(int ii=0, nn=names.size();ii< nn;++ii)
static Settings & settings()
int ShowWarningDialog(wxWindow *parent, const wxString &internalDialogName, const TranslatableString &message, bool showCancelButton, const TranslatableString &footer)
const_iterator end() const
Container::value_type value_type
const_iterator begin() const
Wrap wxMessageDialog so that caption IS translatable.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
virtual int GetFilterIndex() const
virtual wxString GetPath() const
virtual void GetPaths(wxArrayString &paths) const
virtual void SetFilterIndex(int filterIndex)
static TranslatableString WriteFailureMessage(const wxFileName &fileName)
void Append(const FilePath &file)
static FileHistory & Global()
FILES_API const FileType AudacityProjects
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
static void SetLastOpenType(const FileNames::FileType &type)
FileNames::FileTypes GetFileTypes(const FileNames::FileType &extraType={})
bool Import(AudacityProject &project, const FilePath &fName, WaveTrackFactory *trackFactory, TrackHolders &tracks, Tags *tags, TranslatableString &errorMessage)
static size_t SelectDefaultOpenType(const FileNames::FileTypes &fileTypes)
static void SetDefaultOpenType(const FileNames::FileType &type)
static TranslatableString FormatSize(wxLongLong size)
Convert a number to a string while formatting it in bytes, KB, MB, GB.
Makes a temporary project that doesn't display on the screen.
AudacityProject & Project()
AudioTrack subclass that can also be audibly replayed by the program.
static PluginManager & Get()
static ProjectFileIO & Get(AudacityProject &project)
const FilePath & GetFileName() const
std::shared_ptr< TrackList > mLastSavedTracks
static bool IsAlreadyOpen(const FilePath &projPathName)
AudacityProject & mProject
void CompactProjectOnClose()
bool Import(const FilePath &fileName, bool addToHistory=true)
bool SaveCopy(const FilePath &fileName=wxT(""))
bool SaveAs(bool allowOverwrite=false)
static void DiscardAutosave(const FilePath &filename)
void AddImportedTracks(const FilePath &fileName, TrackHolders &&newTracks)
static wxArrayString ShowOpenDialog(FileNames::Operation op, const FileNames::FileType &extraType={})
Show an open dialogue for opening audio files, and possibly other sorts of files.
bool DoSave(const FilePath &fileName, bool fromSaveAs)
bool SaveFromTimerRecording(wxFileName fnFile)
static AudacityProject * OpenFile(const ProjectChooserFn &chooser, const FilePath &fileName, bool addtohistory=true)
ReadProjectResults ReadProjectFile(const FilePath &fileName, bool discardAutosave=false)
std::function< AudacityProject &(bool)> ProjectChooserFn
A function that returns a project to use for opening a file; argument is true if opening a project fi...
static ProjectFileManager & Get(AudacityProject &project)
ProjectFileManager(AudacityProject &project)
AudacityProject * OpenProjectFile(const FilePath &fileName, bool addtohistory)
static ProjectHistory & Get(AudacityProject &project)
static ProjectRate & Get(AudacityProject &project)
void SetRate(double rate)
static ProjectSelectionManager & Get(AudacityProject &project)
static ProjectSettings & Get(AudacityProject &project)
static ProjectStatus & Get(AudacityProject &project)
void Set(const TranslatableString &msg, StatusBarField field=mainStatusBarField)
void ZoomAfterImport(Track *pTrack)
static ProjectWindow & Get(AudacityProject &project)
void SetRate(double rate)
static SelectionBar & Get(AudacityProject &project)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Abstract base class for an object holding data associated with points on a time axis.
static void FinishCopy(const Track *n, Track *dest)
static std::shared_ptr< TrackList > Create(AudacityProject *pOwner)
static TrackList & Get(AudacityProject &project)
static TrackPanel & Get(AudacityProject &project)
Holds a msgid for the translation catalog; may also bind format arguments.
Identifier MSGID() const
MSGID is the English lookup key in the catalog, not necessarily for user's eyes if locale is some oth...
static UndoManager & Get(AudacityProject &project)
bool UnsavedChanges() const
An error dialog about unwritable location, that allows to navigate to settings quickly.
static WaveTrackFactory & Get(AudacityProject &project)
A Track that contains audio waveform data.
double GetRate() const override
WaveClipHolders & GetClips()
void OnYes(wxCommandEvent &WXUNUSED(evt))
void OnGetURL(wxCommandEvent &WXUNUSED(evt))
CompactDialog(TranslatableString text)
void OnNo(wxCommandEvent &WXUNUSED(evt))
void ShowErrorDialog(const WindowPlacement &placement, const TranslatableString &dlogTitle, const TranslatableString &message, const ManualPageID &helpPage, const ErrorDialogOptions &options={})
Show an error dialog with a link to the manual for further help.
FILES_API bool IsMidi(const FilePath &fName)
FILES_API bool IsOnFATFileSystem(const FilePath &path)
FILES_API bool IsPathAvailable(const FilePath &Path)
FILES_API wxString AbbreviatePath(const wxFileName &fileName)
Give enough of the path to identify the device. (On Windows, drive letter plus ':')
FILES_API void UpdateDefaultPath(Operation op, const FilePath &path)
FILES_API FilePath FindDefaultPath(Operation op)
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
void SelectNone(AudacityProject &project)
FILES_API bool FATFilesystemDenied(const FilePath &path, const TranslatableString &msg, const BasicUI::WindowPlacement &placement={})
FILES_API wxString UnsavedProjectFileName()
bool ImportProject(AudacityProject &dest, const FilePath &fileName)
std::pair< const char *, const char * > Pair
const Pair helpURLTable[]
wxString FindHelpUrl(const TranslatableString &libraryError)
const char *const defaultHelpUrl
TranslatableString Message(unsigned trackCount)
Options for variations of error dialogs; the default is for modal dialogs.