summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/port_matrix.cc13
-rw-r--r--gtk2_ardour/processor_box.cc2
2 files changed, 14 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 113a11c116..052a26c25c 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -25,6 +25,7 @@
#include <gtkmm/menushell.h>
#include <gtkmm/menu_elems.h>
#include <gtkmm/window.h>
+#include <gtkmm/stock.h>
#include "ardour/bundle.h"
#include "ardour/types.h"
#include "ardour/session.h"
@@ -33,6 +34,7 @@
#include "port_matrix.h"
#include "port_matrix_body.h"
#include "port_matrix_component.h"
+#include "ardour_dialog.h"
#include "i18n.h"
#include "gui_thread.h"
#include "utils.h"
@@ -686,7 +688,16 @@ PortMatrix::remove_channel (ARDOUR::BundleChannel b)
if (io) {
Port* p = io->nth (b.channel);
if (p) {
- io->remove_port (p, this);
+ int const r = io->remove_port (p, this);
+ if (r == -1) {
+ ArdourDialog d (_("Port removal not allowed"));
+ Label l (_("This port cannot be removed, as the first plugin in the track or buss cannot accept the new number of inputs."));
+ d.get_vbox()->pack_start (l);
+ d.add_button (Stock::OK, RESPONSE_ACCEPT);
+ d.set_modal (true);
+ d.show_all ();
+ d.run ();
+ }
}
}
}
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 673b3dc1bb..99875a2a47 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -801,6 +801,7 @@ ProcessorBox::choose_insert ()
_route->add_processor (processor, _placement);
}
+/* Caller must not hold process lock */
void
ProcessorBox::choose_send ()
{
@@ -813,6 +814,7 @@ ProcessorBox::choose_send ()
/* XXX need processor lock on route */
try {
+ Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock());
send->output()->ensure_io (outs, false, this);
} catch (AudioEngine::PortRegistrationFailure& err) {
error << string_compose (_("Cannot set up new send: %1"), err.what()) << endmsg;