From c880cf98728591d50162eee19d3a561f7359c0d4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 15 Jun 2021 14:42:48 +0200 Subject: [PATCH] Test for USE_COREUTILS_MO in the internat sample This is more clear than testing for Linux and will allow enabling this code under other systems later (as there doesn't seem to be any real reason not to do it under other Unix systems too). No real changes. --- samples/internat/internat.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp index 7b4e7465c8..c08ba35294 100644 --- a/samples/internat/internat.cpp +++ b/samples/internat/internat.cpp @@ -38,6 +38,12 @@ #include "../sample.xpm" #endif +// Under Linux we demonstrate loading an existing message catalog using +// coreutils package (which is always installed) as an example. +#ifdef __LINUX__ + #define USE_COREUTILS_MO +#endif // __LINUX__ + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- @@ -265,9 +271,9 @@ bool MyApp::OnInit() // shows that you may make use of the standard message catalogs as well // // if it's not installed on your system, it is just silently ignored -#ifdef __LINUX__ +#ifdef USE_COREUTILS_MO m_locale.AddCatalog("coreutils"); -#endif +#endif // USE_COREUTILS_MO // Create the main frame window MyFrame *frame = new MyFrame(m_locale);