X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..f98bd6d6cf33f0475b5d737a2968b42b7ea0009f:/src/mac/carbon/filedlg.cpp diff --git a/src/mac/carbon/filedlg.cpp b/src/mac/carbon/filedlg.cpp index dcc70f4bdb..9e73bcf2d3 100644 --- a/src/mac/carbon/filedlg.cpp +++ b/src/mac/carbon/filedlg.cpp @@ -17,9 +17,9 @@ #include "wx/intl.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/dialog.h" #endif -#include "wx/dialog.h" #include "wx/tokenzr.h" #include "wx/filename.h" @@ -30,12 +30,8 @@ #include "PLStringFuncs.h" #endif -#include "MoreFilesX.h" - IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase) -extern bool gUseNavServices; - // the data we need to pass to our standard file hook routine // includes a pointer to the dialog, a pointer to the standard // file reply record (so we can inspect the current selection) @@ -135,7 +131,7 @@ void MakeUserDataRec(OpenUserDataRec *myData , const wxString& filter ) bool isName = true ; wxString current ; - for ( unsigned int i = 0; i < filter2.Len() ; i++ ) + for ( unsigned int i = 0; i < filter2.length() ; i++ ) { if ( filter2.GetChar(i) == wxT('|') ) { @@ -215,7 +211,7 @@ static Boolean CheckFile( const wxString &filename , OSType type , OpenUserDataR if ( extension.GetChar(0) == '*' ) extension = extension.Mid(1) ; - if ( file.Len() >= extension.Len() && extension == file.Right(extension.Len() ) ) + if ( file.length() >= extension.length() && extension == file.Right(extension.length() ) ) return true ; } } @@ -259,8 +255,8 @@ static pascal Boolean CrossPlatformFileFilter(CInfoPBPtr myCInfoPBPtr, void *dat wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message, const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, - long style, const wxPoint& pos) - : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos) + long style, const wxPoint& pos, const wxSize& sz, const wxString& name) + : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name) { wxASSERT_MSG( NavServicesAvailable() , wxT("Navigation Services are not running") ) ; } @@ -319,7 +315,6 @@ int wxFileDialog::ShowModal() NavDialogRef dialog; NavObjectFilterUPP navFilterUPP = NULL; - CFArrayRef cfArray = NULL; // for popupExtension OpenUserDataRec myData; myData.defaultLocation = m_dir; @@ -338,7 +333,7 @@ int wxFileDialog::ShowModal() } } - if (m_dialogStyle & wxSAVE) + if (HasFlag(wxFD_SAVE)) { myData.saveMode = true; @@ -352,7 +347,7 @@ int wxFileDialog::ShowModal() dialogCreateOptions.optionFlags |= kNavPreserveSaveFileExtension; #if TARGET_API_MAC_OSX - if (!(m_dialogStyle & wxOVERWRITE_PROMPT)) + if (!(m_windowStyle & wxFD_OVERWRITE_PROMPT)) dialogCreateOptions.optionFlags |= kNavDontConfirmReplacement; #endif @@ -386,8 +381,6 @@ int wxFileDialog::ShowModal() // clean up filter related data, etc. if (navFilterUPP) ::DisposeNavObjectFilterUPP(navFilterUPP); - if (cfArray) - ::CFRelease(cfArray); if (err != noErr) return wxID_CANCEL; @@ -413,7 +406,7 @@ int wxFileDialog::ShowModal() if (err != noErr) break; - if (m_dialogStyle & wxSAVE) + if (HasFlag(wxFD_SAVE)) thePath = wxMacFSRefToPath( &theFSRef, navReply.saveFileName ); else thePath = wxMacFSRefToPath( &theFSRef );