mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Fix building with wxUSE_INTL disabled
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#ifndef _WX_MSW_PRIVATE_UILOCALE_H_
|
||||
#define _WX_MSW_PRIVATE_UILOCALE_H_
|
||||
|
||||
#if wxUSE_INTL
|
||||
|
||||
#include "wx/msw/private.h" // Include <windows.h> to get LCID.
|
||||
|
||||
#ifndef LOCALE_SNAME
|
||||
@@ -23,4 +25,6 @@ WXDLLIMPEXP_BASE wxString wxTranslateFromUnicodeFormat(const wxString& fmt);
|
||||
|
||||
WXDLLIMPEXP_BASE wxString wxGetMSWDateTimeFormat(wxLocaleInfo index);
|
||||
|
||||
#endif // wxUSE_INTL
|
||||
|
||||
#endif // _WX_MSW_PRIVATE_UILOCALE_H_
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#ifndef _WX_PRIVATE_UILOCALE_H_
|
||||
#define _WX_PRIVATE_UILOCALE_H_
|
||||
|
||||
#if wxUSE_INTL
|
||||
|
||||
#include "wx/localedefs.h"
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
@@ -145,4 +147,6 @@ public:
|
||||
static bool SameRegionGroup(const wxString& language, const wxString& desiredRegion, const wxString& supportedRegion);
|
||||
};
|
||||
|
||||
#endif // wxUSE_INTL
|
||||
|
||||
#endif // _WX_PRIVATE_UILOCALE_H_
|
||||
|
||||
@@ -173,6 +173,8 @@ void wxNumberFormatter::AddThousandsSeparators(wxString& s, int style)
|
||||
grouping = numForm.grouping;
|
||||
decimalSeparator = numForm.decimalSeparator;
|
||||
}
|
||||
#else
|
||||
wxUnusedVar(style);
|
||||
#endif // wxUSE_INTL
|
||||
|
||||
if (groupingSeparator.empty() )
|
||||
@@ -320,8 +322,8 @@ void wxNumberFormatter::AddCurrency(wxString& s, int style)
|
||||
}
|
||||
}
|
||||
#else
|
||||
wxUnused(s);
|
||||
wxUnused(style);
|
||||
wxUnusedVar(s);
|
||||
wxUnusedVar(style);
|
||||
#endif // wxUSE_INTL
|
||||
}
|
||||
|
||||
@@ -372,7 +374,7 @@ wxString wxNumberFormatter::RemoveCurrencySymbolOrCode(wxString s, int style)
|
||||
}
|
||||
return s;
|
||||
#else
|
||||
wxUnused(style);
|
||||
wxUnusedVar(style);
|
||||
return s;
|
||||
#endif // wxUSE_INTL
|
||||
}
|
||||
|
||||
@@ -80,6 +80,8 @@ wxDateTimePickerCtrl::MSWCreateDateTimePicker(wxWindow *parent,
|
||||
return true;
|
||||
}
|
||||
|
||||
#if wxUSE_INTL
|
||||
|
||||
void wxDateTimePickerCtrl::MSWSetTimeFormat(wxLocaleInfo index)
|
||||
{
|
||||
const wxString format = wxGetMSWDateTimeFormat(index);
|
||||
@@ -90,6 +92,8 @@ void wxDateTimePickerCtrl::MSWSetTimeFormat(wxLocaleInfo index)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_INTL
|
||||
|
||||
void wxDateTimePickerCtrl::SetValue(const wxDateTime& dt)
|
||||
{
|
||||
wxCHECK_RET( dt.IsValid() || MSWAllowsNone(),
|
||||
|
||||
@@ -98,6 +98,9 @@
|
||||
// For wxCmpNatural()
|
||||
#include <shlwapi.h>
|
||||
|
||||
// For std::unique_ptr
|
||||
#include <memory>
|
||||
|
||||
// In some distributions of MinGW32, this function is exported in the library,
|
||||
// but not declared in shlwapi.h. Therefore we declare it here.
|
||||
#if defined( __MINGW32_TOOLCHAIN__ )
|
||||
|
||||
@@ -264,7 +264,9 @@ public:
|
||||
m_dataPath = wxStandardPaths::Get().GetUserLocalDataDir();
|
||||
#ifdef __VISUALC__
|
||||
m_webViewEnvironmentOptions = Make<CoreWebView2EnvironmentOptions>().Get();
|
||||
#if wxUSE_INTL
|
||||
m_webViewEnvironmentOptions->put_Language(wxUILocale::GetCurrent().GetLocaleId().GetName().wc_str());
|
||||
#endif
|
||||
|
||||
wxCOMPtr<ICoreWebView2EnvironmentOptions3> options3;
|
||||
if (SUCCEEDED(m_webViewEnvironmentOptions->QueryInterface(IID_PPV_ARGS(&options3))))
|
||||
|
||||
Reference in New Issue
Block a user