summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-03 22:28:31 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-03 22:28:31 +0000
commitac84ea82186c723e4cb4f74b15a070d5fd42b5dc (patch)
treefea58edc0306bb61c2ef5a5f461d0c0f323236d1 /gtk2_ardour/port_matrix.cc
parent94c7dcea5cf01f1d30a6b5aa4dd29cce2d7a17bc (diff)
Offer options to add un-natural port types to routes. Sort of helps with #3578.
git-svn-id: svn://localhost/ardour2/branches/3.0@8169 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 052a26c25c..8991ba8c32 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -409,6 +409,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
bool can_add_or_rename = false;
+ /* Start off with options for the `natural' port type */
for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
if (should_show (*i)) {
snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str());
@@ -417,6 +418,15 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
}
}
+ /* Now add other ones */
+ for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
+ if (!should_show (*i)) {
+ snprintf (buf, sizeof (buf), _("Add %s %s"), (*i).to_i18n_string(), channel_noun().c_str());
+ sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i)));
+ can_add_or_rename = true;
+ }
+ }
+
if (can_rename_channels (bc[dim].bundle)) {
snprintf (
buf, sizeof (buf), _("Rename '%s'..."),