[PATCH] Suppress extraneous entries in report heaader

Dave Herman dvherman at gmail.com
Tue Jan 24 09:35:46 EST 2006


This is a very minor patch to the "fancy" (Technicolor) stylesheet.  It 
suppresses extraneous entries table entries in reports when there
are no files specified for the "logo pix" file or the "header pix" file.

Currently empty boxes appear if no files are selected for these entries.
Note: Patch works for both 1.8 series and gnome2 - stylesheets are 
identical code.


Index: src/report/stylesheets/stylesheet-fancy.scm
===================================================================
--- src/report/stylesheets/stylesheet-fancy.scm    (revision 12305)
+++ src/report/stylesheets/stylesheet-fancy.scm    (working copy)
@@ -289,16 +289,22 @@
         (gnc:html-markup-b
          (gnc:html-document-title doc)))))
      
-      (gnc:html-table-set-cell!
-       t 0 0
-       (gnc:make-html-text
-    (gnc:html-markup-img logopixmap)))
+    (if (and logopixmap
+         (not (string=? logopixmap "")))
+          ;; check for logo image file name non blank
+      (gnc:html-table-set-cell!
+        t 0 0
+          (gnc:make-html-text
+       (gnc:html-markup-img logopixmap))) )
+;     
+    (if (and headpixmap
+         (not (string=? headpixmap "")))
+          ;; check for header image file name nonblank
+      (gnc:html-table-set-cell!
+        t 0 1
+      (gnc:make-html-text
+       (gnc:html-markup-img headpixmap))) )
      
-      (gnc:html-table-set-cell!
-       t 0 1
-       (gnc:make-html-text
-    (gnc:html-markup-img headpixmap)))
-     
       (apply
        gnc:html-table-set-cell!
        t 2 1
@@ -308,8 +314,7 @@
     ssdoc))
 
 (gnc:define-html-style-sheet
- 'version 1
- 'name (N_ "Fancy")
+ 'version 1.01 'name (N_ "Fancy")
  'renderer fancy-renderer
  'options-generator fancy-options)
 
===========================================================================================



More information about the gnucash-devel mailing list