From: hanwen Date: Sat, 12 Nov 2005 14:20:03 +0000 (+0000) Subject: * lily/system-start-delimiter-engraver.cc X-Git-Tag: release/2.7.20~74 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a615625410f0de54abbcb6e89f9e2ece47324695;p=lilypond.git * lily/system-start-delimiter-engraver.cc (acknowledge_system_start_delimiter): use add_offset_callback(). This fixes translation of nested staffgroups. * lily/grob-closure.cc (add_offset_callback): only encaps in simple_closure if it's a procedure. * lily/span-bar.cc (calc_glyph_name): read glyph-name, not glyph from bar-line. * ly/engraver-init.ly (RemoveEmptyRhythmicStaffContext): add remove-empty where pertinent. --- diff --git a/ChangeLog b/ChangeLog index d9d6f1e0aa..f35d67225c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2005-11-12 Han-Wen Nienhuys + + * lily/system-start-delimiter-engraver.cc + (acknowledge_system_start_delimiter): use + add_offset_callback(). This fixes translation of nested + staffgroups. + + * lily/grob-closure.cc (add_offset_callback): only encaps in + simple_closure if it's a procedure. + + * lily/span-bar.cc (calc_glyph_name): read glyph-name, not glyph + from bar-line. + + * ly/engraver-init.ly (RemoveEmptyRhythmicStaffContext): add + remove-empty where pertinent. + 2005-11-12 Graham Percival * Documentation/user/instrument-notation.itely: added @@ -11,6 +27,8 @@ 2005-11-10 Han-Wen Nienhuys + * VERSION: release 2.7.16 + * scripts/lilypond-book.py (main): use commands.mkarg () to quote shell arguments. diff --git a/VERSION b/VERSION index a98eada089..66b5c6808b 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=7 -PATCH_LEVEL=16 +PATCH_LEVEL=17 MY_PATCH_LEVEL= diff --git a/lily/grob-closure.cc b/lily/grob-closure.cc index a3075e2cd1..81bd393adb 100644 --- a/lily/grob-closure.cc +++ b/lily/grob-closure.cc @@ -48,9 +48,11 @@ add_offset_callback (Grob *g, SCM proc, Axis a) data = simple_closure_expression (data); SCM plus = ly_lily_module_constant ("+"); - SCM expr = scm_list_3 (plus, - ly_make_simple_closure (scm_list_1 (proc)), - data); + + if (ly_is_procedure (proc)) + proc = ly_make_simple_closure (scm_list_1 (proc)); + + SCM expr = scm_list_3 (plus, proc, data); g->internal_set_property (axis_offset_symbol (a), ly_make_simple_closure (expr)); } diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 697f86642b..17872d3c5e 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -169,7 +169,7 @@ Span_bar::calc_glyph_name (SCM smob) SCM gl = SCM_EOL; for (int i = elements.size (); i-- && !scm_is_string (gl);) - gl = elements[i]->get_property ("glyph"); + gl = elements[i]->get_property ("glyph-name"); if (!scm_is_string (gl)) { diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 181577899a..ac341eaa12 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -37,6 +37,7 @@ System_start_delimiter_engraver::acknowledge_staff_symbol (Grob_info inf) Pointer_group_interface::add_grob (delim_, ly_symbol2scm ("elements"), inf.grob ()); } + void System_start_delimiter_engraver::acknowledge_system_start_delimiter (Grob_info inf) { @@ -48,12 +49,10 @@ System_start_delimiter_engraver::acknowledge_system_start_delimiter (Grob_info i */ if (scm_is_string (gl) && ly_is_equal (gl, scm_makfrom0str ("brace")) && scm_is_string (my_gl) && ly_is_equal (my_gl, scm_makfrom0str ("bracket"))) - inf.grob ()->translate_axis (-0.8, X_AXIS); // ugh + add_offset_callback (inf.grob (), scm_from_double (-0.8), X_AXIS); else if (scm_is_string (gl) && ly_is_equal (gl, scm_makfrom0str ("bracket")) && scm_is_string (my_gl) && ly_is_equal (my_gl, scm_makfrom0str ("bracket"))) - { - inf.grob ()->translate_axis (-0.8, X_AXIS); // ugh - } + add_offset_callback (inf.grob (), scm_from_double (-0.8), X_AXIS); } System_start_delimiter_engraver::System_start_delimiter_engraver () diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index c4abcefe95..60689ae5f5 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -388,6 +388,7 @@ printing of a single line of lyrics. " extraVerticalExtent = ##f \override SeparatingGroupSpanner #'padding = #0.8 \override VerticalAxisGroup #'remove-first = ##t + \override VerticalAxisGroup #'remove-empty = ##t verticalExtent = ##f } @@ -397,6 +398,7 @@ RemoveEmptyStaffContext= \context { \remove "Axis_group_engraver" \consists "Hara_kiri_engraver" \override Beam #'auto-knee-gap = #'() + \override VerticalAxisGroup #'remove-empty = ##t } AncientRemoveEmptyStaffContext = \context { @@ -585,6 +587,7 @@ AncientRemoveEmptyStaffContext = \context { \consists "Skip_event_swallow_translator" \consists "Separating_line_group_engraver" \consists "Hara_kiri_engraver" + \override VerticalAxisGroup #'remove-empty = ##t \override VerticalAxisGroup #'remove-first = ##t \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.5 . 2.5) } @@ -652,10 +655,6 @@ AncientRemoveEmptyStaffContext = \context { %% Special "TAB" clef clefGlyph = #"clefs.tab" clefPosition = #0 - keepAliveInterfaces = #'(rhythmic-grob-interface - - lyric-interface percent-repeat-interface) - } %% TODO: Gregorian Chant contexts should be moved to gregorian-init.ly, @@ -860,5 +859,6 @@ AncientRemoveEmptyStaffContext = \context { RemoveEmptyRhythmicStaffContext= \context { \RhythmicStaff \remove "Axis_group_engraver" + \override VerticalAxisGroup #'remove-empty = ##t \consists "Hara_kiri_engraver" } diff --git a/scm/output-lib.scm b/scm/output-lib.scm index 60896a9304..a060b6ca3b 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -231,9 +231,10 @@ centered, X==1 is at the right, X == -1 is at the left." #f))) ) - (if glyph-name - (set! (ly:grob-property grob 'glyph-name) glyph-name) - (ly:grob-suicide! grob)))) + (if (not glyph-name) + (ly:grob-suicide! grob)) + + glyph-name)) (define-public (shift-right-at-line-begin g)