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:
parent
71ee696562
commit
5e086041d6
@ -177,7 +177,19 @@ void OnCompact(const CommandContext &context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto &projectFileIO = ProjectFileIO::Get(project);
|
auto &projectFileIO = ProjectFileIO::Get(project);
|
||||||
|
|
||||||
|
auto before = wxFileName(projectFileIO.GetFileName()).GetSize() +
|
||||||
|
wxFileName(projectFileIO.GetFileName() + wxT("-wal")).GetSize();
|
||||||
|
|
||||||
projectFileIO.Vacuum(currentTracks, true);
|
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 )
|
void OnSave(const CommandContext &context )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user