X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75925930cd752687ea4b69a0c84bfbc9fe57b6d1..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/cocoa/filedlg.mm diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index b159a1844b..40d4f4645f 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -38,7 +38,7 @@ #include "wx/osx/private.h" #include "wx/sysopt.h" -#include "wx/testing.h" +#include "wx/modalhook.h" #include @@ -196,6 +196,7 @@ wxFileDialog::wxFileDialog( m_filterIndex = -1; m_sheetDelegate = [[ModalDialogDelegate alloc] init]; [(ModalDialogDelegate*)m_sheetDelegate setImplementation: this]; + m_delegate = nil; } wxFileDialog::~wxFileDialog() @@ -397,7 +398,7 @@ wxWindow* wxFileDialog::CreateFilterPanel(wxWindow *extracontrol) if ( m_firstFileTypeFilter >= 0 ) m_filterChoice->SetSelection(m_firstFileTypeFilter); } - m_filterChoice->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); + m_filterChoice->Connect(wxEVT_CHOICE, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); } if(extracontrol) @@ -463,7 +464,6 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) } NSView* accView = nil; - m_delegate = nil; if ( m_useFileTypeFilter ) { @@ -501,7 +501,7 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) int wxFileDialog::ShowModal() { - WX_TESTING_SHOW_MODAL_HOOK(); + WX_HOOK_MODAL_DIALOG(); wxCFEventLoopPauseIdleEvents pause;