X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b61c03cad3e5e0e4766e12dd1e26fac5fe72ff3e..ad653fa23069c5d9378247084f03c9a718c3ad62:/src/osx/cocoa/dirdlg.mm diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index 59f77683c7..f7869a075a 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -32,12 +32,18 @@ #include "wx/filename.h" #include "wx/evtloop.h" +#include "wx/modalhook.h" #include "wx/osx/private.h" IMPLEMENT_CLASS(wxDirDialog, wxDialog) -wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, +void wxDirDialog::Init() +{ + m_sheetDelegate = nil; +} + +void wxDirDialog::Create(wxWindow *parent, const wxString& message, const wxString& defaultPath, long style, const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), const wxString& WXUNUSED(name)) { @@ -94,6 +100,8 @@ void wxDirDialog::ShowWindowModal() int wxDirDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + wxCFEventLoopPauseIdleEvents pause; NSOpenPanel *oPanel = OSXCreatePanel(); @@ -117,7 +125,7 @@ void wxDirDialog::ModalFinishedCallback(void* panel, int returnCode) if (returnCode == NSOKButton ) { NSOpenPanel* oPanel = (NSOpenPanel*)panel; - SetPath( wxCFStringRef::AsString([[oPanel filenames] objectAtIndex:0])); + SetPath( wxCFStringRef::AsStringWithNormalizationFormC([[oPanel filenames] objectAtIndex:0])); result = wxID_OK; } SetReturnCode(result);