Fixed some duff #ifdefs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -35,7 +35,7 @@ enum { wxFONTENCODING_UNKNOWN = -2 };
|
|||||||
// wxFontMapperPathChanger: change the config path during our lifetime
|
// wxFontMapperPathChanger: change the config path during our lifetime
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
|
|
||||||
class wxFontMapperPathChanger
|
class wxFontMapperPathChanger
|
||||||
{
|
{
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "wx/fontutil.h" // for wxNativeEncodingInfo
|
#include "wx/fontutil.h" // for wxNativeEncodingInfo
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
class WXDLLIMPEXP_BASE wxConfigBase;
|
class WXDLLIMPEXP_BASE wxConfigBase;
|
||||||
#endif // wxUSE_CONFIG
|
#endif // wxUSE_CONFIG
|
||||||
|
|
||||||
@@ -62,10 +62,9 @@ public:
|
|||||||
// return instance of the wxFontMapper singleton
|
// return instance of the wxFontMapper singleton
|
||||||
static wxFontMapper *Get();
|
static wxFontMapper *Get();
|
||||||
|
|
||||||
// set the sigleton to 'mapper' instance and return previous one
|
// set the singleton to 'mapper' instance and return previous one
|
||||||
static wxFontMapper *Set(wxFontMapper *mapper);
|
static wxFontMapper *Set(wxFontMapper *mapper);
|
||||||
|
|
||||||
|
|
||||||
// translates charset strings to encoding
|
// translates charset strings to encoding
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
|
|
||||||
@@ -77,7 +76,6 @@ public:
|
|||||||
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
|
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
|
||||||
bool interactive = true);
|
bool interactive = true);
|
||||||
|
|
||||||
|
|
||||||
// information about supported encodings
|
// information about supported encodings
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|
||||||
@@ -103,7 +101,7 @@ public:
|
|||||||
// GetDefaultConfigPath()
|
// GetDefaultConfigPath()
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// set the config object to use (may be NULL to use default)
|
// set the config object to use (may be NULL to use default)
|
||||||
void SetConfig(wxConfigBase *config) { m_config = config; }
|
void SetConfig(wxConfigBase *config) { m_config = config; }
|
||||||
|
|
||||||
@@ -116,7 +114,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// get the config object we're using -- if it wasn't set explicitly, this
|
// get the config object we're using -- if it wasn't set explicitly, this
|
||||||
// function will use wxConfig::Get() to get the global one
|
// function will use wxConfig::Get() to get the global one
|
||||||
wxConfigBase *GetConfig();
|
wxConfigBase *GetConfig();
|
||||||
|
@@ -353,6 +353,8 @@ void wxFontMapperBase::RestorePath(const wxString& pathOld)
|
|||||||
GetConfig()->SetPath(pathOld);
|
GetConfig()->SetPath(pathOld);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// charset/encoding correspondence
|
// charset/encoding correspondence
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -642,7 +644,5 @@ wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding)
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_CONFIG
|
|
||||||
|
|
||||||
#endif // wxUSE_FONTMAP
|
#endif // wxUSE_FONTMAP
|
||||||
|
|
||||||
|
@@ -153,7 +153,7 @@ wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive)
|
|||||||
encoding = GetEncoding(n);
|
encoding = GetEncoding(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// save the result in the config now
|
// save the result in the config now
|
||||||
wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH);
|
wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH);
|
||||||
if ( path.IsOk() )
|
if ( path.IsOk() )
|
||||||
@@ -187,7 +187,7 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry,
|
|||||||
if ( wxGetNativeFontEncoding(encReplacement, info) &&
|
if ( wxGetNativeFontEncoding(encReplacement, info) &&
|
||||||
wxTestFontEncoding(*info) )
|
wxTestFontEncoding(*info) )
|
||||||
{
|
{
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// remember the mapping in the config
|
// remember the mapping in the config
|
||||||
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
|
|||||||
}
|
}
|
||||||
configEntry += encName;
|
configEntry += encName;
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// do we have a font spec for this encoding?
|
// do we have a font spec for this encoding?
|
||||||
wxString fontinfo;
|
wxString fontinfo;
|
||||||
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
||||||
@@ -365,7 +365,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
|
|||||||
*info = retData.EncodingInfo();
|
*info = retData.EncodingInfo();
|
||||||
info->encoding = retData.GetEncoding();
|
info->encoding = retData.GetEncoding();
|
||||||
|
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
// remember this in the config
|
// remember this in the config
|
||||||
wxFontMapperPathChanger path(this,
|
wxFontMapperPathChanger path(this,
|
||||||
FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
||||||
@@ -385,7 +385,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding,
|
|||||||
// or selected to use equivalent encoding
|
// or selected to use equivalent encoding
|
||||||
//
|
//
|
||||||
// remember it to avoid asking the same question again later
|
// remember it to avoid asking the same question again later
|
||||||
#if wxUSE_CONFIG
|
#if wxUSE_CONFIG && wxUSE_FILECONFIG
|
||||||
wxFontMapperPathChanger path(this,
|
wxFontMapperPathChanger path(this,
|
||||||
FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
FONTMAPPER_FONT_FROM_ENCODING_PATH);
|
||||||
if ( path.IsOk() )
|
if ( path.IsOk() )
|
||||||
|
Reference in New Issue
Block a user