]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-engraver.cc
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / bar-engraver.cc
index bed12337d8b078f37e4dd48f246fa491b2244626..57457c37770fa061ca0bd34c7399c81fa8c3bc0b 100644 (file)
@@ -3,11 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "bar-line.hh"
+#include "context.hh"
 #include "score-engraver.hh"
 #include "warn.hh"
 #include "item.hh"
@@ -21,7 +22,7 @@ class Bar_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Bar_engraver);
-  void request_bar (String type_string);
+  void request_bar (string type_string);
 
 protected:
   virtual void finalize ();
@@ -89,8 +90,7 @@ void
 Bar_engraver::stop_translation_timestep ()
 {
   if (!bar_)
-    /* guh. Use properties! */
-    get_score_engraver ()->forbid_breaks ();
+    context ()->get_score_context ()->set_property ("forbidBreak", SCM_BOOL_T);
   else
     typeset_bar ();
 }
@@ -99,6 +99,5 @@ ADD_TRANSLATOR (Bar_engraver,
                /* doc */ "Create barlines. This engraver is controlled through the "
                "@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point",
                /* create */ "BarLine",
-               /* accept */ "",
                /* read */ "whichBar",
-               /* write */ "");
+               /* write */ "forbidBreak");