diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-09-09 13:04:23 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-09-09 13:04:23 +0000 |
commit | 40bc1c239eef8edfe08a456c189aff2cef3c6ee8 (patch) | |
tree | 990d09c475a98a5426b0d3314434339f33746025 /libs/ardour/utils.cc | |
parent | d0cd7d0048830a0ebe61e207b8522e69c72ec7f3 (diff) |
more changes for the import dialog, with breakout of importable source code into its own files
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2437 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r-- | libs/ardour/utils.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 6b5ea2cef6..e34fdd75a1 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -208,7 +208,7 @@ touch_file (ustring path) } ustring -region_name_from_path (ustring path, bool strip_channels) +region_name_from_path (ustring path, bool strip_channels, bool add_channel_suffix, uint32_t total, uint32_t this_one) { path = PBD::basename_nosuffix (path); @@ -225,6 +225,17 @@ region_name_from_path (ustring path, bool strip_channels) } } + if (add_channel_suffix) { + + path += '%'; + + if (total > 2) { + path += (char) ('a' + this_one); + } else { + path += (char) (this_one == 0 ? 'L' : 'R'); + } + } + return path; } |