fix lack of return value in tell_about_jack_death(), and fixed up indentation for...
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 16 Oct 2009 20:07:21 +0000 (20:07 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 16 Oct 2009 20:07:21 +0000 (20:07 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5793 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/main.cc

index 5e92112cff6ef9b51739a9f1ca67c3e9cd0d8d3a..98f06d18fda1ea4e0917f07e9e660c052b981430 100644 (file)
@@ -244,44 +244,45 @@ fixup_bundle_environment ()
 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\
+       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 */
+               msg.run ();
+               _exit (0);
+               
+       } else {
 
-    MessageDialog* msg = manage (new MessageDialog (_("JACK exited"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE));
-    msg->set_secondary_text (_(
+               /* 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 ();
-  }
+               msg->present ();
+       }
+       return false; /* do not call again */
 }
 
 static void
 sigpipe_handler (int sig)
 {
         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;
+               AudioEngine::instance()->died ();
+               g_idle_add (tell_about_jack_death, 0);
+               done_the_jack_thing =  true;
        }
 }