fix bug in path_expand() when passed an empty string
[ardour.git] / libs / ardour / globals.cc
index 3aa6d6990d4d8bf42204e457825aef330d4fc8e5..0e12883d8235d992f11a157d6196e5fd3597c611 100644 (file)
@@ -69,7 +69,7 @@
 #include "ardour/debug.h"
 #include "ardour/filesystem_paths.h"
 #include "ardour/mix.h"
-#include "ardour/playlist.h"
+#include "ardour/audioplaylist.h"
 #include "ardour/plugin_manager.h"
 #include "ardour/process_thread.h"
 #include "ardour/profile.h"
@@ -251,6 +251,7 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        AudioRegion::make_property_quarks ();
        RouteGroup::make_property_quarks ();
         Playlist::make_property_quarks ();
+        AudioPlaylist::make_property_quarks ();
 
        /* this is a useful ready to use PropertyChange that many
           things need to check. This avoids having to compose
@@ -283,8 +284,7 @@ ARDOUR::init (bool use_vst, bool try_optimization)
        if (Config->load_state ()) {
                return -1;
        }
-
-       
+        
        Config->set_use_vst (use_vst);
 
        Profile = new RuntimeProfile;
@@ -527,3 +527,15 @@ ARDOUR::coverage (framepos_t sa, framepos_t ea,
        return OverlapNone;
 }
 
+string
+ARDOUR::translation_kill_path ()
+{
+        return Glib::build_filename (user_config_directory().to_string(), ".love_is_the_language_of_audio");
+}
+
+bool
+ARDOUR::translations_are_disabled ()
+{
+        /* if file does not exist, we don't translate (bundled ardour only) */
+        return Glib::file_test (translation_kill_path(), Glib::FILE_TEST_EXISTS) == false;
+}