13
0

infrastructure for finding theme files

This commit is contained in:
Paul Davis 2016-05-29 11:42:56 -04:00
parent 6151caf599
commit e4cfa1d955
4 changed files with 27 additions and 4 deletions

View File

@ -39,6 +39,7 @@ namespace ARDOUR {
LIBARDOUR_API extern const char* const templates_dir_name;
LIBARDOUR_API extern const char* const route_templates_dir_name;
LIBARDOUR_API extern const char* const surfaces_dir_name;
LIBARDOUR_API extern const char* const theme_dir_name;
LIBARDOUR_API extern const char* const ladspa_dir_name;
LIBARDOUR_API extern const char* const panner_dir_name;
LIBARDOUR_API extern const char* const backend_dir_name;

View File

@ -79,19 +79,29 @@ namespace ARDOUR {
*
* If ARDOUR_MIDI_PATCH_PATH is defined then the Searchpath returned
* will contain only those directories specified in it, otherwise it will
* contain the user and system directories which may contain control
* surface plugins.
* contain the user and system directories.
*/
LIBARDOUR_API PBD::Searchpath midi_patch_search_path ();
/**
* return a Searchpath containing directories in which to look for
* theme files.
*
* If ARDOUR_THEMES_PATH is defined then the Searchpath returned
* will contain only those directories specified in it, otherwise it will
* contain the user and system directories
*/
LIBARDOUR_API PBD::Searchpath theme_search_path ();
/**
* return a Searchpath containing directories in which to look for
* panner plugins.
*
* If ARDOUR_PANNER_PATH is defined then the Searchpath returned
* will contain only those directories specified in it, otherwise it will
* contain the user and system directories which may contain control
* surface plugins.
* contain the user and system directories which may contain panner
* plugins.
*/
LIBARDOUR_API PBD::Searchpath panner_search_path ();

View File

@ -37,6 +37,7 @@ const char* const templates_dir_name = X_("templates");
const char* const route_templates_dir_name = X_("route_templates");
const char* const surfaces_dir_name = X_("surfaces");
const char* const ladspa_dir_name = X_("ladspa");
const char* const theme_dir_name = X_("themes");
const char* const panner_dir_name = X_("panners");
const char* const backend_dir_name = X_("backends");
const char* const automation_dir_name = X_("automation");

View File

@ -38,6 +38,7 @@ namespace {
const char * const backend_env_variable_name = "ARDOUR_BACKEND_PATH";
const char * const surfaces_env_variable_name = "ARDOUR_SURFACES_PATH";
const char * const export_env_variable_name = "ARDOUR_EXPORT_FORMATS_PATH";
const char * const theme_env_variable_name = "ARDOUR_THEMES_PATH";
const char * const ladspa_env_variable_name = "LADSPA_PATH";
const char * const midi_patch_env_variable_name = "ARDOUR_MIDI_PATCH_PATH";
const char * const panner_env_variable_name = "ARDOUR_PANNER_PATH";
@ -69,6 +70,16 @@ control_protocol_search_path ()
return spath;
}
Searchpath
theme_search_path ()
{
Searchpath spath(user_config_directory ());
spath.add_subdirectory_to_paths (theme_dir_name);
spath += Searchpath(Glib::getenv(theme_env_variable_name));
return spath;
}
Searchpath
export_formats_search_path ()
{