summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_region_list.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-12 23:20:37 +0000
committerDavid Robillard <d@drobilla.net>2007-04-12 23:20:37 +0000
commit959a7909c1adca430a63f783fd16687242a7be3d (patch)
treeb5048c3cc1bbb60bb680472b97ebba6ebb92d72f /gtk2_ardour/editor_region_list.cc
parent96ca08b9257e4048294cd1804a65d4ae6cd88814 (diff)
Merged with trunk R1705.
Synced .po files with trunk. Fixed more editor operations to be type agnostic (ie not audio only). git-svn-id: svn://localhost/ardour2/branches/midi@1709 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_region_list.cc')
-rw-r--r--gtk2_ardour/editor_region_list.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc
index 5b1b9c63de..6b6a2981b5 100644
--- a/gtk2_ardour/editor_region_list.cc
+++ b/gtk2_ardour/editor_region_list.cc
@@ -21,6 +21,7 @@
#include <cmath>
#include <algorithm>
#include <string>
+#include <sstream>
#include <pbd/basename.h>
@@ -138,12 +139,13 @@ Editor::add_region_to_region_display (boost::shared_ptr<Region> region)
if (region->source()->name()[0] == '/') { // external file
if (region->whole_file()) {
- str = ".../";
boost::shared_ptr<AudioFileSource> afs = boost::dynamic_pointer_cast<AudioFileSource>(region->source());
+ str = ".../";
+
if (afs) {
- str += region_name_from_path (afs->path(), region->n_channels() > 1);
+ str = region_name_from_path (afs->path(), region->n_channels() > 1);
} else {
str += region->source()->name();
}
@@ -158,6 +160,14 @@ Editor::add_region_to_region_display (boost::shared_ptr<Region> region)
}
+ if (region->n_channels() > 1) {
+ std::stringstream foo;
+ foo << region->n_channels ();
+ str += " [";
+ str += foo.str();
+ str += ']';
+ }
+
if (missing_source) {
str += _(" (MISSING)");
}