X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9534d0dfdc3c6fad8ea5d5fd31bbb6f20650929b..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 09a66cf6b1..27e51b8f26 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -5,7 +5,7 @@ // Modified by: // Created: 07.04.98 (adapted from appconf.cpp) // RCS-ID: $Id$ -// Copyright: (c) 1997 Karsten Ballüder & Vadim Zeitlin +// Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin // Ballueder@usa.net // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -46,10 +46,6 @@ #include "wx/stdpaths.h" -#if defined(__WXMAC__) - #include "wx/mac/private.h" // includes mac headers -#endif - #if defined(__WXMSW__) #include "wx/msw/private.h" #endif //windows.h @@ -278,9 +274,9 @@ static void AddConfFileExtIfNeeded(wxFileName& fn) #if defined( __WXMAC__ ) fn.SetName(fn.GetName() + wxT(" Preferences")); #elif defined( __UNIX__ ) - fn.SetExt(wxT(".conf")); + fn.SetExt(wxT("conf")); #else // Windows - fn.SetExt(wxT(".ini")); + fn.SetExt(wxT("ini")); #endif // UNIX/Win } } @@ -315,7 +311,7 @@ wxFileName wxFileConfig::GetLocalFile(const wxString& szFile, int style) { wxFileName fn(GetLocalDir(style), szFile); -#ifdef __UNIX__ +#if defined( __UNIX__ ) && !defined( __WXMAC__ ) if ( !(style & wxCONFIG_USE_SUBDIR) ) { // dot-files under Unix start with, well, a dot (but OTOH they usually @@ -323,7 +319,7 @@ wxFileName wxFileConfig::GetLocalFile(const wxString& szFile, int style) fn.SetName(wxT('.') + fn.GetName()); } else // we do append ".conf" extension to config files in subdirectories -#endif // __UNIX__ +#endif // defined( __UNIX__ ) && !defined( __WXMAC__ ) { AddConfFileExtIfNeeded(fn); } @@ -831,7 +827,7 @@ bool wxFileConfig::HasGroup(const wxString& strName) const const wxString pathOld = GetPath(); - wxFileConfig *self = wx_const_cast(wxFileConfig *, this); + wxFileConfig *self = const_cast(this); const bool rc = self->DoSetPath(strName, false /* don't create missing components */); @@ -854,7 +850,7 @@ bool wxFileConfig::HasEntry(const wxString& entry) const // change to the path of the entry if necessary and remember the old path // to restore it later wxString pathOld; - wxFileConfig * const self = wx_const_cast(wxFileConfig *, this); + wxFileConfig * const self = const_cast(this); if ( !path.empty() ) { pathOld = GetPath(); @@ -1039,7 +1035,7 @@ bool wxFileConfig::Flush(bool /* bCurrentOnly */) ResetDirty(); -#if defined(__WXMAC__) +#if defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON m_fnLocalFile.MacSetTypeAndCreator('TEXT', 'ttxt'); #endif // __WXMAC__ @@ -1682,9 +1678,9 @@ bool wxFileConfigGroup::DeleteSubgroup(wxFileConfigGroup *pGroup) wxLogTrace( FILECONF_TRACE_MASK, _T(" (m_pLine) = prev: %p, this %p, next %p"), - m_pLine ? wx_static_cast(void*, m_pLine->Prev()) : 0, - wx_static_cast(void*, m_pLine), - m_pLine ? wx_static_cast(void*, m_pLine->Next()) : 0 ); + m_pLine ? static_cast(m_pLine->Prev()) : 0, + static_cast(m_pLine), + m_pLine ? static_cast(m_pLine->Next()) : 0 ); wxLogTrace( FILECONF_TRACE_MASK, _T(" text: '%s'"), m_pLine ? (const wxChar*)m_pLine->Text().c_str()