Fix --no-nls (3/5), prefer #if in gtk2_ardour
authorRobin Gareus <robin@gareus.org>
Fri, 21 Sep 2018 17:04:06 +0000 (19:04 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 21 Sep 2018 17:04:06 +0000 (19:04 +0200)
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
gtk2_ardour/bundle_env_linux.cc
gtk2_ardour/gettext.h
gtk2_ardour/main.cc
gtk2_ardour/rc_option_editor.cc

index a1bf3a311ab33a4d812bbc80e97d7be63e39feb5..197111f38498ddca97a94523502cb01790535ca4 100644 (file)
@@ -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 {
index 80830964b4e9f50be6bd16adeb19d2bc1a0c6a83..2875021029e2af9039381bc633014cf4081ee9bc 100644 (file)
@@ -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 {
index 2645402e95ea7e6648560effb35d608d0f0219ce..339c74ffe77844c9aa6d4d6c7479ca18f6e378a2 100644 (file)
@@ -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 <libintl.h>
index 6841051e2b0d123fdaa6802671d35cc7011cff7c..d3e31e911aaebda33e752306326609b895621374 100644 (file)
@@ -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());
index e959932f253beca925df60653d8edc63e64c6ee6..e4d9da9c2adfd60482d8c15f1c5c9ed8fefe72d9 100644 (file)
@@ -2280,7 +2280,7 @@ RCOptionEditor::RCOptionEditor ()
                     ));
 
 
-#ifdef ENABLE_NLS
+#if ENABLE_NLS
 
        add_option (_("General/Translation"), new OptionEditorHeading (_("Internationalization")));