X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrace-engraver.cc;h=ee9eaf9bf4532b57f8d5f4c12e7cb184c800a656;hb=75eebcb49e52d296b1da3e1074e0825d2c780db4;hp=59e2bacbbb091a7daa28a0a6e668073f02f1bbb8;hpb=4f795f5a103f6bf1c3a5590302ba54a361186524;p=lilypond.git diff --git a/lily/grace-engraver.cc b/lily/grace-engraver.cc index 59e2bacbbb..ee9eaf9bf4 100644 --- a/lily/grace-engraver.cc +++ b/lily/grace-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2004--2005 Han-Wen Nienhuys + (c) 2004--2006 Han-Wen Nienhuys */ #include "engraver.hh" @@ -14,9 +14,9 @@ class Grace_engraver : public Engraver { void consider_change_grace_settings (); protected: - virtual void start_translation_timestep (); + void start_translation_timestep (); virtual void derived_mark () const; - virtual void initialize (); + virtual void initialize (); TRANSLATOR_DECLARATIONS (Grace_engraver); Moment last_moment_; @@ -27,7 +27,7 @@ public: Grace_engraver::Grace_engraver () { grace_settings_ = SCM_EOL; - last_moment_ = Moment (Rational (-1,1)); + last_moment_ = Moment (Rational (-1, 1)); } void @@ -69,11 +69,8 @@ Grace_engraver::consider_change_grace_settings () SCM val = scm_cadr (scm_cddr (entry)); Context *c = context (); - while (c - && c->context_name_symbol () != context_name) - { - c = c->get_parent_context (); - } + while (c && !c->is_alias (context_name)) + c = c->get_parent_context (); if (c) { @@ -90,7 +87,7 @@ Grace_engraver::consider_change_grace_settings () } } - last_moment_ = now_mom(); + last_moment_ = now_mom (); } void @@ -106,10 +103,11 @@ Grace_engraver::start_translation_timestep () consider_change_grace_settings (); } +#include "translator.icc" + ADD_TRANSLATOR (Grace_engraver, - /* descr */ "Set font size and other properties for grace notes.", - /* creats*/ "", - /* accepts */ "", - /* acks */ "", - /* reads */ "graceSettings", + /* doc */ "Set font size and other properties for grace notes.", + /* create */ "", + /* accept */ "", + /* read */ "graceSettings", /* write */ "");