mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Don't call QuitAudacity directly from src/menus...
... This cuts link dependency on AudacityApp.cpp, and allows the function to be private to that file
This commit is contained in:
@@ -542,7 +542,9 @@ void OnPrint(const CommandContext &context)
|
||||
|
||||
void OnExit(const CommandContext &WXUNUSED(context) )
|
||||
{
|
||||
QuitAudacity();
|
||||
// Simulate the application Exit menu item
|
||||
wxCommandEvent evt{ wxEVT_MENU, wxID_EXIT };
|
||||
wxTheApp->AddPendingEvent( evt );
|
||||
}
|
||||
|
||||
}; // struct Handler
|
||||
|
@@ -457,7 +457,11 @@ void OnTimerRecord(const CommandContext &context)
|
||||
// No action required
|
||||
break;
|
||||
case POST_TIMER_RECORD_CLOSE:
|
||||
wxTheApp->CallAfter( []{ QuitAudacity(); } );
|
||||
wxTheApp->CallAfter( []{
|
||||
// Simulate the application Exit menu item
|
||||
wxCommandEvent evt{ wxEVT_MENU, wxID_EXIT };
|
||||
wxTheApp->AddPendingEvent( evt );
|
||||
} );
|
||||
break;
|
||||
case POST_TIMER_RECORD_RESTART:
|
||||
// Restart System
|
||||
|
Reference in New Issue
Block a user