allow using both char* and wchar_t* in wxFileConfig and wxConfigBase, too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-03-01 20:03:50 +00:00
parent 914e69451f
commit 1c8c91463f
3 changed files with 13 additions and 9 deletions

View File

@@ -328,12 +328,12 @@ wxString wxFileConfig::GetLocalDir()
return strDir;
}
wxString wxFileConfig::GetGlobalFileName(const wxChar *szFile)
wxString wxFileConfig::GetGlobalFileName(const wxString& file)
{
wxString str = GetGlobalDir();
str << szFile;
str << file;
if ( wxStrchr(szFile, wxT('.')) == NULL )
if ( wxStrchr(file, wxT('.')) == NULL )
#if defined( __WXMAC__ )
str << wxT(" Preferences") ;
#elif defined( __UNIX__ )
@@ -345,7 +345,7 @@ wxString wxFileConfig::GetGlobalFileName(const wxChar *szFile)
return str;
}
wxString wxFileConfig::GetLocalFileName(const wxChar *szFile)
wxString wxFileConfig::GetLocalFileName(const wxString& file)
{
#ifdef __VMS__
// On VMS I saw the problem that the home directory was appended
@@ -360,10 +360,10 @@ wxString wxFileConfig::GetLocalFileName(const wxChar *szFile)
str << wxT('.');
#endif
str << szFile;
str << file;
#if defined(__WINDOWS__) || defined(__DOS__)
if ( wxStrchr(szFile, wxT('.')) == NULL )
if ( wxStrchr(file, wxT('.')) == NULL )
str << wxT(".ini");
#endif