CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/10/10 21:29:48

Modified files:
        .              : ChangeLog 
        lily           : paper-book.cc 
        ly             : paper-defaults.ly 
        scm            : framework-ps.scm 

Log message:
        * scm/framework-ps.scm (output-preview-framework): use
        is-book-title to determine whether to chop off the booktitle.
        
        * lily/paper-book.cc (systems): init from book-title-properties
        (add_score_title): init score-title-properties.
        
        * ly/paper-defaults.ly: add {score,book}-title-properties.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4169&tr2=1.4170&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/paper-book.cc.diff?tr1=1.117&tr2=1.118&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ly/paper-defaults.ly.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/framework-ps.scm.diff?tr1=1.136&tr2=1.137&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4169 lilypond/ChangeLog:1.4170
--- lilypond/ChangeLog:1.4169   Mon Oct 10 14:17:19 2005
+++ lilypond/ChangeLog  Mon Oct 10 21:29:47 2005
@@ -1,5 +1,13 @@
 2005-10-10  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * scm/framework-ps.scm (output-preview-framework): use
+       is-book-title to determine whether to chop off the booktitle.
+
+       * lily/paper-book.cc (systems): init from book-title-properties
+       (add_score_title): init score-title-properties.
+
+       * ly/paper-defaults.ly: add {score,book}-title-properties.
+
        * scm/document-backend.scm (lookup-interface): error message if
        using unknown interface.
 
Index: lilypond/lily/paper-book.cc
diff -u lilypond/lily/paper-book.cc:1.117 lilypond/lily/paper-book.cc:1.118
--- lilypond/lily/paper-book.cc:1.117   Tue Sep 27 10:50:11 2005
+++ lilypond/lily/paper-book.cc Mon Oct 10 21:29:47 2005
@@ -243,10 +243,12 @@
     title = score_title (header_);
   if (!title.is_empty ())
     {
-      //  TODO: init properties, from where? 
-      Paper_system *ps = new Paper_system (title, SCM_EOL);
-      ps->set_property ("is-title", SCM_BOOL_T); 
-      systems_ = scm_cons (ps->self_scm (), systems_);
+      /*
+       TODO: this should come from the \layout {} block, which should
+       override settings from \paper {}
+      */
+      SCM props = paper_->lookup_variable (ly_symbol2scm 
("score-title-properties"));
+      Paper_system *ps = new Paper_system (title, props);
       ps->unprotect ();
       set_system_penalty (ps, header);
     }
@@ -263,8 +265,8 @@
 
   if (!title.is_empty ())
     {
-      Paper_system *ps = new Paper_system (title, SCM_EOL);
-      ps->set_property ("is-title", SCM_BOOL_T); 
+      SCM props = paper_->lookup_variable (ly_symbol2scm 
("book-title-properties"));
+      Paper_system *ps = new Paper_system (title, props);
       set_system_penalty (ps, header_);
 
       systems_ = scm_cons (ps->self_scm (), systems_);
Index: lilypond/ly/paper-defaults.ly
diff -u lilypond/ly/paper-defaults.ly:1.16 lilypond/ly/paper-defaults.ly:1.17
--- lilypond/ly/paper-defaults.ly:1.16  Mon Oct 10 10:40:59 2005
+++ lilypond/ly/paper-defaults.ly       Mon Oct 10 21:29:47 2005
@@ -35,6 +35,16 @@
 
     #(layout-set-staff-size (* 20.0 pt))
 
+
+    #(define-public score-title-properties
+      '((is-title . #t)
+       (is-book-title . #f)
+       ))
+    #(define-public book-title-properties
+      '((is-title . #t)
+       (is-book-title . #t)
+       ))
+    
     %%
     %% this dimension includes the extent of the
     %% staves themselves.
Index: lilypond/scm/framework-ps.scm
diff -u lilypond/scm/framework-ps.scm:1.136 lilypond/scm/framework-ps.scm:1.137
--- lilypond/scm/framework-ps.scm:1.136 Sun Oct  2 01:16:08 2005
+++ lilypond/scm/framework-ps.scm       Mon Oct 10 21:29:48 2005
@@ -495,11 +495,10 @@
 
     ;; skip booktitles.
     (if (and
-        (not
-         (ly:get-option 'preview-include-book-title))
-        (< 1 (length systems))
-        (paper-system-title? (list-ref systems 0))
-        (paper-system-title? (list-ref systems 1)))
+        (not (ly:get-option 'preview-include-book-title))
+        (pair? systems)
+        (ly:paper-system-property (car systems) 'is-book-title #f))
+
        (set! systems (cdr systems)))
 
     (for-each


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to