]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/filedlg.cpp
removed assert which became incorrect after last change
[wxWidgets.git] / src / mac / filedlg.cpp
index 41a37f0dd3bb4b66caeb96a2e18692c6373725be..6347f8757737b4440bc989219f0b04d95d5c7bb7 100644 (file)
@@ -93,7 +93,8 @@ NavEventProc(
     else if ( inSelector == kNavCBStart )
     {
 #if TARGET_CARBON
-#else
+        // there is no way to set this in the new API
+ #else
         if ( data->menuitems )
             NavCustomControl(ioParams->context, kNavCtlSelectCustomType, &(*data->menuitems)[data->currentfilter]);
 #endif
@@ -113,9 +114,9 @@ NavEventProc(
                 wxString extension =  data->extensions[i].AfterLast('.') ;
                 extension.MakeLower() ;
                 wxString sfilename ;
-                
+                 
 #if TARGET_CARBON
-                wxMacCFStringHolder cfString = NavDialogGetSaveFileName( ioParams->context ) ;
+                wxMacCFStringHolder cfString( NavDialogGetSaveFileName( ioParams->context ) , false  );
                 sfilename = cfString.AsString() ;
 #else
                 Str255 filename ;
@@ -318,6 +319,7 @@ pascal Boolean CrossPlatformFilterCallback (
                    wxString file = wxMacMakeStringFromPascal( spec.name ) ;
                 display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
             }   
+ #if TARGET_CARBON
             else if ( theItem->descriptorType == typeFSRef )
             {
                 FSRef fsref ;
@@ -328,6 +330,7 @@ pascal Boolean CrossPlatformFilterCallback (
                 file.UngetWriteBuf() ;
                 display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
             }
+#endif
         }
     }
     
@@ -546,14 +549,16 @@ int wxFileDialog::ShowModal()
         m_fileName = wxFileNameFromPath(m_path);
         m_dir = wxPathOnly(m_path);
         NavDisposeReply( &mNavReply ) ;
+#if TARGET_CARBON
         if ( navDialogRef )
             NavDialogDispose( navDialogRef ) ;   
-
+#endif
         return wxID_OK ;
     }
+#if TARGET_CARBON
     if ( navDialogRef )
         NavDialogDispose( navDialogRef ) ;   
-
+#endif
     return wxID_CANCEL;
 }