#include "wx/filename.h"
#include "wx/evtloop.h"
+#include "wx/modalhook.h"
#include "wx/osx/private.h"
wxCFStringRef cf( m_message );
[oPanel setMessage:cf.AsNSString()];
- if ( HasFlag(wxDD_NEW_DIR_BUTTON) )
+ if ( !HasFlag(wxDD_DIR_MUST_EXIST) )
[oPanel setCanCreateDirectories:YES];
return oPanel;
int wxDirDialog::ShowModal()
{
+ WX_HOOK_MODAL_DIALOG();
+
wxCFEventLoopPauseIdleEvents pause;
NSOpenPanel *oPanel = OSXCreatePanel();
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);