From 24fe8dc7f8f5426de2fb748b97c79e52b60db89d Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 10 Apr 2002 06:07:18 +0000 Subject: [PATCH] removed code (not necessary anymore) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/filedlg.cpp | 39 +++++++++----------------------------- src/mac/filedlg.cpp | 39 +++++++++----------------------------- 2 files changed, 18 insertions(+), 60 deletions(-) diff --git a/src/mac/carbon/filedlg.cpp b/src/mac/carbon/filedlg.cpp index 15771305be..bdcbdbe2c9 100644 --- a/src/mac/carbon/filedlg.cpp +++ b/src/mac/carbon/filedlg.cpp @@ -491,38 +491,17 @@ int wxFileDialog::ShowModal() if (specDesc.dataHandle != nil) { ::AEDisposeDesc(&specDesc); } -#ifdef __DARWIN__ - FSRef fsr ; - err = FSpMakeFSRef( &outFileSpec , &fsr ) ; - if ( err == fnfErr ) - { - FSSpec fss ; - err = FSMakeFSSpec( outFileSpec.vRefNum , outFileSpec.parID, "\p" , &fss ) ; - err = FSpMakeFSRef( &fss , &fsr ) ; - char path[256] ; - err = FSRefMakePath( &fsr , (unsigned char*) path , sizeof(path) ) ; - strcat( path , "/" ) ; - p2cstr( outFileSpec.name ) ; - strcat( path , (char*) outFileSpec.name ) ; - m_path = path ; - } - else - { - m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ; - } -#else m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ; -#endif m_paths.Add( m_path ) ; - m_fileName = wxFileNameFromPath(m_path); - m_fileNames.Add(m_fileName); - } - // set these to the first hit - m_path = m_paths[ 0 ] ; - m_fileName = wxFileNameFromPath(m_path); - m_dir = wxPathOnly(m_path); - NavDisposeReply( &mNavReply ) ; - return wxID_OK ; + m_fileName = wxFileNameFromPath(m_path); + m_fileNames.Add(m_fileName); + } + // set these to the first hit + m_path = m_paths[ 0 ] ; + m_fileName = wxFileNameFromPath(m_path); + m_dir = wxPathOnly(m_path); + NavDisposeReply( &mNavReply ) ; + return wxID_OK ; } return wxID_CANCEL; } diff --git a/src/mac/filedlg.cpp b/src/mac/filedlg.cpp index 15771305be..bdcbdbe2c9 100644 --- a/src/mac/filedlg.cpp +++ b/src/mac/filedlg.cpp @@ -491,38 +491,17 @@ int wxFileDialog::ShowModal() if (specDesc.dataHandle != nil) { ::AEDisposeDesc(&specDesc); } -#ifdef __DARWIN__ - FSRef fsr ; - err = FSpMakeFSRef( &outFileSpec , &fsr ) ; - if ( err == fnfErr ) - { - FSSpec fss ; - err = FSMakeFSSpec( outFileSpec.vRefNum , outFileSpec.parID, "\p" , &fss ) ; - err = FSpMakeFSRef( &fss , &fsr ) ; - char path[256] ; - err = FSRefMakePath( &fsr , (unsigned char*) path , sizeof(path) ) ; - strcat( path , "/" ) ; - p2cstr( outFileSpec.name ) ; - strcat( path , (char*) outFileSpec.name ) ; - m_path = path ; - } - else - { - m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ; - } -#else m_path = wxMacFSSpec2MacFilename( &outFileSpec ) ; -#endif m_paths.Add( m_path ) ; - m_fileName = wxFileNameFromPath(m_path); - m_fileNames.Add(m_fileName); - } - // set these to the first hit - m_path = m_paths[ 0 ] ; - m_fileName = wxFileNameFromPath(m_path); - m_dir = wxPathOnly(m_path); - NavDisposeReply( &mNavReply ) ; - return wxID_OK ; + m_fileName = wxFileNameFromPath(m_path); + m_fileNames.Add(m_fileName); + } + // set these to the first hit + m_path = m_paths[ 0 ] ; + m_fileName = wxFileNameFromPath(m_path); + m_dir = wxPathOnly(m_path); + NavDisposeReply( &mNavReply ) ; + return wxID_OK ; } return wxID_CANCEL; } -- 2.47.2