Don't call setlocale("") on startup by default any longer.
This undoes the changes of r44773 because calling setlocale() resulted in C locale being set differently from C++ locale which was confusing and led to huge slowdowns in any code using std::stream with at least MinGW. And setting the C++ locale to be the same, as r72719 tried to do, doesn't seem to be practical as it results in immediate crashes under OS X and MinGW when used under XP. Do provide wxApp::SetCLocale() helper to explicitly do what was previously done implicitly, even though currently it is a trivial wrapper for setlocale() and we don't even need to call gtk_set_locale() as it has never done anything else and is deprecated since GTK+ 2.24. Closes #14780. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -236,6 +236,18 @@ public:
|
||||
wxEventLoopBase* GetMainLoop() const
|
||||
{ return m_mainLoop; }
|
||||
|
||||
// This function sets the C locale to the default locale for the current
|
||||
// environment. It is advised to call this to ensure that the underlying
|
||||
// toolkit uses the locale in which the numbers and monetary amounts are
|
||||
// shown in the format expected by user and so on.
|
||||
//
|
||||
// Notice that this does _not_ change the global C++ locale, you need to do
|
||||
// it explicitly if you want.
|
||||
//
|
||||
// Finally, notice that while this function is virtual, it is not supposed
|
||||
// to be overridden outside of the library itself.
|
||||
virtual void SetCLocale();
|
||||
|
||||
|
||||
// event processing functions
|
||||
// --------------------------
|
||||
|
@@ -77,12 +77,6 @@ public:
|
||||
// except in the case of wxMac and wxCocoa
|
||||
virtual wxStandardPaths& GetStandardPaths();
|
||||
|
||||
#if wxUSE_INTL
|
||||
// called during wxApp initialization to set the locale to correspond to
|
||||
// the user default (i.e. system locale under Windows, LC_ALL under Unix)
|
||||
virtual void SetLocale();
|
||||
#endif // wxUSE_INTL
|
||||
|
||||
|
||||
// functions abstracting differences between GUI and console modes
|
||||
// ------------------------------------------------------------------------
|
||||
|
@@ -67,10 +67,6 @@ public:
|
||||
#endif
|
||||
virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
|
||||
|
||||
#if defined(__WXGTK__) && wxUSE_INTL
|
||||
virtual void SetLocale();
|
||||
#endif // __WXGTK__
|
||||
|
||||
#ifdef __WXGTK20__
|
||||
virtual wxString GetDesktopEnvironment() const;
|
||||
virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
|
||||
|
Reference in New Issue
Block a user