Replace references to wxLocale by wxUILocale

Use newer wxUILocale class directly instead of using wxLocale functions
that forward to it anyhow.

No real changes.

Closes #22375.
This commit is contained in:
utelle
2022-04-29 09:19:58 +02:00
committed by Vadim Zeitlin
parent a7791781d9
commit 1c65e88221
10 changed files with 37 additions and 35 deletions

View File

@@ -26,6 +26,7 @@
#include "wx/filename.h"
#include "wx/textfile.h"
#include "wx/generic/helpext.h"
#include "wx/uilocale.h"
#include <stdio.h>
#include <ctype.h>
@@ -220,10 +221,10 @@ bool wxExtHelpController::LoadFile(const wxString& file)
// "/usr/local/myapp/help" and the current wxLocale is set to be "de", then
// look in "/usr/local/myapp/help/de/" first and fall back to
// "/usr/local/myapp/help" if that doesn't exist.
const wxLocale * const loc = wxGetLocale();
if ( loc )
wxLocaleIdent locId = wxUILocale::GetCurrent().GetLocaleId();
if ( !locId.IsEmpty() )
{
wxString locName = loc->GetName();
wxString locName = locId.GetTag(wxLOCALE_TAGTYPE_POSIX);
// the locale is in general of the form xx_YY.zzzz, try the full firm
// first and then also more general ones