From edd3179fbf560a36b4f0e94ffb61f6a91480e955 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Jan 2021 23:53:43 +0100 Subject: [PATCH] VKeybd: show pretty-name in port-connector This follows a special case in PortGroupList::gather(). The Virtual Keyboard is an Ardour owned async terminal port, that is in a session bundle (not a UserBundle). See also 728d2a3771 and 559ffcff63d --- gtk2_ardour/mixer_strip.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index cc49b7987e..6ea23b0a66 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -44,6 +44,7 @@ #include "pbd/unwind.h" #include "ardour/amp.h" +#include "ardour/async_midi_port.h" #include "ardour/audio_track.h" #include "ardour/audioengine.h" #include "ardour/internal_send.h" @@ -1436,13 +1437,17 @@ MixerStrip::update_io_button (bool for_input) /* Are all main-typed channels connected to the same (user) bundle ? */ if (!have_label) { boost::shared_ptr bundles = _session->bundles (); + boost::shared_ptr ap = boost::dynamic_pointer_cast (_session->vkbd_output_port()); + std::string vkbd_portname = AudioEngine::instance ()->make_port_name_non_relative (ap->name ()); for (ARDOUR::BundleList::iterator bundle = bundles->begin(); bundle != bundles->end(); ++bundle) { - if (boost::dynamic_pointer_cast (*bundle) == 0) - continue; - if (io->bundle()->connected_to(*bundle, _session->engine(), - dt, true)) { + if (boost::dynamic_pointer_cast (*bundle) == 0) { + if (!(*bundle)->offers_port (vkbd_portname)) { + continue; + } + } + if (io->bundle()->connected_to (*bundle, _session->engine(), dt, true)) { label << Gtkmm2ext::markup_escape_text ((*bundle)->name()); have_label = true; break;