projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unicode fixes
[wxWidgets.git]
/
src
/
common
/
config.cpp
diff --git
a/src/common/config.cpp
b/src/common/config.cpp
index fc96bb57f6e5a423ea7296503739cc86f46dc621..6ad92636937cde58d335a207b72c2859d7a4375d 100644
(file)
--- a/
src/common/config.cpp
+++ b/
src/common/config.cpp
@@
-23,7
+23,11
@@
#pragma hdrstop
#endif //__BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
-#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || defined(wxCONFIG_WIN32_NATIVE))
+#ifndef wxUSE_CONFIG_NATIVE
+ #define wxUSE_CONFIG_NATIVE 1
+#endif
+
+#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/app.h"
#include "wx/file.h"
#include "wx/app.h"
#include "wx/file.h"
@@
-75,7
+79,7
@@
wxConfigBase *wxConfigBase::Create()
{
if ( ms_bAutoCreate && ms_pConfig == NULL ) {
ms_pConfig =
{
if ( ms_bAutoCreate && ms_pConfig == NULL ) {
ms_pConfig =
- #if defined(__WXMSW__) &&
defined(wxCONFIG_WIN32_NATIVE)
+ #if defined(__WXMSW__) &&
wxUSE_CONFIG_NATIVE
#ifdef __WIN32__
new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
#else //WIN16
#ifdef __WIN32__
new wxRegConfig(wxTheApp->GetAppName(), wxTheApp->GetVendorName());
#else //WIN16
@@
-186,7
+190,7
@@
bool wxConfigBase::Read(const wxString& key, int *pi, int defVal) const
bool wxConfigBase::Write(const wxString& key, double val)
{
wxString str;
bool wxConfigBase::Write(const wxString& key, double val)
{
wxString str;
- str.Printf(
_
T("%f"), val);
+ str.Printf(
wx
T("%f"), val);
return Write(key, str);
}
return Write(key, str);
}
@@
-196,6
+200,11
@@
bool wxConfigBase::Write(const wxString& key, bool value)
return Write(key, l);
}
return Write(key, l);
}
+bool wxConfigBase::Write( const wxString &key, const wxChar *text )
+{
+ wxString str( text ) ;
+ return Write( key, str ) ;
+}
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
wxString tmp; // Required for BC++
wxString wxConfigBase::ExpandEnvVars(const wxString& str) const
{
wxString tmp; // Required for BC++
@@
-371,11
+380,11
@@
void wxSplitPath(wxArrayString& aParts, const wxChar *sz)
wxString strCurrent;
const wxChar *pc = sz;
for ( ;; ) {
wxString strCurrent;
const wxChar *pc = sz;
for ( ;; ) {
- if ( *pc ==
_
T('\0') || *pc == wxCONFIG_PATH_SEPARATOR ) {
- if ( strCurrent ==
_
T(".") ) {
+ if ( *pc ==
wx
T('\0') || *pc == wxCONFIG_PATH_SEPARATOR ) {
+ if ( strCurrent ==
wx
T(".") ) {
// ignore
}
// ignore
}
- else if ( strCurrent ==
_
T("..") ) {
+ else if ( strCurrent ==
wx
T("..") ) {
// go up one level
if ( aParts.IsEmpty() )
wxLogWarning(_("'%s' has extra '..', ignored."), sz);
// go up one level
if ( aParts.IsEmpty() )
wxLogWarning(_("'%s' has extra '..', ignored."), sz);
@@
-391,7
+400,7
@@
void wxSplitPath(wxArrayString& aParts, const wxChar *sz)
//else:
// could log an error here, but we prefer to ignore extra '/'
//else:
// could log an error here, but we prefer to ignore extra '/'
- if ( *pc ==
_
T('\0') )
+ if ( *pc ==
wx
T('\0') )
return;
}
else
return;
}
else