]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/thread-devnull-engraver.cc
move from abe.ly
[lilypond.git] / lily / thread-devnull-engraver.cc
index b019d3801fc5109562693d3fdbf67bd2a4dbe76e..8480139e6a6867e5a2a1909036cd7bbd85b4ff9d 100644 (file)
@@ -3,12 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
   
-  (c) 2000--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "engraver.hh"
 #include "item.hh"
-#include "musical-request.hh"
+#include "event.hh"
 #include "translator-group.hh"
 
 class Thread_devnull_engraver : public Engraver
@@ -35,27 +35,30 @@ Thread_devnull_engraver::acknowledge_grob (Grob_info i)
 
   if (s == ly_symbol2scm ("always")
       || (s == SCM_EOL
-         && daddy_trans_l_->id_str_.left_str (3) == "two"
-         && (to_boolean (get_property ("unison"))
-             || to_boolean (get_property ("unisilence")))
-         && to_boolean (get_property ("soloADue"))))
+         && to_boolean (get_property ("soloADue"))
+         && ((daddy_trans_->id_string_.left_string (3) == "two"
+              && (to_boolean (get_property ("unison"))
+                  || to_boolean (get_property ("unisilence"))))
+
+             /* Maybe this should be optional? */
+             || to_boolean (get_property ("othersolo")))))
     {
-      /* Ugh, we can suicide them, but they remain living */
-      i.grob_l_->suicide ();
+      i.grob_->suicide ();
     }
 }
 Thread_devnull_engraver::Thread_devnull_engraver(){}
 
 ENTER_DESCRIPTION(Thread_devnull_engraver,
-/* descr */       "Kill elements whenever we are Voice called `two' and either
-unison, unisilence or soloADue is set.@footnote{On unix systems, the
-file @file{/dev/null} is special device: anything written to it is
-discarded.}. This engraver works closely together with the part
-combiner.  When the part combiner notices that two threads are
-identical, it tells the @code{Thread_devnull_engraver} to discard
-everything in the second thread.
-",
+/* descr */       "Kill elements whenever we are Voice called `two' and either "
+"unison, unisilence or soloADue is set.@footnote{On unix systems, the "
+"file @file{/dev/null} is special device: anything written to it is "
+"discarded.}. This engraver works closely together with the part "
+"combiner.  When the part combiner notices that two threads are "
+"identical, it tells the @code{Thread_devnull_engraver} to discard " 
+"everything in the second thread. "
+,
 /* creats*/       "",
-/* acks  */       "grob-interface",
+/* accepts */     "",
+/* acks  */      "grob-interface",
 /* reads */       "",
 /* write */       "");