]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/filedlg.cpp
added generic color dialog to setup
[wxWidgets.git] / src / mac / carbon / filedlg.cpp
index 118ec1a6a8226e39725eee3e8ef8e0783c831ec9..42c94640ef3b0884eb331e9998a782f4b7c609d8 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include "wx/defs.h"
+#include "wx/app.h"
 #include "wx/utils.h"
 #include "wx/dialog.h"
 #include "wx/filedlg.h"
@@ -30,7 +31,7 @@ IMPLEMENT_CLASS(wxFileDialog, wxDialog)
 // begin wxmac
 
 #if defined(__UNIX__)
-  #include <NavigationServices/Navigation.h>
+  #include <Carbon/Carbon.h>
 #else
   #include <Navigation.h>
 #endif
@@ -73,6 +74,7 @@ NavEventProc(
                #endif
                */
                
+         wxTheApp->MacHandleOneEvent(ioParams->eventData.eventDataParms.event);
        }
 }
 
@@ -210,7 +212,7 @@ static Boolean SameFSSpec(FSSpecPtr spec1, FSSpecPtr spec2)
 // flashing of the button when the key is hit
 
 static pascal Boolean SFGetFolderModalDialogFilter(DialogPtr theDlgPtr, EventRecord *eventRec,
-                                                                                       short *item, Ptr dataPtr)
+                                                                                       short *item, void *dataPtr)
 {
 #pragma unused (dataPtr)
 
@@ -371,7 +373,7 @@ void ExtendedOpenFile( ConstStr255Param message , ConstStr255Param path , const
        }
 }
 
-static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, Ptr dataPtr)
+static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dataPtr)
 {      
        Str255                  filename ;
        OpenUserDataRecPtr data = (OpenUserDataRecPtr) dataPtr ;
@@ -531,7 +533,7 @@ int wxFileDialog::ShowModal()
                }
                else
                {
-                       m_path = wxMacFSSpec2UnixFilename( &reply.sfFile ) ;
+                       m_path = wxMacFSSpec2MacFilename( &reply.sfFile ) ;
                        return wxID_OK ;
                }
        }
@@ -572,7 +574,7 @@ int wxFileDialog::ShowModal()
                }
                else
                {
-                       m_path = wxMacFSSpec2UnixFilename( &reply.sfFile ) ;
+                       m_path = wxMacFSSpec2MacFilename( &reply.sfFile ) ;
                        return wxID_OK ;
                }
        }
@@ -607,7 +609,7 @@ int wxFileDialog::ShowModal()
                //   first appears
                
                FSSpec location ;
-               wxUnixFilename2FSSpec( m_dir , &location ) ;
+               wxMacFilename2FSSpec( m_dir , &location ) ;
                OSErr err = noErr ;
                
                mDefaultLocation.descriptorType = typeNull;
@@ -702,7 +704,7 @@ int wxFileDialog::ShowModal()
 
                                                                
                                // outFolderDirID = thePB.dirInfo.ioDrDirID;
-                               m_path = wxMacFSSpec2UnixFilename( &outFileSpec ) ;
+                               m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ;
                                m_paths.Add( m_path ) ;
                    m_fileNames.Add(m_fileName);
                 }