summaryrefslogtreecommitdiff
path: root/gtk2_ardour/route_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-13 04:47:19 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-13 04:47:19 +0000
commit71ad6a13cbb1d7cbf414376d5a05492fc147d86f (patch)
tree04a9ac5efb9188bed98eaf7391509d60b6c16de9 /gtk2_ardour/route_ui.cc
parent40ee34e43e6c642d88c5d497d2d29db21b059c68 (diff)
handle disconnected-from-JACK state a little better (i.e. don't crash and be helpful
git-svn-id: svn://localhost/ardour2/trunk@1123 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_ui.cc')
-rw-r--r--gtk2_ardour/route_ui.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 665f0f9288..ed42be2901 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -36,6 +36,8 @@
#include "gui_thread.h"
#include <ardour/route.h>
+#include <ardour/session.h>
+#include <ardour/audioengine.h>
#include <ardour/audio_track.h>
#include <ardour/audio_diskstream.h>
@@ -281,6 +283,12 @@ RouteUI::solo_release(GdkEventButton* ev)
bool
RouteUI::rec_enable_press(GdkEventButton* ev)
{
+ if (!_session.engine().connected()) {
+ MessageDialog msg (_("Not connected to JACK - cannot engage record"));
+ msg.run ();
+ return true;
+ }
+
if (!ignore_toggle && is_track() && rec_enable_button) {
if (ev->button == 2 && Keyboard::modifier_state_equals (ev->state, Keyboard::Control)) {