/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2004--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
virtual void finalize ();
TRANSLATOR_DECLARATIONS (Grace_engraver);
- DECLARE_LISTENER (grace_change);
+ void grace_change (SCM);
};
Grace_engraver::Grace_engraver ()
}
// The iterator should usually come before process_music
-IMPLEMENT_LISTENER (Grace_engraver, grace_change);
void
Grace_engraver::grace_change (SCM)
{
SCM grob = scm_cadr (elt);
SCM cell = scm_cddr (elt);
- Grob_property_info (Context::unsmob (context), grob).matched_pop (cell);
+ Grob_property_info (unsmob<Context> (context), grob).matched_pop (cell);
}
grace_settings_ = SCM_EOL;
}
if (!scm_is_pair (sym))
sym = scm_list_1 (sym);
- Context *c = context ();
- while (c && !c->is_alias (context_name))
- c = c->get_parent_context ();
-
+ Context *c = find_context_above (context (), context_name);
if (c)
{
SCM cell = Grob_property_info (c, grob).push (sym, val);
if (last_moment_ == Rational (-1))
{
Dispatcher *d = context ()->event_source ();
- d->add_listener (GET_LISTENER (grace_change), ly_symbol2scm ("GraceChange"));
+ d->add_listener (GET_LISTENER (Grace_engraver, grace_change), ly_symbol2scm ("GraceChange"));
}
last_moment_ = now;
}
if (last_moment_ != Rational (-1))
{
Dispatcher *d = context ()->event_source ();
- d->remove_listener (GET_LISTENER (grace_change), ly_symbol2scm ("GraceChange"));
+ d->remove_listener (GET_LISTENER (Grace_engraver, grace_change), ly_symbol2scm ("GraceChange"));
}
}