| 417 | //////////////////////////////////////////////////////////////////////////// |
| 418 | |
| 419 | static bool RecoverAllProjects(const FilePaths &files, |
| 420 | AudacityProject *&pproj) |
| 421 | { |
| 422 | // Open a project window for each auto save file |
| 423 | wxString filename; |
| 424 | bool result = true; |
| 425 | |
| 426 | for (auto &file: files) |
| 427 | { |
| 428 | AudacityProject *proj = nullptr; |
| 429 | // Reuse any existing project window, which will be the empty project |
| 430 | // created at application startup |
| 431 | std::swap(proj, pproj); |
| 432 | |
| 433 | // Open project. |
| 434 | if (ProjectManager::OpenProject(proj, file, false, true) == nullptr) |
| 435 | { |
| 436 | result = false; |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | return result; |
| 441 | } |
| 442 | |
| 443 | static void DiscardAllProjects(const FilePaths &files) |
| 444 | { |
no test coverage detected