From: Vadim Zeitlin Date: Wed, 3 Nov 2010 16:29:13 +0000 (+0000) Subject: Handle wxLOCALE_DECIMAL_POINT in wxLOCALE_CAT_MONEY correctly in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/53250e3afa6dfd89b4a7aadbc907745ef2892849 Handle wxLOCALE_DECIMAL_POINT in wxLOCALE_CAT_MONEY correctly in wxMSW. Use LOCALE_SMONDECIMALSEP and not LOCALE_SDECIMAL when querying for the decimal separator in money category, it can be different from the usual numeric one. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 9fa0ee8f8f..14b2469f3e 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -1407,7 +1407,7 @@ LCTYPE GetLCTYPEFormatFromLocalInfo(wxLocaleInfo index) } // anonymous namespace /* static */ -wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat)) +wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory cat) { wxUint32 lcid = LOCALE_USER_DEFAULT; if ( wxGetLocale() ) @@ -1431,7 +1431,12 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat)) break; case wxLOCALE_DECIMAL_POINT: - if ( ::GetLocaleInfo(lcid, LOCALE_SDECIMAL, buf, WXSIZEOF(buf)) ) + if ( ::GetLocaleInfo(lcid, + cat == wxLOCALE_CAT_MONEY + ? LOCALE_SMONDECIMALSEP + : LOCALE_SDECIMAL, + buf, + WXSIZEOF(buf)) ) str = buf; break;