summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-07-17 13:59:46 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-07-17 13:59:46 +0000
commitb621b28fce4942fb4505854482cddec1545f5c0f (patch)
tree8e4895d32b519a666adaa9950fb6d7e905ffa2c3 /libs/ardour/io.cc
parentc677de4816f86c11feb8cf92bbe75af28437d5ac (diff)
make it possible to (and actually do) name insert and send ports as "return" and "send" rather than "in" and "out" (#5012)
git-svn-id: svn://localhost/ardour2/branches/3.0@13052 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index da79301a31..01a4a64a38 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -58,10 +58,11 @@ PBD::Signal1<void,ChanCount> IO::PortCountChanged;
/** @param default_type The type of port that will be created by ensure_io
* and friends if no type is explicitly requested (to avoid breakage).
*/
-IO::IO (Session& s, const string& name, Direction dir, DataType default_type)
+IO::IO (Session& s, const string& name, Direction dir, DataType default_type, bool sendish)
: SessionObject (s, name)
, _direction (dir)
, _default_type (default_type)
+ , _sendish (sendish)
{
_active = true;
Port::PostDisconnect.connect_same_thread (*this, boost::bind (&IO::disconnect_check, this, _1, _2));
@@ -69,10 +70,11 @@ IO::IO (Session& s, const string& name, Direction dir, DataType default_type)
setup_bundle ();
}
-IO::IO (Session& s, const XMLNode& node, DataType dt)
+IO::IO (Session& s, const XMLNode& node, DataType dt, bool sendish)
: SessionObject(s, "unnamed io")
, _direction (Input)
, _default_type (dt)
+ , _sendish (sendish)
{
_active = true;
pending_state_node = 0;
@@ -1347,10 +1349,18 @@ IO::build_legal_port_name (DataType type)
use the (new) translated name.
*/
- if (_direction == Input) {
- suffix += X_("_in");
+ if (_sendish) {
+ if (_direction == Input) {
+ suffix += X_("_return");
+ } else {
+ suffix += X_("_send");
+ }
} else {
- suffix += X_("_out");
+ if (_direction == Input) {
+ suffix += X_("_in");
+ } else {
+ suffix += X_("_out");
+ }
}
// allow up to 4 digits for the output port number, plus the slash, suffix and extra space