mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-09 13:12:17 +01:00
Some naming consistency...
Prefer "MissingAliasFiles" not other permutations of the words
This commit is contained in:
@@ -1702,12 +1702,12 @@ int DirManager::ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode)
|
||||
//
|
||||
// MISSING ALIASED AUDIO FILES
|
||||
//
|
||||
wxGetApp().SetMissingAliasedFileWarningShouldShow(false);
|
||||
BlockHash missingAliasedFileAUFHash; // (.auf) AliasBlockFiles whose aliased files are missing
|
||||
BlockHash missingAliasedFilePathHash; // full paths of missing aliased files
|
||||
this->FindMissingAliasedFiles(missingAliasedFileAUFHash, missingAliasedFilePathHash);
|
||||
wxGetApp().SetMissingAliasFilesWarningShouldShow(false);
|
||||
BlockHash missingAliasFilesAUFHash; // (.auf) AliasBlockFiles whose aliased files are missing
|
||||
BlockHash missingAliasFilesPathHash; // full paths of missing aliased files
|
||||
this->FindMissingAliasFiles(missingAliasFilesAUFHash, missingAliasFilesPathHash);
|
||||
|
||||
if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAliasedFileAUFHash.empty())
|
||||
if ((nResult != FSCKstatus_CLOSE_REQ) && !missingAliasFilesAUFHash.empty())
|
||||
{
|
||||
// In auto-recover mode, we always create silent blocks, and do not ask user.
|
||||
// This makes sure the project is complete next time we open it.
|
||||
@@ -1729,7 +1729,7 @@ _("Project check of \"%s\" folder \
|
||||
\nproject in its current state, unless you \"Close \
|
||||
\nproject immediately\" on further error alerts.");
|
||||
wxString msg;
|
||||
msg.Printf(msgA, this->projName, (long long) missingAliasedFilePathHash.size());
|
||||
msg.Printf(msgA, this->projName, (long long) missingAliasFilesPathHash.size());
|
||||
const wxChar *buttons[] =
|
||||
{_("Close project immediately with no changes"),
|
||||
_("Treat missing audio as silence (this session only)"),
|
||||
@@ -1744,8 +1744,8 @@ _("Project check of \"%s\" folder \
|
||||
else
|
||||
{
|
||||
// LL: A progress dialog should probably be used here
|
||||
BlockHash::iterator iter = missingAliasedFileAUFHash.begin();
|
||||
while (iter != missingAliasedFileAUFHash.end())
|
||||
BlockHash::iterator iter = missingAliasFilesAUFHash.begin();
|
||||
while (iter != missingAliasFilesAUFHash.end())
|
||||
{
|
||||
// This type cast is safe. We checked that it's an alias block file earlier.
|
||||
BlockFilePtr b = iter->second.lock();
|
||||
@@ -1990,7 +1990,7 @@ other projects. \
|
||||
|
||||
// Summarize and flush the log.
|
||||
if (bForceError ||
|
||||
!missingAliasedFileAUFHash.empty() ||
|
||||
!missingAliasFilesAUFHash.empty() ||
|
||||
!missingAUFHash.empty() ||
|
||||
!missingAUHash.empty() ||
|
||||
!orphanFilePathArray.empty())
|
||||
@@ -2006,13 +2006,13 @@ other projects. \
|
||||
wxOK | wxICON_EXCLAMATION);
|
||||
}
|
||||
|
||||
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
|
||||
wxGetApp().SetMissingAliasFilesWarningShouldShow(true);
|
||||
return nResult;
|
||||
}
|
||||
|
||||
void DirManager::FindMissingAliasedFiles(
|
||||
BlockHash& missingAliasedFileAUFHash, // output: (.auf) AliasBlockFiles whose aliased files are missing
|
||||
BlockHash& missingAliasedFilePathHash) // output: full paths of missing aliased files
|
||||
void DirManager::FindMissingAliasFiles(
|
||||
BlockHash& missingAliasFilesAUFHash, // output: (.auf) AliasBlockFiles whose aliased files are missing
|
||||
BlockHash& missingAliasFilesPathHash) // output: full paths of missing aliased files
|
||||
{
|
||||
BlockHash::iterator iter = mBlockFileHash.begin();
|
||||
while (iter != mBlockFileHash.end())
|
||||
@@ -2029,20 +2029,20 @@ void DirManager::FindMissingAliasedFiles(
|
||||
if ((!aliasedFileFullPath.empty()) &&
|
||||
!aliasedFileName.FileExists())
|
||||
{
|
||||
missingAliasedFileAUFHash[key] = b;
|
||||
if (missingAliasedFilePathHash.find(aliasedFileFullPath) ==
|
||||
missingAliasedFilePathHash.end()) // Add it only once.
|
||||
missingAliasFilesAUFHash[key] = b;
|
||||
if (missingAliasFilesPathHash.find(aliasedFileFullPath) ==
|
||||
missingAliasFilesPathHash.end()) // Add it only once.
|
||||
// Not actually using the block here, just the path,
|
||||
// so set the block to NULL to create the entry.
|
||||
missingAliasedFilePathHash[aliasedFileFullPath] = {};
|
||||
missingAliasFilesPathHash[aliasedFileFullPath] = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
|
||||
iter = missingAliasedFilePathHash.begin();
|
||||
while (iter != missingAliasedFilePathHash.end())
|
||||
iter = missingAliasFilesPathHash.begin();
|
||||
while (iter != missingAliasFilesPathHash.end())
|
||||
{
|
||||
wxLogWarning(_("Missing aliased audio file: '%s'"), iter->first);
|
||||
++iter;
|
||||
|
||||
Reference in New Issue
Block a user