1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-09 16:41:14 +02:00

Second attempt at fixing bug #947

This commit is contained in:
Leland Lucius 2015-05-26 01:52:54 -05:00
parent 8a4424a1ae
commit 46a4c4d84d
2 changed files with 6 additions and 4 deletions

View File

@ -966,7 +966,9 @@ void AudacityApp::InitLang( const wxString & lang )
//
// 2013-09-13: I've checked this again and it is still required. Still
// no idea why.
#if defined(__WXMAC__)
// 2015-05-26: Disabled the hack since it prevents use of locale specific
// formatting (like comma as decimal separator).
#if defined(__WXMAC__disabled)
wxString oldval;
bool existed;
@ -980,7 +982,7 @@ void AudacityApp::InitLang( const wxString & lang )
mLocale = new wxLocale(wxT(""), lang, wxT(""), true, true);
#endif
#if defined(__WXMAC__)
#if defined(__WXMAC__disabled)
if (existed) {
wxSetEnv(wxT("LANG"), oldval);
}

4
src/widgets/numformatter.cpp Normal file → Executable file
View File

@ -120,7 +120,7 @@ private:
wxChar NumberFormatter::GetDecimalSeparator()
{
#if defined(WE_DO_NOT_CHANGE_THE_LOCALE_SO_PERIOD_IS_ALWAYS_THE_SEPERATOR) //wxUSE_INTL
#if wxUSE_INTL
// Notice that while using static variable here is not MT-safe, the worst
// that can happen is that we redo the initialization if we're called
// concurrently from more than one thread so it's not a real problem.
@ -158,7 +158,7 @@ wxChar NumberFormatter::GetDecimalSeparator()
bool NumberFormatter::GetThousandsSeparatorIfUsed(wxChar *sep)
{
#if defined(WE_DO_NOT_CHANGE_THE_LOCALE_SO_NO_SEPERATOR) //wxUSE_INTL
#if wxUSE_INTL
static wxChar s_thousandsSeparator = 0;
static LocaleId s_localeUsedForInit;