From 34c67ba85403fc0e785e2bf135581cd9ed8a3cd4 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Mon, 10 Mar 2014 15:59:12 +0000 Subject: [PATCH] Move 'template_search_path()' and 'route_template_search_path()' into 'libs/ardour/search_paths.cc' --- libs/ardour/ardour/search_paths.h | 12 ++++++++++++ libs/ardour/search_paths.cc | 16 ++++++++++++++++ libs/ardour/template_utils.cc | 17 +---------------- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/libs/ardour/ardour/search_paths.h b/libs/ardour/ardour/search_paths.h index 85ed2cbfd7..d52e4de058 100644 --- a/libs/ardour/ardour/search_paths.h +++ b/libs/ardour/ardour/search_paths.h @@ -93,6 +93,18 @@ namespace ARDOUR { */ LIBARDOUR_API PBD::Searchpath panner_search_path (); + /** + * return a Searchpath containing directories in which to look for + * route templates. + */ + LIBARDOUR_API PBD::Searchpath route_template_search_path (); + + /** + * return a Searchpath containing directories in which to look for + * other templates. + */ + LIBARDOUR_API PBD::Searchpath template_search_path (); + } // namespace ARDOUR #endif /* __libardour_search_paths_h__ */ diff --git a/libs/ardour/search_paths.cc b/libs/ardour/search_paths.cc index 09227f6347..0efcce6451 100644 --- a/libs/ardour/search_paths.cc +++ b/libs/ardour/search_paths.cc @@ -147,6 +147,22 @@ panner_search_path () return spath; } +Searchpath +template_search_path () +{ + Searchpath spath (ardour_data_search_path()); + spath.add_subdirectory_to_paths(templates_dir_name); + return spath; +} + +Searchpath +route_template_search_path () +{ + Searchpath spath (ardour_data_search_path()); + spath.add_subdirectory_to_paths(route_templates_dir_name); + return spath; +} + #ifdef PLATFORM_WINDOWS const char* diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index b912fdc446..8efe311536 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -30,6 +30,7 @@ #include "ardour/directory_names.h" #include "ardour/filesystem_paths.h" #include "ardour/filename_extensions.h" +#include "ardour/search_paths.h" #include "ardour/io.h" using namespace std; @@ -37,22 +38,6 @@ using namespace PBD; namespace ARDOUR { -Searchpath -template_search_path () -{ - Searchpath spath (ardour_data_search_path()); - spath.add_subdirectory_to_paths(templates_dir_name); - return spath; -} - -Searchpath -route_template_search_path () -{ - Searchpath spath (ardour_data_search_path()); - spath.add_subdirectory_to_paths(route_templates_dir_name); - return spath; -} - std::string user_template_directory () {