X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1114902acfc811899037b4748deb0569a7230606..77c8efc8c37da6d6a5e2e8022d21d1cd7d76371d:/src/common/appbase.cpp?ds=sidebyside diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 57e0912e2e..6f2caafc55 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -47,10 +47,15 @@ #include "wx/tokenzr.h" #include "wx/thread.h" -#if wxUSE_EXCEPTIONS && wxUSE_STL - #include - #include -#endif +#if wxUSE_STL + #if wxUSE_EXCEPTIONS + #include + #include + #endif + #if wxUSE_INTL + #include + #endif +#endif // wxUSE_STL #if !defined(__WINDOWS__) || defined(__WXMICROWIN__) #include // for SIGTRAP used by wxTrap() @@ -169,10 +174,6 @@ wxAppConsoleBase::~wxAppConsoleBase() bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv)) { -#if wxUSE_INTL - GetTraits()->SetLocale(); -#endif // wxUSE_INTL - return true; } @@ -779,6 +780,18 @@ void wxAppConsoleBase::OnAssert(const wxChar *file, OnAssertFailure(file, line, NULL, cond, msg); } +// ---------------------------------------------------------------------------- +// Miscellaneous other methods +// ---------------------------------------------------------------------------- + +void wxAppConsoleBase::SetCLocale() +{ + // We want to use the user locale by default in GUI applications in order + // to show the numbers, dates &c in the familiar format -- and also accept + // this format on input (especially important for decimal comma/dot). + wxSetlocale(LC_ALL, ""); +} + // ============================================================================ // other classes implementations // ============================================================================ @@ -831,14 +844,6 @@ bool wxConsoleAppTraitsBase::HasStderr() // wxAppTraits // ---------------------------------------------------------------------------- -#if wxUSE_INTL -void wxAppTraitsBase::SetLocale() -{ - wxSetlocale(LC_ALL, ""); - wxUpdateLocaleIsUtf8(); -} -#endif - #if wxUSE_THREADS void wxMutexGuiEnterImpl(); void wxMutexGuiLeaveImpl();