summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-16 15:33:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-16 15:33:04 +0000
commit6ef5d85ae1f2c500c4163cd1df580b3f26991c1e (patch)
tree15194a52bb72f036117fc4c87c193a4cbb64be8b /gtk2_ardour/main.cc
parent830911f6f9451d83a58043b3f9084d3caa164b7b (diff)
changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc46
1 files changed, 44 insertions, 2 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 2b16de3d70..daa2491f0f 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -281,10 +281,52 @@ fixup_bundle_environment ()
#endif
+static gboolean
+tell_about_jack_death (void* /* ignored */)
+{
+ if (AudioEngine::instance()->processed_frames() == 0) {
+ /* died during startup */
+ MessageDialog msg (_("JACK exited"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK);
+ msg.set_position (Gtk::WIN_POS_CENTER);
+ msg.set_secondary_text (_(
+"JACK exited unexpectedly, and without notifying Ardour.\n\
+\n\
+This could be due to misconfiguration or to an error inside JACK.\n\
+\n\
+Click OK to exit Ardour."));
+
+ msg.run ();
+ _exit (0);
+
+ } else {
+
+ /* engine has already run, so this is a mid-session JACK death */
+
+ MessageDialog* msg = manage (new MessageDialog (_("JACK exited"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE));
+ msg->set_secondary_text (_(
+"JACK exited unexpectedly, and without notifying Ardour.\n\
+\n\
+This is probably due to an error inside JACK. You should restart JACK\n\
+and reconnect Ardour to it, or exit Ardour now. You cannot save your\n\
+session at this time, because we would lose your connection information.\n"));
+ msg->present ();
+ }
+ return false; /* do not call again */
+}
+
static void
-sigpipe_handler (int /*sig*/)
+sigpipe_handler (int sig)
{
- cerr << _("SIGPIPE received - JACK has probably died") << endl;
+ /* XXX fix this so that we do this again after a reconnect to JACK
+ */
+
+ static bool done_the_jack_thing = false;
+
+ if (!done_the_jack_thing) {
+ AudioEngine::instance()->died ();
+ g_idle_add (tell_about_jack_death, 0);
+ done_the_jack_thing = true;
+ }
}
#ifdef HAVE_LV2