FSRef transition

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28878 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-08-24 19:39:50 +00:00
parent f81f59012d
commit a2b772607a
14 changed files with 303 additions and 855 deletions

View File

@@ -997,19 +997,23 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */)
bool ret = file.Commit();
#if defined(__WXMAC__)
if ( ret )
{
FSSpec spec ;
wxMacFilename2FSSpec( m_strLocalFile , &spec ) ;
FInfo finfo ;
if ( FSpGetFInfo( &spec , &finfo ) == noErr )
{
finfo.fdType = 'TEXT' ;
finfo.fdCreator = 'ttxt' ;
FSpSetFInfo( &spec , &finfo ) ;
}
}
if ( ret )
{
FSRef fsRef ;
FSCatalogInfo catInfo;
FileInfo *finfo ;
if ( wxMacPathToFSRef( m_strLocalFile , &fsRef ) == noErr )
{
if ( FSGetCatalogInfo (&fsRef, kFSCatInfoFinderInfo, &catInfo, NULL, NULL, NULL) == noErr )
{
finfo = (FileInfo*)&catInfo.finderInfo;
finfo->fileType = 'TEXT' ;
finfo->fileCreator = 'ttxt' ;
FSSetCatalogInfo( &fsRef, kFSCatInfoFinderInfo, &catInfo ) ;
}
}
}
#endif // __WXMAC__
#ifdef __UNIX__