Hopefully fix build with the older wxWidgets use for old macOS.
authorCarl Hetherington <cth@carlh.net>
Wed, 10 Apr 2024 12:29:13 +0000 (14:29 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 10 Apr 2024 12:29:13 +0000 (14:29 +0200)
src/wx/wx_util.cc

index 4af13b52a9d83a7386c49b0765f6803bd61883b7..4e6c03dcad4811265def2f78e1e6e15fb3e18655 100644 (file)
@@ -45,9 +45,6 @@ LIBDCP_DISABLE_WARNINGS
 #include <wx/sizer.h>
 #include <wx/spinctrl.h>
 #include <wx/splash.h>
-#ifdef DCPOMATIC_OSX
-#include <wx/uilocale.h>
-#endif
 LIBDCP_ENABLE_WARNINGS
 #include <boost/thread.hpp>
 
@@ -442,7 +439,10 @@ dcpomatic_setup_i18n()
                 * which wxTranslations::SetLanguage will accept.
                 */
                auto const language_code = get_locale_value(kCFLocaleLanguageCode);
-               auto const info = wxUILocale::FindLanguageInfo(std_to_wx(language_code));
+               /* Ideally this would be wxUILocale (as wxLocale is deprecated) but we want to keep this building
+                * with the old wxWidgets we use for the older macOS builds.
+                */
+               auto const info = wxLocale::FindLanguageInfo(std_to_wx(language_code));
                if (info) {
                        translations->SetLanguage(info->GetCanonicalWithRegion());
                }