X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5b208a1796ecf1b9ab267d200705b4f3b4d10e3..08670ea85abf4b4946a9ce64971b591d7b1ee30b:/src/osx/dialog_osx.cpp diff --git a/src/osx/dialog_osx.cpp b/src/osx/dialog_osx.cpp index a63744bf56..835afaaa24 100644 --- a/src/osx/dialog_osx.cpp +++ b/src/osx/dialog_osx.cpp @@ -40,9 +40,6 @@ void wxDialog::OSXEndModalDialog() s_openDialogs--; } - -IMPLEMENT_DYNAMIC_CLASS(wxDialog, wxTopLevelWindow) - void wxDialog::Init() { m_modality = wxDIALOG_MODALITY_NONE; @@ -83,7 +80,7 @@ wxDialog::~wxDialog() // about it bool wxDialog::IsEscapeKey(const wxKeyEvent& event) { - if ( event.GetKeyCode() == '.' && event.GetModifiers() == wxMOD_CMD ) + if ( event.GetKeyCode() == '.' && event.GetModifiers() == wxMOD_CONTROL ) return true; return wxDialogBase::IsEscapeKey(event); @@ -102,7 +99,7 @@ bool wxDialog::Show(bool show) // nothing to do return false; } - else + else { if ( !wxDialogBase::Show(show) ) // nothing to do @@ -122,14 +119,14 @@ bool wxDialog::Show(bool show) { case wxDIALOG_MODALITY_WINDOW_MODAL: EndWindowModal(); // OS X implementation method for cleanup - SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); + SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); break; default: break; } m_modality = wxDIALOG_MODALITY_NONE; } - + return true; } @@ -137,27 +134,27 @@ bool wxDialog::Show(bool show) int wxDialog::ShowModal() { m_modality = wxDIALOG_MODALITY_APP_MODAL; - + Show(); wxModalEventLoop modalLoop(this); m_eventLoop = &modalLoop; - + wxDialog::OSXBeginModalDialog(); modalLoop.Run(); wxDialog::OSXEndModalDialog(); - + m_eventLoop = NULL; - + return GetReturnCode(); } void wxDialog::ShowWindowModal() { m_modality = wxDIALOG_MODALITY_WINDOW_MODAL; - + Show(); - + DoShowWindowModal(); } @@ -172,7 +169,7 @@ void wxDialog::EndModal(int retCode) { if ( m_eventLoop ) m_eventLoop->Exit(retCode); - + SetReturnCode(retCode); Show(false); }