1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-19 09:30:52 +02:00

Apply Leland's *other* patch for bug 344 (p3).

This commit is contained in:
v.audacity 2012-02-15 01:15:51 +00:00
parent 163b845284
commit 24f11dcbc0

View File

@ -1272,6 +1272,21 @@ ProgressDialog::Show(bool show)
if (!mDisable)
{
mDisable = new wxWindowDisabler(this);
#if defined(__WXMAC__)
// LL: On the Mac, the parent windows get disabled, but they still respond
// to the close button being clicked and the application quit menu item
// is still enabled. We do not want the parent window to be destroyed
// while we're active, so we have to kludge around a bit to keep this
// from happening.
WindowRef windowRef = (WindowRef) MacGetWindowRef();
SetWindowModality( windowRef, kWindowModalityAppModal, NULL ) ;
BeginAppModalStateForWindow(windowRef);
wxMenuBar *bar = wxStaticCast(wxGetTopLevelParent(wxTheApp->GetTopWindow()), wxFrame)->GetMenuBar();
bar->Enable(wxID_PREFERENCES, false);
bar->Enable(wxID_EXIT, false);
#endif
}
}