more changes flowing from a persistent MonitorSection object
[ardour.git] / gtk2_ardour / plugin_pin_dialog.cc
index 3ac10432de0e71fa80c0a6dc3c9c580e1a571f8b..249517d1c7e8ef32e542292ea8cb1ce2a9ad8313 100644 (file)
@@ -48,6 +48,7 @@
 #include "gui_thread.h"
 #include "timers.h"
 #include "ui_config.h"
+#include "utils.h"
 
 #include "pbd/i18n.h"
 
@@ -1794,8 +1795,11 @@ PluginPinWidget::sc_input_press (GdkEventButton *ev, boost::weak_ptr<ARDOUR::Por
 {
        using namespace Menu_Helpers;
        assert (_session);
-       if (_session->actively_recording () || !_session->engine ().connected ()) {
-               error_message_dialog (_("Port Connections are only available with active Audio/MIDI system."));
+       if (!ARDOUR_UI_UTILS::engine_is_running ()) {
+               return false;
+       }
+       if (_session->actively_recording ()) {
+               error_message_dialog (/* unused */ "");
                return false;
        }
 
@@ -1820,8 +1824,7 @@ PluginPinWidget::sc_input_press (GdkEventButton *ev, boost::weak_ptr<ARDOUR::Por
                }
 #endif
 
-               boost::shared_ptr<ARDOUR::RouteList> routes = _session->get_routes ();
-               RouteList copy = *routes;
+               RouteList copy = _session->get_routelist ();
                copy.sort (Stripable::Sorter(true));
                uint32_t added = 0;
                for (ARDOUR::RouteList::const_iterator i = copy.begin (); i != copy.end (); ++i) {