X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b61c03cad3e5e0e4766e12dd1e26fac5fe72ff3e..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/src/osx/cocoa/dirdlg.mm?ds=sidebyside diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index 59f77683c7..ad757e2adc 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -32,6 +32,7 @@ #include "wx/filename.h" #include "wx/evtloop.h" +#include "wx/testing.h" #include "wx/osx/private.h" @@ -94,6 +95,8 @@ void wxDirDialog::ShowWindowModal() int wxDirDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + wxCFEventLoopPauseIdleEvents pause; NSOpenPanel *oPanel = OSXCreatePanel(); @@ -117,7 +120,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);