| 376 | } |
| 377 | |
| 378 | void HistoryDialog::OnCompact(wxCommandEvent & WXUNUSED(event)) |
| 379 | { |
| 380 | auto &projectFileIO = ProjectFileIO::Get(*mProject); |
| 381 | |
| 382 | projectFileIO.ReopenProject(); |
| 383 | |
| 384 | auto baseFile = wxFileName(projectFileIO.GetFileName()); |
| 385 | auto walFile = wxFileName(projectFileIO.GetFileName() + wxT("-wal")); |
| 386 | auto before = baseFile.GetSize() + walFile.GetSize(); |
| 387 | |
| 388 | projectFileIO.Compact({}, true); |
| 389 | |
| 390 | auto after = baseFile.GetSize() + walFile.GetSize(); |
| 391 | |
| 392 | AudacityMessageBox( |
| 393 | XO("Compacting actually freed %s of disk space.") |
| 394 | .Format(Internat::FormatSize((before - after).GetValue())), |
| 395 | XO("History")); |
| 396 | } |
| 397 | |
| 398 | void HistoryDialog::OnGetURL(wxCommandEvent & WXUNUSED(event)) |
| 399 | { |
nothing calls this directly
no test coverage detected