diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-10 16:31:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-10 16:31:14 +0000 |
commit | 4a9a5dea2658bb6a88f2eb74e32b264586ce2e32 (patch) | |
tree | a62358a610ddac2b388a7a23a58263e802189f9a /gtk2_ardour/port_group.cc | |
parent | 0108d1d900a2481a2cbfd175814d1e3b43f50a1b (diff) |
prevent the monitor inputs from showing up in the port matrix, fo'real
git-svn-id: svn://localhost/ardour2/branches/3.0@8235 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_group.cc')
-rw-r--r-- | gtk2_ardour/port_group.cc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc index c52a76d2c5..2d94fa063f 100644 --- a/gtk2_ardour/port_group.cc +++ b/gtk2_ardour/port_group.cc @@ -19,6 +19,7 @@ #include <cstring> #include <boost/shared_ptr.hpp> +#include <boost/algorithm/string.hpp> #include "midi++/manager.h" #include "midi++/mmc.h" @@ -493,6 +494,11 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp std::vector<std::string> extra_system[DataType::num_types]; std::vector<std::string> extra_other[DataType::num_types]; + string lpn (PROGRAM_NAME); + boost::to_lower (lpn); + string lpnc = lpn; + lpnc += ':'; + const char ** ports = 0; if (type == DataType::NIL) { ports = session->engine().get_ports ("", "", inputs ? JackPortIsInput : JackPortIsOutput); @@ -524,13 +530,28 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp continue; } + /* special hack: ignore our monitor inputs (which show up here because + we excluded them earlier. + */ + + string lp = p; + boost::to_lower (lp); + + if ((lp.find (N_(":monitor")) != string::npos) && + (lp.find (lpn) != string::npos)) { + ++n; + continue; + } + /* can't use the audio engine for this as we are looking at non-Ardour ports */ jack_port_t* jp = jack_port_by_name (session->engine().jack(), p.c_str()); if (jp) { DataType t (jack_port_type (jp)); if (t != DataType::NIL) { - if (port_has_prefix (p, "system:") || port_has_prefix (p, "alsa_pcm") || port_has_prefix (p, "ardour:")) { + if (port_has_prefix (p, N_("system:")) || + port_has_prefix (p, N_("alsa_pcm")) || + port_has_prefix (p, lpnc)) { extra_system[t].push_back (p); } else { extra_other[t].push_back (p); |