]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/key-signature-interface.cc
release commit
[lilypond.git] / lily / key-signature-interface.cc
index 6215e03fef46f3be4d681dbc1aa9189aaf69bde5..6b3d80f2c9246dd2e09f1a39b9bf5c42bc0334ba 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1996--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   keyplacement by Mats Bengtsson
 */
@@ -86,22 +86,18 @@ MAKE_SCHEME_CALLBACK (Key_signature_interface, print, 1);
 SCM
 Key_signature_interface::print (SCM smob)
 {
-  Item *me = dynamic_cast<Item*> (unsmob_grob (smob));
+  Item *me = dynamic_cast<Item *> (unsmob_grob (smob));
 
   Real inter = Staff_symbol_referencer::staff_space (me) / 2.0;
 
   SCM scm_style = me->get_property ("style");
   String style;
   if (scm_is_symbol (scm_style))
-    {
-      style = ly_symbol2string (scm_style);
-    }
+    style = ly_symbol2string (scm_style);
   else
-    {
-      style = "";
-    }
+    style = "";
 
-  SCM newas = me->get_property ("accidentals");
+  SCM newas = me->get_property ("alteration-alist");
   Stencil mol;
 
   SCM c0s = me->get_property ("c0-position");
@@ -124,27 +120,24 @@ Key_signature_interface::print (SCM smob)
       Stencil acc (fm->find_by_name ("accidentals." + font_char));
 
       if (acc.is_empty ())
-       {
-         me->warning (_f ("accidental `%s' not found", font_char));
-       }
+       me->warning (_f ("accidental `%s' not found", font_char));
       else
        {
          SCM what = scm_caar (s);
          int pos = alteration_pos (what, alteration, c0p);
          acc.translate_axis (pos * inter, Y_AXIS);
 
-
-             /*
-               The natural sign (unlike flat & sharp)
-               has vertical edges on both sides. A little padding is
-               needed to prevent collisions.
-             */
+         /*
+           The natural sign (unlike flat & sharp)
+           has vertical edges on both sides. A little padding is
+           needed to prevent collisions.
+         */
          Real padding = 0.0;
          if (alteration == 0
              && last_pos < pos + 2
              && last_pos > pos - 6)
            padding = 0.3;
-         
+
          mol.add_at_edge (X_AXIS, LEFT, acc, padding, 0);
          last_pos = pos;
        }
@@ -157,4 +150,4 @@ Key_signature_interface::print (SCM smob)
 
 ADD_INTERFACE (Key_signature_interface, "key-signature-interface",
               "A group of accidentals, to be printed as signature sign.",
-              "style c0-position accidentals");
+              "style c0-position alteration-alist");