From 8bf6668ff3d8625cb74edbe1eb3cbeca3947006a Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sun, 19 Jul 2015 17:38:31 -0500 Subject: [PATCH] wxLocale constructor we used has been deprecated And it doesn't do all of the same initialization as the new one, so we get assertions on Windows (not sure why the other two didn't complain). Warning in wx302 manual says: Deprecated: This form is deprecated, use the other one unless you know what you are doing. So, best to use the new one. This DOES mean that we WILL have to testing locales again which is fine cause we had some work to do there anyway. --- src/AudacityApp.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index afd884738..90c621598 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1021,11 +1021,12 @@ void AudacityApp::InitLang( const wxString & lang ) wxSetEnv(wxT("LANG"), wxT("en_US.UTF-8")); #endif -#if wxCHECK_VERSION(3,0,0) - mLocale = new wxLocale(wxT(""), lang, wxT(""), true); -#else - mLocale = new wxLocale(wxT(""), lang, wxT(""), true, true); -#endif + const wxLanguageInfo *info = wxLocale::FindLanguageInfo(lang); + if (!lang) + { + return; + } + mLocale = new wxLocale(info->Language); for(unsigned int i=0; iAddCatalogLookupPathPrefix(audacityPathList[i]);