#include "wx/filename.h"
#include "wx/tokenzr.h"
+#include "wx/evtloop.h"
#include "wx/osx/private.h"
#include "wx/sysopt.h"
+#include "wx/testing.h"
#include <mach-o/dyld.h>
// case above.
version = NSVersionOfRunTimeLibrary("AppKit");
}
- if (version == -1)
- {
- return false;
- }
+
+ // Notice that this still works correctly even if version is -1.
return version >= 0x40e2400 /* version of 10.6 AppKit */;
}
int wxFileDialog::ShowModal()
{
+ WX_TESTING_SHOW_MODAL_HOOK();
+
+ wxCFEventLoopPauseIdleEvents pause;
+
wxMacAutoreleasePool autoreleasepool;
wxCFStringRef cf( m_message );
NSSavePanel* sPanel = (NSSavePanel*)panel;
result = wxID_OK;
- m_path = wxCFStringRef::AsString([sPanel filename]);
+ m_path = wxCFStringRef::AsStringWithNormalizationFormC([sPanel filename]);
m_fileName = wxFileNameFromPath(m_path);
m_dir = wxPathOnly( m_path );
if (m_filterChoice)
NSArray* filenames = [oPanel filenames];
for ( size_t i = 0 ; i < [filenames count] ; ++ i )
{
- wxString fnstr = wxCFStringRef::AsString([filenames objectAtIndex:i]);
+ wxString fnstr = wxCFStringRef::AsStringWithNormalizationFormC([filenames objectAtIndex:i]);
m_paths.Add( fnstr );
m_fileNames.Add( wxFileNameFromPath(fnstr) );
if ( i == 0 )