]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/accidental.cc
Merge with master
[lilypond.git] / lily / accidental.cc
index 1486c3f2cc113105c3f8c034a795afc2ee915415..46db4f4f2f0bf51af1694c30dfc0fe3827d014e2 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2001--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "accidental-interface.hh"
@@ -25,30 +25,12 @@ parenthesize (Grob *me, Stencil m)
   Stencil close
     = font->find_by_name ("accidentals.rightparen");
 
-  m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0, 0);
-  m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0, 0);
+  m.add_at_edge (X_AXIS, LEFT, Stencil (open), 0);
+  m.add_at_edge (X_AXIS, RIGHT, Stencil (close), 0);
 
   return m;
 }
 
-/*
-  Hmm. Need separate callback, or perhaps #'live bool property.
- */
-MAKE_SCHEME_CALLBACK (Accidental_interface, after_line_breaking, 1);
-SCM
-Accidental_interface::after_line_breaking (SCM smob)
-{
-  Grob *me = unsmob_grob (smob);
-  Grob *tie = unsmob_grob (me->get_object ("tie"));
-
-  if (tie && !tie->original ()
-      && !to_boolean (me->get_property ("forced")))
-    {
-      me->suicide ();
-    }
-  return SCM_UNSPECIFIED;
-}
 
 /* This callback exists for the sole purpose of allowing us to override
    its pure equivalent to accidental-interface::pure-height */
@@ -151,7 +133,15 @@ SCM
 Accidental_interface::print (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
+  Grob *tie = unsmob_grob (me->get_object ("tie"));
 
+  if (tie && !tie->original ()
+      && !to_boolean (me->get_property ("forced")))
+    {
+      me->suicide ();
+      return SCM_EOL;
+    }
+  
   Font_metric *fm = Font_interface::get_default_font (me);
 
   SCM alist = me->get_property ("glyph-name-alist");
@@ -177,7 +167,7 @@ Accidental_interface::print (SCM smob)
       if (acc.is_empty ())
        me->warning (_ ("natural alteration glyph not found"));
       else
-       mol.add_at_edge (X_AXIS, LEFT, acc, 0.1, 0);
+       mol.add_at_edge (X_AXIS, LEFT, acc, 0.1);
     }
   
   if (to_boolean (me->get_property ("parenthesized")))