]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/piano-pedal-engraver.cc
Doc-es: update Notation/Keyboards.
[lilypond.git] / lily / piano-pedal-engraver.cc
index 5cbb10954e39f4075c8f08ab6a67c582e913a4fe..2fb99407d50c7c9a7061fb832d89d662ce38b27d 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2000--2014 Jan Nieuwenhuizen <janneke@gnu.org>,
+  Copyright (C) 2000--2015 Jan Nieuwenhuizen <janneke@gnu.org>,
                  Erik Sandberg <mandolaerik@gmail.com>
 
   Chris Jackson <chris@fluffhouse.org.uk> - extended to support
@@ -166,9 +166,9 @@ init_pedal_types ()
         be careful, as we don't want to loose references to the _sym_ members.
        */
       Pedal_type_info info;
-      info.event_class_sym_ = scm_from_locale_symbol ((base_ident + "-event").c_str ());
-      info.style_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Style").c_str ());
-      info.strings_sym_ = scm_from_locale_symbol (("pedal" + base_name + "Strings").c_str ());
+      info.event_class_sym_ = scm_from_ascii_symbol ((base_ident + "-event").c_str ());
+      info.style_sym_ = scm_from_ascii_symbol (("pedal" + base_name + "Style").c_str ());
+      info.strings_sym_ = scm_from_ascii_symbol (("pedal" + base_name + "Strings").c_str ());
 
       info.base_name_ = name;
       info.pedal_c_str_ = strdup ((base_name + "Pedal").c_str ());
@@ -249,13 +249,13 @@ Piano_pedal_engraver::process_music ()
             mixed:   Ped. _____/\____|
           */
 
-          SCM style = internal_get_property (p->type_->style_sym_);
+          SCM style = get_property (p->type_->style_sym_);
 
-          bool mixed = style == ly_symbol2scm ("mixed");
+          bool mixed = scm_is_eq (style, ly_symbol2scm ("mixed"));
           bool bracket = (mixed
-                          || style == ly_symbol2scm ("bracket"));
-          bool text = (style == ly_symbol2scm ("text")
-                       || mixed);
+                          || scm_is_eq (style, ly_symbol2scm ("bracket")));
+          bool text = (mixed
+                       || scm_is_eq (style, ly_symbol2scm ("text")));
 
           if (text && !p->item_)
             create_text_grobs (p, mixed);
@@ -269,7 +269,7 @@ void
 Piano_pedal_engraver::create_text_grobs (Pedal_info *p, bool mixed)
 {
   SCM s = SCM_EOL;
-  SCM strings = internal_get_property (p->type_->strings_sym_);
+  SCM strings = get_property (p->type_->strings_sym_);
 
   if (scm_ilength (strings) < 3)
     {
@@ -346,7 +346,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
     {
       assert (!p->finished_bracket_);
 
-      Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *cmc = unsmob<Grob> (get_property ("currentMusicalColumn"));
       p->bracket_->set_bound (RIGHT, cmc);
 
       /*
@@ -424,7 +424,7 @@ Piano_pedal_engraver::finalize ()
       if (p->bracket_)
         {
           SCM cc = get_property ("currentCommandColumn");
-          Item *c = unsmob_item (cc);
+          Item *c = unsmob<Item> (cc);
           p->bracket_->set_bound (RIGHT, c);
 
           p->finished_bracket_ = p->bracket_;
@@ -444,7 +444,7 @@ Piano_pedal_engraver::stop_translation_timestep ()
       typeset_all (p);
       if (p->bracket_ && !p->bracket_->get_bound (LEFT))
         {
-          Grob *cmc = unsmob_grob (get_property ("currentMusicalColumn"));
+          Grob *cmc = unsmob<Grob> (get_property ("currentMusicalColumn"));
           p->bracket_->set_bound (LEFT, cmc);
         }
     }
@@ -473,7 +473,7 @@ Piano_pedal_engraver::typeset_all (Pedal_info *p)
     {
       Grob *r = p->finished_bracket_->get_bound (RIGHT);
       if (!r)
-        p->finished_bracket_->set_bound (RIGHT, unsmob_grob (get_property ("currentMusicalColumn")));
+        p->finished_bracket_->set_bound (RIGHT, unsmob<Grob> (get_property ("currentMusicalColumn")));
 
       p->finished_bracket_ = 0;
     }