From dade5fca7d452b99b640ff139a16c9e606257f09 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 21 Sep 2018 19:04:06 +0200 Subject: Fix --no-nls (3/5), prefer #if in gtk2_ardour This is for consistency with system-wide gettext.h which is used by some 3rd party libs. system-wide gettext uses `#if ENABLE_NLS`, not #ifdef --- gtk2_ardour/bundle_env_cocoa.cc | 2 +- gtk2_ardour/bundle_env_linux.cc | 2 +- gtk2_ardour/gettext.h | 2 +- gtk2_ardour/main.cc | 4 ++-- gtk2_ardour/rc_option_editor.cc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/bundle_env_cocoa.cc b/gtk2_ardour/bundle_env_cocoa.cc index a1bf3a311a..197111f384 100644 --- a/gtk2_ardour/bundle_env_cocoa.cc +++ b/gtk2_ardour/bundle_env_cocoa.cc @@ -108,7 +108,7 @@ fixup_bundle_environment (int argc, char* argv[], string & localedir) bundle_dir = Glib::path_get_dirname (exec_dir); -#ifdef ENABLE_NLS +#if ENABLE_NLS if (!ARDOUR::translations_are_enabled ()) { localedir = "/this/cannot/exist"; } else { diff --git a/gtk2_ardour/bundle_env_linux.cc b/gtk2_ardour/bundle_env_linux.cc index 80830964b4..2875021029 100644 --- a/gtk2_ardour/bundle_env_linux.cc +++ b/gtk2_ardour/bundle_env_linux.cc @@ -67,7 +67,7 @@ fixup_bundle_environment (int /*argc*/, char* argv[], string & localedir) } #endif -#ifdef ENABLE_NLS +#if ENABLE_NLS if (!ARDOUR::translations_are_enabled ()) { localedir = "/this/cannot/exist"; } else { diff --git a/gtk2_ardour/gettext.h b/gtk2_ardour/gettext.h index 2645402e95..339c74ffe7 100644 --- a/gtk2_ardour/gettext.h +++ b/gtk2_ardour/gettext.h @@ -20,7 +20,7 @@ #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ -#ifdef ENABLE_NLS +#if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 6841051e2b..d3e31e911a 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -311,7 +311,7 @@ int main (int argc, char *argv[]) fftwf_make_planner_thread_safe (); #endif -#ifdef ENABLE_NLS +#if ENABLE_NLS /* initialize C locale to user preference */ if (ARDOUR::translations_are_enabled ()) { setlocale (LC_ALL, ""); @@ -327,7 +327,7 @@ int main (int argc, char *argv[]) windows_vst_gui_init (&argc, &argv); #endif -#ifdef ENABLE_NLS +#if ENABLE_NLS cerr << "bind txt domain [" << PACKAGE << "] to " << localedir << endl; (void) bindtextdomain (PACKAGE, localedir.c_str()); diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index e959932f25..e4d9da9c2a 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -2280,7 +2280,7 @@ RCOptionEditor::RCOptionEditor () )); -#ifdef ENABLE_NLS +#if ENABLE_NLS add_option (_("General/Translation"), new OptionEditorHeading (_("Internationalization"))); -- cgit v1.2.3