| 2519 | } |
| 2520 | |
| 2521 | int AudacityApp::OnExit() |
| 2522 | { |
| 2523 | gIsQuitting = true; |
| 2524 | while(Pending()) |
| 2525 | { |
| 2526 | Dispatch(); |
| 2527 | } |
| 2528 | |
| 2529 | HandleAppClosing(); |
| 2530 | |
| 2531 | Importer::Get().Terminate(); |
| 2532 | |
| 2533 | if(gPrefs) |
| 2534 | { |
| 2535 | bool bFalse = false; |
| 2536 | //Should we change the commands.cfg location next startup? |
| 2537 | if(gPrefs->Read(wxT("/QDeleteCmdCfgLocation"), &bFalse)) |
| 2538 | { |
| 2539 | gPrefs->DeleteEntry(wxT("/QDeleteCmdCfgLocation")); |
| 2540 | gPrefs->Write(wxT("/DeleteCmdCfgLocation"), true); |
| 2541 | gPrefs->Flush(); |
| 2542 | } |
| 2543 | } |
| 2544 | |
| 2545 | FileHistory::Global().Save(*gPrefs); |
| 2546 | |
| 2547 | FinishPreferences(); |
| 2548 | |
| 2549 | DeinitFFT(); |
| 2550 | |
| 2551 | #ifdef HAS_NETWORKING |
| 2552 | audacity::network_manager::NetworkManager::GetInstance().Terminate(); |
| 2553 | #endif |
| 2554 | |
| 2555 | AudioIO::Deinit(); |
| 2556 | |
| 2557 | // Terminate the PluginManager (must be done before deleting the locale) |
| 2558 | PluginManager::Get().Terminate(); |
| 2559 | |
| 2560 | return 0; |
| 2561 | } |
| 2562 | |
| 2563 | // The following five methods are currently only used on Mac OS, |
| 2564 | // where it's possible to have a menu bar but no windows open. |
nothing calls this directly
no test coverage detected