X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58d4ed8a118b68508613eb0b2b8c8841ec42a9bc..219665bbc6d9f344573502ca4505ed4807a7ed52:/src/osx/carbon/dialog.cpp diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 84dbc61448..8b198abb76 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -23,13 +23,25 @@ #include "wx/osx/private.h" #include "wx/evtloop.h" -extern wxList wxModalDialogs; +void wxDialog::EndWindowModal() +{ + // Nothing to do for now. +} -void wxDialog::DoShowModal() +void wxDialog::DoShowWindowModal() { - wxCHECK_RET( !IsModal(), wxT("DoShowModal() called twice") ); + // If someone wants to add support for this to wxOSX Carbon, here would + // be the place to start: http://trac.wxwidgets.org/ticket/9459 + // Unfortunately, supporting sheets in Carbon isn't as straightforward + // as with Cocoa, so it will probably take some tweaking. - wxModalDialogs.Append(this); + m_modality = wxDIALOG_MODALITY_APP_MODAL; + ShowModal(); + SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); +} + +void wxDialog::DoShowModal() +{ SetFocus() ; @@ -50,7 +62,9 @@ void wxDialog::DoShowModal() } BeginAppModalStateForWindow(windowRef) ; +#if wxUSE_CONSOLE_EVENTLOOP wxEventLoopGuarantor ensureHasLoop; +#endif wxEventLoopBase * const loop = wxEventLoop::GetActive(); while ( IsModal() ) loop->Dispatch();