diff options
author | Doug McLain <doug@nostar.net> | 2006-03-10 07:16:45 +0000 |
---|---|---|
committer | Doug McLain <doug@nostar.net> | 2006-03-10 07:16:45 +0000 |
commit | 276d290a422f3c13a3e72d907eb4882e9db53105 (patch) | |
tree | 87298f5b550eb45f32c4eb1d5355380750ba649c /libs/ardour/globals.cc | |
parent | 58bd9bff8db593dab69188199632aeabbcf8be8d (diff) |
Example code to load the x and <-> xpms for the mixer strip from files instead of from hard coded xpm data.
git-svn-id: svn://localhost/trunk/ardour2@370 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r-- | libs/ardour/globals.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 2d64c02c40..99cf9f9890 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -299,7 +299,7 @@ ARDOUR::new_change () } static string -find_file (string name, string dir) +find_file (string name, string dir, string subdir = "") { string path; @@ -317,8 +317,12 @@ find_file (string name, string dir) mkdir (path.c_str(), 0755); + if (subdir.length()) { + path += subdir + "/"; + } + path += name; - + cerr << path << endl; if (access (path.c_str(), R_OK) == 0) { return path; } @@ -328,6 +332,11 @@ find_file (string name, string dir) path = dir; path += "/ardour/"; + + if (subdir.length()) { + path += subdir + "/"; + } + path += name; if (access (path.c_str(), R_OK) == 0) { @@ -349,14 +358,14 @@ ARDOUR::find_config_file (string name) } string -ARDOUR::find_data_file (string name) +ARDOUR::find_data_file (string name, string subdir) { char* envvar; if ((envvar = getenv("ARDOUR_DATA_PATH")) == 0) { envvar = DATA_DIR; } - return find_file (name, envvar); + return find_file (name, envvar, subdir); } ARDOUR::LocaleGuard::LocaleGuard (const char* str) |