]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/filedlg.mm
Fix wrong tab order in wxAuiNotebook after dragging.
[wxWidgets.git] / src / osx / cocoa / filedlg.mm
index d08d3a3c3ed8add3c71567eae42b8cd5c29fdb04..40fd8c42947396b9295e28bc64ad6a9e04cc5653 100644 (file)
 
 #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>
 
@@ -494,6 +496,10 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow)
 
 int wxFileDialog::ShowModal()
 {
+    WX_TESTING_SHOW_MODAL_HOOK();
+
+    wxCFEventLoopPauseIdleEvents pause;
+
     wxMacAutoreleasePool autoreleasepool;
     
     wxCFStringRef cf( m_message );
@@ -645,7 +651,7 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode)
             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)
@@ -664,7 +670,7 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode)
             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 )