gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Fri Oct 25 11:16:59 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/2dd2f0dc (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7ec1596e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/dc831084 (commit)
	from  https://github.com/Gnucash/gnucash/commit/b2fcfbd3 (commit)



commit 2dd2f0dc65f7efed804851aac3c9a6e1e94e0d82
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 25 23:10:48 2019 +0800

    [stylesheets] replace raw <center> with style attribute

diff --git a/gnucash/report/stylesheets/stylesheet-easy.scm b/gnucash/report/stylesheets/stylesheet-easy.scm
index 421a8b63c..d4f89476d 100644
--- a/gnucash/report/stylesheets/stylesheet-easy.scm
+++ b/gnucash/report/stylesheets/stylesheet-easy.scm
@@ -211,8 +211,6 @@
          (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-    ;; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
 
     (gnc:html-document-set-style!
      ssdoc "body"
@@ -331,6 +329,7 @@
       (gnc:html-table-set-style!
        t "table"
        'attribute (list "border" 0)
+       'attribute (list "style" "margin-left:auto; margin-right:auto")
        'inheritable? #f)
 
       ;; set the header column to be the 2nd when we have a logo
@@ -387,8 +386,6 @@
        t 2 headcolumn
        (gnc:html-document-objects doc))
       (gnc:html-document-add-object! ssdoc t))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
-    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet
diff --git a/gnucash/report/stylesheets/stylesheet-fancy.scm b/gnucash/report/stylesheets/stylesheet-fancy.scm
index f9eceb323..13da065c8 100644
--- a/gnucash/report/stylesheets/stylesheet-fancy.scm
+++ b/gnucash/report/stylesheets/stylesheet-fancy.scm
@@ -205,9 +205,6 @@
          (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-    ;; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
-
     (gnc:html-document-set-style!
      ssdoc "body"
      'attribute (list "bgcolor" bgcolor)
@@ -328,6 +325,7 @@
       (gnc:html-table-set-style!
        t "table"
        'attribute (list "border" 0)
+       'attribute (list "style" "margin-left:auto; margin-right:auto")
        'inheritable? #f)
 
       (let* ((title (gnc:html-document-title doc))
@@ -383,8 +381,6 @@
        (gnc:html-document-objects doc))
 
       (gnc:html-document-add-object! ssdoc t))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
-    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet
diff --git a/gnucash/report/stylesheets/stylesheet-footer.scm b/gnucash/report/stylesheets/stylesheet-footer.scm
index a5ec521bc..86649b4b9 100644
--- a/gnucash/report/stylesheets/stylesheet-footer.scm
+++ b/gnucash/report/stylesheets/stylesheet-footer.scm
@@ -225,10 +225,6 @@
          (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-    ;; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc
-                                   (gnc:make-html-text "<center>"))
-
     (gnc:html-document-set-style!
      ssdoc "body"
      'attribute (list "bgcolor" bgcolor)
@@ -347,6 +343,7 @@
       (gnc:html-table-set-style!
        t "table"
        'attribute (list "border" 0)
+       'attribute (list "style" "margin-left:auto; margin-right:auto")
        'inheritable? #f)
 
       ;; set the header column to be the 2nd when we have a logo
@@ -406,8 +403,6 @@
       (gnc:html-table-set-cell!
        t 3 headcolumn
        (gnc:make-html-text footer-text)))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
-    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet
diff --git a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
index bcf2d992c..f3cfe664c 100644
--- a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
+++ b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
@@ -291,9 +291,6 @@
          (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-    ;; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
-
     (gnc:html-document-set-style!
      ssdoc "body"
      'attribute (list "bgcolor" bgcolor)
@@ -412,6 +409,7 @@
       (gnc:html-table-set-style!
        t "table"
        'attribute (list "border" 0)
+       'attribute (list "style" "margin-left:auto; margin-right:auto")
        'inheritable? #f)
 
       ;; set the header column to be the 2nd when we have a logo
@@ -570,8 +568,6 @@
             (gnc:html-markup-i additional-comments)
             (gnc:html-markup-br))
            " ")))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
-    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet

commit 7ec1596e9c305bd96022606031730142c85fd8ac
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 25 22:56:57 2019 +0800

    [stylesheets] replace raw <div> for headpixmap with html-table-cell

diff --git a/gnucash/report/stylesheets/stylesheet-easy.scm b/gnucash/report/stylesheets/stylesheet-easy.scm
index 29e1f6754..421a8b63c 100644
--- a/gnucash/report/stylesheets/stylesheet-easy.scm
+++ b/gnucash/report/stylesheets/stylesheet-easy.scm
@@ -376,18 +376,11 @@
               (gnc:html-markup-img (make-file-url logopixmap))))))
 
       (if (and headpixmap (> (string-length headpixmap) 0))
-          (begin
-            (gnc:html-table-set-cell!
-             t 0 headcolumn
-             (gnc:make-html-text
-              (string-append
-               "<div align=\"" align "\">"
-               "<img src=\"" (make-file-url headpixmap) "\">"
-               "</div>")))
-            )
-          (gnc:html-table-set-cell!
-           t 0 headcolumn
-           (gnc:make-html-text " ")))
+          (let* ((div (gnc:html-markup-img (make-file-url headpixmap)))
+                 (cell (gnc:make-html-table-cell (gnc:make-html-text div))))
+            (gnc:html-table-cell-set-style! cell "td" 'attribute `("align" ,align))
+            (gnc:html-table-set-cell! t 0 headcolumn cell))
+          (gnc:html-table-set-cell! t 0 headcolumn (gnc:make-html-text " ")))
 
       (apply
        gnc:html-table-set-cell!
diff --git a/gnucash/report/stylesheets/stylesheet-fancy.scm b/gnucash/report/stylesheets/stylesheet-fancy.scm
index a28bf6c86..f9eceb323 100644
--- a/gnucash/report/stylesheets/stylesheet-fancy.scm
+++ b/gnucash/report/stylesheets/stylesheet-fancy.scm
@@ -370,23 +370,12 @@
            (gnc:make-html-text
             (gnc:html-markup-img (make-file-url logopixmap)))) )
 
-      (if (and headpixmap
-               (not (string=? headpixmap "")))
-          ;; check for header image file name nonblank
-          (begin
-            (gnc:html-table-set-cell!
-             t 0 headcolumn
-             (gnc:make-html-text
-              ;; XX: isn't there some way to apply the alignment to
-              ;; (gnc:html-markup-img headpixmap)?
-              (string-append
-               "<div align=\"" align "\">"
-               "<img src=\"" (make-file-url headpixmap) "\">"
-               "</div>")))
-            )
-          (gnc:html-table-set-cell!
-           t 0 headcolumn
-           (gnc:make-html-text " ")))
+      (if (and headpixmap (> (string-length headpixmap) 0))
+          (let* ((div (gnc:html-markup-img (make-file-url headpixmap)))
+                 (cell (gnc:make-html-table-cell (gnc:make-html-text div))))
+            (gnc:html-table-cell-set-style! cell "td" 'attribute `("align" ,align))
+            (gnc:html-table-set-cell! t 0 headcolumn cell))
+          (gnc:html-table-set-cell! t 0 headcolumn (gnc:make-html-text " ")))
 
       (apply
        gnc:html-table-set-cell!
diff --git a/gnucash/report/stylesheets/stylesheet-footer.scm b/gnucash/report/stylesheets/stylesheet-footer.scm
index fcebbbb81..a5ec521bc 100644
--- a/gnucash/report/stylesheets/stylesheet-footer.scm
+++ b/gnucash/report/stylesheets/stylesheet-footer.scm
@@ -390,18 +390,11 @@
               (gnc:html-markup-img (make-file-url logopixmap))))))
 
       (if (and headpixmap (> (string-length headpixmap) 0))
-          (begin
-            (gnc:html-table-set-cell!
-             t 0 headcolumn
-             (gnc:make-html-text
-              (string-append
-               "<div align=\"" align "\">"
-               "<img src=\"" (make-file-url headpixmap) "\">"
-               "</div>")))
-            )
-          (gnc:html-table-set-cell!
-           t 0 headcolumn
-           (gnc:make-html-text " ")))
+          (let* ((div (gnc:html-markup-img (make-file-url headpixmap)))
+                 (cell (gnc:make-html-table-cell (gnc:make-html-text div))))
+            (gnc:html-table-cell-set-style! cell "td" 'attribute `("align" ,align))
+            (gnc:html-table-set-cell! t 0 headcolumn cell))
+          (gnc:html-table-set-cell! t 0 headcolumn (gnc:make-html-text " ")))
 
       (apply
        gnc:html-table-set-cell!
diff --git a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
index 81bc37e90..bcf2d992c 100644
--- a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
+++ b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
@@ -496,17 +496,11 @@
               (gnc:html-markup-img (make-file-url logopixmap))))))
 
       (if (and headpixmap (> (string-length headpixmap) 0))
-          (begin
-            (gnc:html-table-set-cell!
-             t 0 headcolumn
-             (gnc:make-html-text
-              (string-append
-               "<div align=\"" align "\">"
-               "<img src=\"" (make-file-url headpixmap) "\">"
-               "</div>"))))
-          (gnc:html-table-set-cell!
-           t 0 headcolumn
-           (gnc:make-html-text " ")))
+          (let* ((div (gnc:html-markup-img (make-file-url headpixmap)))
+                 (cell (gnc:make-html-table-cell (gnc:make-html-text div))))
+            (gnc:html-table-cell-set-style! cell "td" 'attribute `("align" ,align))
+            (gnc:html-table-set-cell! t 0 headcolumn cell))
+          (gnc:html-table-set-cell! t 0 headcolumn (gnc:make-html-text " ")))
 
       (apply
        gnc:html-table-set-cell!

commit dc8310843b2dfe9bd56e38cb0adf315bbb9b7020
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Fri Oct 25 22:34:41 2019 +0800

    [stylesheets] remove unnecessary N_ in option section/name

diff --git a/gnucash/report/stylesheets/stylesheet-easy.scm b/gnucash/report/stylesheets/stylesheet-easy.scm
index b1eed52f5..29e1f6754 100644
--- a/gnucash/report/stylesheets/stylesheet-easy.scm
+++ b/gnucash/report/stylesheets/stylesheet-easy.scm
@@ -188,36 +188,31 @@
           (lambda (section name)
             (gnc:color-option->html
              (gnc:lookup-option options section name))))
-         (preparer (opt-val (N_ "General") (N_ "Preparer")))
-         (prepared-for (opt-val (N_ "General") (N_ "Prepared for")))
-         (show-preparer? (opt-val (N_ "General") (N_ "Show preparer info")))
-         (links? (opt-val (N_ "General") (N_ "Enable Links")))
-         (bgcolor (color-val (N_ "Colors") (N_ "Background Color")))
-         (textcolor (color-val (N_ "Colors") (N_ "Text Color")))
-         (linkcolor (color-val (N_ "Colors") (N_ "Link Color")))
-         (normal-row-color (color-val (N_ "Colors") (N_ "Table Cell Color")))
-         (alternate-row-color (color-val (N_ "Colors")
-                                         (N_ "Alternate Table Cell Color")))
+         (preparer (opt-val "General" "Preparer"))
+         (prepared-for (opt-val "General" "Prepared for"))
+         (show-preparer? (opt-val "General" "Show preparer info"))
+         (links? (opt-val "General" "Enable Links"))
+         (bgcolor (color-val "Colors" "Background Color"))
+         (textcolor (color-val "Colors" "Text Color"))
+         (linkcolor (color-val "Colors" "Link Color"))
+         (normal-row-color (color-val "Colors" "Table Cell Color"))
+         (alternate-row-color (color-val "Colors" "Alternate Table Cell Color"))
          (primary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Subheading/Subtotal Cell Color")))
+          (color-val "Colors" "Subheading/Subtotal Cell Color"))
          (secondary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Sub-subheading/total Cell Color")))
-         (grand-total-color (color-val (N_ "Colors")
-                                       (N_ "Grand Total Cell Color")))
-         (bgpixmap (opt-val (N_ "Images") (N_ "Background Tile")))
-         (headpixmap (opt-val (N_ "Images") (N_ "Heading Banner")))
-         (logopixmap (opt-val (N_ "Images") (N_ "Logo")))
-         (align (gnc:value->string(opt-val (N_ "Images") (N_ "Heading Alignment"))))
-         (spacing (opt-val (N_ "Tables") (N_ "Table cell spacing")))
-         (padding (opt-val (N_ "Tables") (N_ "Table cell padding")))
-         (border (opt-val (N_ "Tables") (N_ "Table border width")))
+          (color-val "Colors" "Sub-subheading/total Cell Color"))
+         (grand-total-color (color-val "Colors" "Grand Total Cell Color"))
+         (bgpixmap (opt-val "Images" "Background Tile"))
+         (headpixmap (opt-val "Images" "Heading Banner"))
+         (logopixmap (opt-val "Images" "Logo"))
+         (align (gnc:value->string (opt-val "Images" "Heading Alignment")))
+         (spacing (opt-val "Tables" "Table cell spacing"))
+         (padding (opt-val "Tables" "Table cell padding"))
+         (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-                                        ; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc
-                                   (gnc:make-html-text "<center>"))
+    ;; center the document without elements inheriting anything
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
 
     (gnc:html-document-set-style!
      ssdoc "body"
@@ -338,9 +333,9 @@
        'attribute (list "border" 0)
        'inheritable? #f)
 
-                                        ; set the header column to be the 2nd when we have a logo
-                                        ; do this so that when logo is not present, the document
-                                        ; is perfectly centered
+      ;; set the header column to be the 2nd when we have a logo
+      ;; do this so that when logo is not present, the document
+      ;; is perfectly centered
       (if (and logopixmap (> (string-length logopixmap) 0))
           (set! headcolumn 1))
 
@@ -372,7 +367,7 @@
               (gnc:html-markup-h3 headline))))
         )
 
-                                        ; only setup an image if we specified one
+      ;; only setup an image if we specified one
       (if (and logopixmap (> (string-length logopixmap) 0))
           (begin
             (gnc:html-table-set-cell!
@@ -399,7 +394,8 @@
        t 2 headcolumn
        (gnc:html-document-objects doc))
       (gnc:html-document-add-object! ssdoc t))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>")) ;;TODO: make this a div instead of <center> (deprecated)
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
+    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet
diff --git a/gnucash/report/stylesheets/stylesheet-fancy.scm b/gnucash/report/stylesheets/stylesheet-fancy.scm
index 26dae6e55..a28bf6c86 100644
--- a/gnucash/report/stylesheets/stylesheet-fancy.scm
+++ b/gnucash/report/stylesheets/stylesheet-fancy.scm
@@ -182,36 +182,31 @@
           (lambda (section name)
             (gnc:color-option->html
              (gnc:lookup-option options section name))))
-         (preparer (opt-val (N_ "General") (N_ "Preparer")))
-         (prepared-for (opt-val (N_ "General") (N_ "Prepared for")))
-         (show-preparer? (opt-val (N_ "General") (N_ "Show preparer info")))
-         (links? (opt-val (N_ "General") (N_ "Enable Links")))
-         (bgcolor (color-val (N_ "Colors") (N_ "Background Color")))
-         (textcolor (color-val (N_ "Colors") (N_ "Text Color")))
-         (linkcolor (color-val (N_ "Colors") (N_ "Link Color")))
-         (normal-row-color (color-val (N_ "Colors") (N_ "Table Cell Color")))
-         (alternate-row-color (color-val (N_ "Colors")
-                                         (N_ "Alternate Table Cell Color")))
+         (preparer (opt-val "General" "Preparer"))
+         (prepared-for (opt-val "General" "Prepared for"))
+         (show-preparer? (opt-val "General" "Show preparer info"))
+         (links? (opt-val "General" "Enable Links"))
+         (bgcolor (color-val "Colors" "Background Color"))
+         (textcolor (color-val "Colors" "Text Color"))
+         (linkcolor (color-val "Colors" "Link Color"))
+         (normal-row-color (color-val "Colors" "Table Cell Color"))
+         (alternate-row-color (color-val "Colors" "Alternate Table Cell Color"))
          (primary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Subheading/Subtotal Cell Color")))
+          (color-val "Colors" "Subheading/Subtotal Cell Color"))
          (secondary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Sub-subheading/total Cell Color")))
-         (grand-total-color (color-val (N_ "Colors")
-                                       (N_ "Grand Total Cell Color")))
-         (bgpixmap (opt-val (N_ "Images") (N_ "Background Tile")))
-         (headpixmap (opt-val (N_ "Images") (N_ "Heading Banner")))
-         (logopixmap (opt-val (N_ "Images") (N_ "Logo")))
-         (align (gnc:value->string(opt-val (N_ "Images") (N_ "Heading Alignment"))))
-         (spacing (opt-val (N_ "Tables") (N_ "Table cell spacing")))
-         (padding (opt-val (N_ "Tables") (N_ "Table cell padding")))
-         (border (opt-val (N_ "Tables") (N_ "Table border width")))
+          (color-val "Colors" "Sub-subheading/total Cell Color"))
+         (grand-total-color (color-val "Colors" "Grand Total Cell Color"))
+         (bgpixmap (opt-val "Images" "Background Tile"))
+         (headpixmap (opt-val "Images" "Heading Banner"))
+         (logopixmap (opt-val "Images" "Logo"))
+         (align (gnc:value->string (opt-val "Images" "Heading Alignment")))
+         (spacing (opt-val "Tables" "Table cell spacing"))
+         (padding (opt-val "Tables" "Table cell padding"))
+         (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
-                                        ; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc
-                                   (gnc:make-html-text "<center>"))
+    ;; center the document without elements inheriting anything
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
 
     (gnc:html-document-set-style!
      ssdoc "body"
@@ -339,9 +334,9 @@
              (doc-headline (gnc:html-document-headline doc))
              (headline (if (eq? doc-headline #f) title doc-headline)))
 
-                                        ; set the header column to be the 2nd when we have a logo
-                                        ; do this so that when logo is not present, the document
-                                        ; is perfectly centered
+        ;; set the header column to be the 2nd when we have a logo
+        ;; do this so that when logo is not present, the document
+        ;; is perfectly centered
         (if (and logopixmap (> (string-length logopixmap) 0))
             (set! headcolumn 1))
 
@@ -399,8 +394,8 @@
        (gnc:html-document-objects doc))
 
       (gnc:html-document-add-object! ssdoc t))
-    (gnc:html-document-add-object! ssdoc
-                                   (gnc:make-html-text "</center>")) ;;TODO: make this a div instead of <center> (deprecated)
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
+    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet
diff --git a/gnucash/report/stylesheets/stylesheet-footer.scm b/gnucash/report/stylesheets/stylesheet-footer.scm
index 5f22cbcc1..fcebbbb81 100644
--- a/gnucash/report/stylesheets/stylesheet-footer.scm
+++ b/gnucash/report/stylesheets/stylesheet-footer.scm
@@ -201,32 +201,28 @@
           (lambda (section name)
             (gnc:color-option->html
              (gnc:lookup-option options section name))))
-         (preparer (opt-val (N_ "General") (N_ "Preparer")))
-         (prepared-for (opt-val (N_ "General") (N_ "Prepared for")))
-         (show-preparer? (opt-val (N_ "General") (N_ "Show preparer info")))
-         (links? (opt-val (N_ "General") (N_ "Enable Links")))
-         (footer-text (opt-val (N_ "General") (N_ "Footer")))
-         (bgcolor (color-val (N_ "Colors") (N_ "Background Color")))
-         (textcolor (color-val (N_ "Colors") (N_ "Text Color")))
-         (linkcolor (color-val (N_ "Colors") (N_ "Link Color")))
-         (normal-row-color (color-val (N_ "Colors") (N_ "Table Cell Color")))
-         (alternate-row-color (color-val (N_ "Colors")
-                                         (N_ "Alternate Table Cell Color")))
+         (preparer (opt-val "General" "Preparer"))
+         (prepared-for (opt-val "General" "Prepared for"))
+         (show-preparer? (opt-val "General" "Show preparer info"))
+         (links? (opt-val "General" "Enable Links"))
+         (footer-text (opt-val "General" "Footer"))
+         (bgcolor (color-val "Colors" "Background Color"))
+         (textcolor (color-val "Colors" "Text Color"))
+         (linkcolor (color-val "Colors" "Link Color"))
+         (normal-row-color (color-val "Colors" "Table Cell Color"))
+         (alternate-row-color (color-val "Colors" "Alternate Table Cell Color"))
          (primary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Subheading/Subtotal Cell Color")))
+          (color-val "Colors" "Subheading/Subtotal Cell Color"))
          (secondary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Sub-subheading/total Cell Color")))
-         (grand-total-color (color-val (N_ "Colors")
-                                       (N_ "Grand Total Cell Color")))
-         (bgpixmap (opt-val (N_ "Images") (N_ "Background Tile")))
-         (headpixmap (opt-val (N_ "Images") (N_ "Heading Banner")))
-         (logopixmap (opt-val (N_ "Images") (N_ "Logo")))
-         (align (gnc:value->string(opt-val (N_ "Images") (N_ "Heading Alignment"))))
-         (spacing (opt-val (N_ "Tables") (N_ "Table cell spacing")))
-         (padding (opt-val (N_ "Tables") (N_ "Table cell padding")))
-         (border (opt-val (N_ "Tables") (N_ "Table border width")))
+          (color-val "Colors" "Sub-subheading/total Cell Color"))
+         (grand-total-color (color-val "Colors" "Grand Total Cell Color"))
+         (bgpixmap (opt-val "Images" "Background Tile"))
+         (headpixmap (opt-val "Images" "Heading Banner"))
+         (logopixmap (opt-val "Images" "Logo"))
+         (align (gnc:value->string(opt-val "Images" "Heading Alignment")))
+         (spacing (opt-val "Tables" "Table cell spacing"))
+         (padding (opt-val "Tables" "Table cell padding"))
+         (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
     ;; center the document without elements inheriting anything
diff --git a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
index be64e663b..81bc37e90 100644
--- a/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
+++ b/gnucash/report/stylesheets/stylesheet-head-or-tail.scm
@@ -257,46 +257,42 @@
           (lambda (section name)
             (gnc:color-option->html
              (gnc:lookup-option options section name))))
-         (preparer (opt-val (N_ "General") (N_ "Preparer")))
-         (prepared-for (opt-val (N_ "General") (N_ "Prepared for")))
-         (show-preparer? (opt-val (N_ "General") (N_ "Show preparer info")))
-         (show-receiver? (opt-val (N_ "General") (N_ "Show receiver info")))
-         (show-date? (opt-val (N_ "General") (N_ "Show date")))
-         (show-time? (opt-val (N_ "General") (N_ "Show time in addition to date")))
-         (show-gnucash-version? (opt-val (N_ "General") (N_ "Show GnuCash Version")))
-         (show-preparer-at-bottom? (opt-val (N_ "General") (N_ "Show preparer info at bottom")))
-         (show-receiver-at-bottom? (opt-val (N_ "General") (N_ "Show receiver info at bottom")))
-         (show-date-time-at-bottom? (opt-val (N_ "General") (N_ "Show date/time at bottom")))
-         (show-comments-at-bottom? (opt-val (N_ "General") (N_ "Show comments at bottom")))
-         (show-gnucash-version-at-bottom? (opt-val (N_ "General") (N_ "Show GnuCash version at bottom")))
-         (links? (opt-val (N_ "General") (N_ "Enable Links")))
-         (additional-comments (opt-val (N_ "General") (N_ "Additional Comments")))
-         (bgcolor (color-val (N_ "Colors") (N_ "Background Color")))
-         (textcolor (color-val (N_ "Colors") (N_ "Text Color")))
-         (linkcolor (color-val (N_ "Colors") (N_ "Link Color")))
-         (normal-row-color (color-val (N_ "Colors") (N_ "Table Cell Color")))
-         (alternate-row-color (color-val (N_ "Colors")
-                                         (N_ "Alternate Table Cell Color")))
+         (preparer (opt-val "General" "Preparer"))
+         (prepared-for (opt-val "General" "Prepared for"))
+         (show-preparer? (opt-val "General" "Show preparer info"))
+         (show-receiver? (opt-val "General" "Show receiver info"))
+         (show-date? (opt-val "General" "Show date"))
+         (show-time? (opt-val "General" "Show time in addition to date"))
+         (show-gnucash-version? (opt-val "General" "Show GnuCash Version"))
+         (show-preparer-at-bottom? (opt-val "General" "Show preparer info at bottom"))
+         (show-receiver-at-bottom? (opt-val "General" "Show receiver info at bottom"))
+         (show-date-time-at-bottom? (opt-val "General" "Show date/time at bottom"))
+         (show-comments-at-bottom? (opt-val "General" "Show comments at bottom"))
+         (show-gnucash-version-at-bottom?
+          (opt-val "General" "Show GnuCash version at bottom"))
+         (links? (opt-val "General" "Enable Links"))
+         (additional-comments (opt-val "General" "Additional Comments"))
+         (bgcolor (color-val "Colors" "Background Color"))
+         (textcolor (color-val "Colors" "Text Color"))
+         (linkcolor (color-val "Colors" "Link Color"))
+         (normal-row-color (color-val "Colors" "Table Cell Color"))
+         (alternate-row-color (color-val "Colors" "Alternate Table Cell Color"))
          (primary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Subheading/Subtotal Cell Color")))
+          (color-val "Colors" "Subheading/Subtotal Cell Color"))
          (secondary-subheading-color
-          (color-val (N_ "Colors")
-                     (N_ "Sub-subheading/total Cell Color")))
-         (grand-total-color (color-val (N_ "Colors")
-                                       (N_ "Grand Total Cell Color")))
-         (bgpixmap (opt-val (N_ "Images") (N_ "Background Tile")))
-         (headpixmap (opt-val (N_ "Images") (N_ "Heading Banner")))
-         (logopixmap (opt-val (N_ "Images") (N_ "Logo")))
-         (align (gnc:value->string(opt-val (N_ "Images") (N_ "Heading Alignment"))))
-         (spacing (opt-val (N_ "Tables") (N_ "Table cell spacing")))
-         (padding (opt-val (N_ "Tables") (N_ "Table cell padding")))
-         (border (opt-val (N_ "Tables") (N_ "Table border width")))
+          (color-val "Colors" "Sub-subheading/total Cell Color"))
+         (grand-total-color (color-val "Colors" "Grand Total Cell Color"))
+         (bgpixmap (opt-val "Images" "Background Tile"))
+         (headpixmap (opt-val "Images" "Heading Banner"))
+         (logopixmap (opt-val "Images" "Logo"))
+         (align (gnc:value->string(opt-val "Images" "Heading Alignment")))
+         (spacing (opt-val "Tables" "Table cell spacing"))
+         (padding (opt-val "Tables" "Table cell padding"))
+         (border (opt-val "Tables" "Table border width"))
          (headcolumn 0))
 
     ;; center the document without elements inheriting anything
-    (gnc:html-document-add-object! ssdoc
-                                   (gnc:make-html-text "<center>"))
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "<center>"))
 
     (gnc:html-document-set-style!
      ssdoc "body"
@@ -438,23 +434,17 @@
              (gnc:make-html-text
               (gnc:html-markup-i
                (_ "Prepared by: ")
-               (gnc:html-markup-b preparer)
-               )
-              (gnc:html-markup-br)
-              )
-             " "
-             )
+               (gnc:html-markup-b preparer))
+              (gnc:html-markup-br))
+             " ")
          (if (and show-receiver? (not show-receiver-at-bottom?))
              ;; print receiver info as additional header info
              (gnc:make-html-text
               (gnc:html-markup-i
                (_ "Prepared for: ")
                (gnc:html-markup-b prepared-for)
-               (gnc:html-markup-br)
-               )
-              )
-             " "
-             )
+               (gnc:html-markup-br)))
+             " ")
          (if (and show-date? (not show-date-time-at-bottom?))
              ;; print date/time info as additional header info
              (if show-time?
@@ -463,55 +453,39 @@
                    (_ "Report Creation Date: ")
                    (qof-print-date (gnc:get-today))
                    " "
-                   (gnc-print-time64 (current-time) "%X %Z")
-                   )
-                  (gnc:html-markup-br)
-                  )
+                   (gnc-print-time64 (current-time) "%X %Z"))
+                  (gnc:html-markup-br))
                  (gnc:make-html-text
                   (gnc:html-markup-i
                    (_ "Report Creation Date: ")
-                   (qof-print-date (gnc:get-today))
-                   )
-                  (gnc:html-markup-br)
-                  )
-                 )
-             " "
-             )
+                   (qof-print-date (gnc:get-today)))
+                  (gnc:html-markup-br)))
+             " ")
          (if (and show-gnucash-version? (not show-gnucash-version-at-bottom?))
              ;; print the GnuCash version string as additional header info
              (gnc:make-html-text
               (gnc:html-markup-i
                "GnuCash "
-               gnc:version
-               )
-              (gnc:html-markup-br)
-              )
-             " "
-             )
+               gnc:version)
+              (gnc:html-markup-br))
+             " ")
          (if (not show-comments-at-bottom?)
              ;; print additional comments as additional header info
              (gnc:make-html-text
               (gnc:html-markup-br)
               (gnc:html-markup-i additional-comments)
-              (gnc:html-markup-br)
-              )
-             " "
-             )
+              (gnc:html-markup-br))
+             " ")
          ;; add separator line if any additional header info is printed
          (if (or
               (and show-preparer? (not show-preparer-at-bottom?))
               (and show-receiver? (not show-receiver-at-bottom?))
               (and show-date? (not show-date-time-at-bottom?))
               (and show-gnucash-version? (not show-gnucash-version-at-bottom?))
-              (not show-comments-at-bottom?)
-              )
+              (not show-comments-at-bottom?))
              (gnc:make-html-text
-              (gnc:html-markup-br)
-              )
-             " "
-             )
-         )
-        )
+              (gnc:html-markup-br))
+             " ")))
 
       ;; only setup an image if we specified one
       (if (and logopixmap (> (string-length logopixmap) 0))
@@ -529,8 +503,7 @@
               (string-append
                "<div align=\"" align "\">"
                "<img src=\"" (make-file-url headpixmap) "\">"
-               "</div>")))
-            )
+               "</div>"))))
           (gnc:html-table-set-cell!
            t 0 headcolumn
            (gnc:make-html-text " ")))
@@ -550,36 +523,28 @@
             (and show-preparer? show-preparer-at-bottom?)
             (and show-receiver? show-receiver-at-bottom?)
             (and show-date? show-date-time-at-bottom?)
-            (and show-gnucash-version? show-gnucash-version-at-bottom?)
-            show-comments-at-bottom?
-            )
+            (and show-gnucash-version?
+                 show-gnucash-version-at-bottom?)
+            show-comments-at-bottom?)
            (gnc:make-html-text
-            (gnc:html-markup-br)
-            )
-           " "
-           )
+            (gnc:html-markup-br))
+           " ")
        (if (and show-preparer? show-preparer-at-bottom?)
            ;; print preparer info as additional header info
            (gnc:make-html-text
             (gnc:html-markup-i
              (_ "Prepared by: ")
-             (gnc:html-markup-b preparer)
-             )
-            (gnc:html-markup-br)
-            )
-           " "
-           )
+             (gnc:html-markup-b preparer))
+            (gnc:html-markup-br))
+           " ")
        (if (and show-receiver? show-receiver-at-bottom?)
            ;; print receiver info as additional header info
            (gnc:make-html-text
             (gnc:html-markup-i
              (_ "Prepared for: ")
-             (gnc:html-markup-b prepared-for)
-             )
-            (gnc:html-markup-br)
-            )
-           " "
-           )
+             (gnc:html-markup-b prepared-for))
+            (gnc:html-markup-br))
+           " ")
        (if (and show-date? show-date-time-at-bottom?)
            ;; print date/time info as additional header info
            (if show-time?
@@ -588,42 +553,31 @@
                  (_ "Report Creation Date: ")
                  (qof-print-date (gnc:get-today))
                  " "
-                 (gnc-print-time64 (current-time) "%X %Z")
-                 )
-                (gnc:html-markup-br)
-                )
+                 (gnc-print-time64 (current-time) "%X %Z"))
+                (gnc:html-markup-br))
                (gnc:make-html-text
                 (gnc:html-markup-i
                  (_ "Report Creation Date: ")
                  (qof-print-date (gnc:get-today))
-                 (gnc:html-markup-br)
-                 )
-                )
-               )
-           " "
-           )
+                 (gnc:html-markup-br))))
+           " ")
        (if (and show-gnucash-version? show-gnucash-version-at-bottom?)
            ;; print the GnuCash version string as additional header info
            (gnc:make-html-text
             (gnc:html-markup-i
              (_ "GnuCash ")
-             gnc:version
-             )
-            (gnc:html-markup-br)
-            )
-           " "
-           )
+             gnc:version)
+            (gnc:html-markup-br))
+           " ")
        (if show-comments-at-bottom?
            ;; print additional comments as additional header info
            (gnc:make-html-text
             (gnc:html-markup-br)
             (gnc:html-markup-i additional-comments)
-            (gnc:html-markup-br)
-            )
-           " "
-           )
-       ))
-    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>")) ;;TODO: make this a div instead of <center> (deprecated)
+            (gnc:html-markup-br))
+           " ")))
+    (gnc:html-document-add-object! ssdoc (gnc:make-html-text "</center>"))
+    ;;TODO: make this a div instead of <center> (deprecated)
     ssdoc))
 
 (gnc:define-html-style-sheet



Summary of changes:
 gnucash/report/stylesheets/stylesheet-easy.scm     |  72 +++-----
 gnucash/report/stylesheets/stylesheet-fancy.scm    |  78 +++-----
 gnucash/report/stylesheets/stylesheet-footer.scm   |  68 +++----
 .../report/stylesheets/stylesheet-head-or-tail.scm | 204 ++++++++-------------
 4 files changed, 158 insertions(+), 264 deletions(-)



More information about the gnucash-changes mailing list