1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Break dependency cycle introduced at 50f3321...

... This only cuts and pastes some functions from FileNames to another new file
and namespace, and changes namespace qualifiers where they are called.

The cycle resulted because of the need to include widgets/ErrorDialog.h
This commit is contained in:
Paul Licameli
2021-01-14 10:50:06 -05:00
parent 086cacad76
commit 43574553fc
13 changed files with 202 additions and 161 deletions

View File

@@ -19,7 +19,6 @@ Paul Licameli split from AudacityProject.cpp
#endif
#include <wx/frame.h>
#include "FileNames.h"
#include "Legacy.h"
#include "PlatformCompatibility.h"
#include "Project.h"
@@ -34,6 +33,7 @@ Paul Licameli split from AudacityProject.cpp
#include "SelectUtilities.h"
#include "SelectionState.h"
#include "Tags.h"
#include "TempDirectory.h"
#include "TrackPanelAx.h"
#include "TrackPanel.h"
#include "UndoManager.h"
@@ -269,7 +269,7 @@ bool ProjectFileManager::DoSave(const FilePath & fileName, const bool fromSaveAs
// Some confirmation dialogs
{
if (FileNames::FATFilesystemDenied(fileName, XO("Projects cannot be saved to FAT drives.")))
if (TempDirectory::FATFilesystemDenied(fileName, XO("Projects cannot be saved to FAT drives.")))
{
return false;
}
@@ -606,7 +606,7 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */)
filename.SetExt(wxT("aup3"));
if (FileNames::FATFilesystemDenied(filename.GetFullPath(), XO("Projects cannot be saved to FAT drives.")))
if (TempDirectory::FATFilesystemDenied(filename.GetFullPath(), XO("Projects cannot be saved to FAT drives.")))
{
if (project.mBatchMode)
{
@@ -858,7 +858,7 @@ void ProjectFileManager::OpenFile(const FilePath &fileNameArg, bool addtohistory
auto fileName = PlatformCompatibility::ConvertSlashInFileName(
PlatformCompatibility::GetLongFileName(fileNameArg));
if (FileNames::FATFilesystemDenied(fileName,
if (TempDirectory::FATFilesystemDenied(fileName,
XO("Project resides on FAT formatted drive.\n"
"Copy it to another drive to open it.")))
{