]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
supporting text foreground color, fixes #11903
[wxWidgets.git] / src / common / intl.cpp
index ff680307afab4cf01e3c77e45b662991b80e22b8..0638da4e9548aa915e2ef1510706762647989cad 100644 (file)
@@ -70,7 +70,6 @@
 #include "wx/apptrait.h"
 #include "wx/stdpaths.h"
 #include "wx/hashset.h"
 #include "wx/apptrait.h"
 #include "wx/stdpaths.h"
 #include "wx/hashset.h"
-#include "wx/filesys.h"
 
 #if defined(__WXOSX__)
     #include "wx/osx/core/cfref.h"
 
 #if defined(__WXOSX__)
     #include "wx/osx/core/cfref.h"
@@ -1190,12 +1189,7 @@ bool wxMsgCatalogFile::Load(const wxString& szDirPrefix, const wxString& szName,
     fn.SetExt(wxS("mo"));
 
     wxString strFullName;
     fn.SetExt(wxS("mo"));
 
     wxString strFullName;
-#if wxUSE_FILESYSTEM
-    wxFileSystem fileSys;
-    if ( !fileSys.FindFileInPath(&strFullName, searchPath, fn.GetFullPath()) )
-#else // !wxUSE_FILESYSTEM
     if ( !wxFindFileInPath(&strFullName, searchPath, fn.GetFullPath()) )
     if ( !wxFindFileInPath(&strFullName, searchPath, fn.GetFullPath()) )
-#endif // wxUSE_FILESYSTEM/!wxUSE_FILESYSTEM
     {
         wxLogVerbose(_("catalog file for domain '%s' not found."), szName);
         wxLogTrace(TRACE_I18N, wxS("Catalog \"%s.mo\" not found"), szName);
     {
         wxLogVerbose(_("catalog file for domain '%s' not found."), szName);
         wxLogTrace(TRACE_I18N, wxS("Catalog \"%s.mo\" not found"), szName);
@@ -1206,22 +1200,6 @@ bool wxMsgCatalogFile::Load(const wxString& szDirPrefix, const wxString& szName,
     wxLogVerbose(_("using catalog '%s' from '%s'."), szName, strFullName.c_str());
     wxLogTrace(TRACE_I18N, wxS("Using catalog \"%s\"."), strFullName.c_str());
 
     wxLogVerbose(_("using catalog '%s' from '%s'."), szName, strFullName.c_str());
     wxLogTrace(TRACE_I18N, wxS("Using catalog \"%s\"."), strFullName.c_str());
 
-#if wxUSE_FILESYSTEM
-    wxFSFile * const fileMsg = fileSys.OpenFile(strFullName);
-    if ( !fileMsg )
-        return false;
-
-    wxInputStream *fileStream = fileMsg->GetStream();
-    m_data.SetDataLen(0);
-
-    static const size_t chunkSize = 4096;
-    while ( !fileStream->Eof() ) {
-        fileStream->Read(m_data.GetAppendBuf(chunkSize), chunkSize);
-        m_data.UngetAppendBuf(fileStream->LastRead());
-    }
-
-    delete fileMsg;
-#else // !wxUSE_FILESYSTEM
     wxFile fileMsg(strFullName);
     if ( !fileMsg.IsOpened() )
         return false;
     wxFile fileMsg(strFullName);
     if ( !fileMsg.IsOpened() )
         return false;
@@ -1239,7 +1217,6 @@ bool wxMsgCatalogFile::Load(const wxString& szDirPrefix, const wxString& szName,
         return false;
 
     m_data.UngetWriteBuf(nSize);
         return false;
 
     m_data.UngetWriteBuf(nSize);
-#endif // wxUSE_FILESYSTEM/!wxUSE_FILESYSTEM
 
 
     // examine header
 
 
     // examine header
@@ -3097,6 +3074,8 @@ wxString GetDateFormatFromLangInfo(wxLocaleInfo index)
 
     return fmtDateOnly;
 #else // !HAVE_LANGINFO_H
 
     return fmtDateOnly;
 #else // !HAVE_LANGINFO_H
+    wxUnusedVar(index);
+
     // no fallback, let the application deal with unavailability of
     // nl_langinfo() itself as there is no good way for us to do it (well, we
     // could try to reverse engineer the format from strftime() output but this
     // no fallback, let the application deal with unavailability of
     // nl_langinfo() itself as there is no good way for us to do it (well, we
     // could try to reverse engineer the format from strftime() output but this