1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

AUP3: UP-40 Compact Project Done

Shows how much space was freed after compaction.
This commit is contained in:
Leland Lucius 2020-07-27 16:50:18 -05:00
parent 71ee696562
commit 5e086041d6

View File

@ -177,7 +177,19 @@ void OnCompact(const CommandContext &context)
}
auto &projectFileIO = ProjectFileIO::Get(project);
auto before = wxFileName(projectFileIO.GetFileName()).GetSize() +
wxFileName(projectFileIO.GetFileName() + wxT("-wal")).GetSize();
projectFileIO.Vacuum(currentTracks, true);
auto after = wxFileName(projectFileIO.GetFileName()).GetSize() +
wxFileName(projectFileIO.GetFileName() + wxT("-wal")).GetSize();
double space = (before - after).GetValue();
AudacityMessageBox(
XO("Compacting freed %s of disk space.").Format(Internat::FormatSize(space)),
XO("Compact Project"));
}
void OnSave(const CommandContext &context )