X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/db9febdf4171fdb57434e080f77dca8a02be1cca..2970ae54d3ac3989cd47180229bc7d6cc0f65f51:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 86f141ce63..e25ad4e178 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -33,6 +33,7 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/wxcrtvararg.h" #endif //WX_PRECOMP #include "wx/apptrait.h" @@ -46,6 +47,8 @@ #include // for SIGTRAP used by wxTrap() #endif //Win/Unix +#include + #if wxUSE_FONTMAP #include "wx/fontmap.h" #endif // wxUSE_FONTMAP @@ -146,6 +149,10 @@ wxAppConsole::~wxAppConsole() bool wxAppConsole::Initialize(int& argcOrig, wxChar **argvOrig) { +#if wxUSE_INTL + GetTraits()->SetLocale(); +#endif // wxUSE_INTL + // remember the command line arguments argc = argcOrig; argv = argvOrig; @@ -156,7 +163,7 @@ bool wxAppConsole::Initialize(int& argcOrig, wxChar **argvOrig) // the application name is, by default, the name of its executable file wxFileName::SplitPath(argv[0], NULL, &m_appName, NULL); } -#endif +#endif // !__WXPALMOS__ return true; } @@ -237,27 +244,6 @@ wxAppTraits *wxAppConsole::GetTraits() return m_traits; } -// we must implement CreateXXX() in wxApp itself for backwards compatibility -#if WXWIN_COMPATIBILITY_2_4 - -#if wxUSE_LOG - -wxLog *wxAppConsole::CreateLogTarget() -{ - wxAppTraits *traits = GetTraits(); - return traits ? traits->CreateLogTarget() : NULL; -} - -#endif // wxUSE_LOG - -wxMessageOutput *wxAppConsole::CreateMessageOutput() -{ - wxAppTraits *traits = GetTraits(); - return traits ? traits->CreateMessageOutput() : NULL; -} - -#endif // WXWIN_COMPATIBILITY_2_4 - // ---------------------------------------------------------------------------- // event processing // ---------------------------------------------------------------------------- @@ -453,15 +439,6 @@ void wxAppConsole::OnAssert(const wxChar *file, #endif // __WXDEBUG__ -#if WXWIN_COMPATIBILITY_2_4 - -bool wxAppConsole::CheckBuildOptions(const wxBuildOptions& buildOptions) -{ - return CheckBuildOptions(buildOptions.m_signature, "your program"); -} - -#endif - // ============================================================================ // other classes implementations // ============================================================================ @@ -533,6 +510,14 @@ GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable() // wxAppTraits // ---------------------------------------------------------------------------- +#if wxUSE_INTL +void wxAppTraitsBase::SetLocale() +{ + setlocale(LC_ALL, ""); + wxUpdateLocaleIsUtf8(); +} +#endif + #ifdef __WXDEBUG__ bool wxAppTraitsBase::ShowAssertDialog(const wxString& msgOriginal)