[PATCH] Suppress extraneous entries in report heaader

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Suppress extraneous entries in report heaader

Dave Herman

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)
 
===========================================================================================

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

Christian Stimming
Hi Dave,

Thanks for submitting this. I've filed it into bugzilla as
http://bugzilla.gnome.org/show_bug.cgi?id=328815 since it seems right
now nobody had time for it, but I'm sure sometime over the next weeks
someone will glady apply it to SVN. bugzilla will ensure that it doesn't
get forgotten.

Christian

Dave Herman schrieb:
>
> 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.
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

David Hampton-2
In reply to this post by Dave Herman
On Tue, 2006-01-24 at 07:35 -0700, Dave Herman wrote:
> 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.

Thanks for the patch.  I applied it to svn for the next release.

David


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

Dave Herman
The patch apperars to not have been correct !

It breaks all (at least those I tried) that attempt to use it.

The code that should be inserted appears to have been inserted twice.


On Sun, 2006-01-29 at 20:58 -0500, David Hampton wrote:

> On Tue, 2006-01-24 at 07:35 -0700, Dave Herman wrote:
> > 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.
>
> Thanks for the patch.  I applied it to svn for the next release.
>
> David
>
>

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

David Hampton-2
On Mon, 2006-01-30 at 09:59 -0700, Dave Herman wrote:
> The patch apperars to not have been correct !
>
> It breaks all (at least those I tried) that attempt to use it.
>
> The code that should be inserted appears to have been inserted twice.

I reviewed the diffs and the change was only made once.  I believe I had
to patch the changes by hand, so svn may not have detected that your
local changes should have been replaced in the update.  Please check
your copy of stylesheet-fancy.scm and see if it has local changes.

David


_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

Dave Herman
Your analysis seem likely there were

<<<<<<< .mine
.
.
.

===========

lines in my style-sheets.

Perhaps I'm "gun shy" about breaking the reports!

FYI can anybody run the "Tax Report /TXF Export" ?  I'll look more
before BZ.

Dave


On Mon, 2006-01-30 at 12:28 -0500, David Hampton wrote:

> On Mon, 2006-01-30 at 09:59 -0700, Dave Herman wrote:
> > The patch apperars to not have been correct !
> >
> > It breaks all (at least those I tried) that attempt to use it.
> >
> > The code that should be inserted appears to have been inserted twice.
>
> I reviewed the diffs and the change was only made once.  I believe I had
> to patch the changes by hand, so svn may not have detected that your
> local changes should have been replaced in the update.  Please check
> your copy of stylesheet-fancy.scm and see if it has local changes.
>
> David
>
>

_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Suppress extraneous entries in report heaader

Derek Atkins
Dave Herman <[hidden email]> writes:

> Your analysis seem likely there were
>
> <<<<<<< .mine

run "svn revert /path/to/file" and then "make install" and try again.

-derek

--
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       [hidden email]                        PGP key available
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel