gnucash master: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Wed Feb 19 16:48:46 EST 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/fd76a311 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d5729306 (commit)
	from  https://github.com/Gnucash/gnucash/commit/8e1dba7e (commit)



commit fd76a311040cbdc3427d3bba6191a4bba4b026db
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Feb 18 21:25:02 2020 +0800

    [utilities] deprecate gnc:substring-replace-from-to
    
    with jqplot gone, no need to use this function anymore.

diff --git a/bindings/guile/utilities.scm b/bindings/guile/utilities.scm
index 261178d99..31a96ab41 100644
--- a/bindings/guile/utilities.scm
+++ b/bindings/guile/utilities.scm
@@ -163,6 +163,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-public (gnc:substring-replace-from-to s1 s2 s3 start end-after)
+  (issue-deprecation-warning "gnc:substring-replace-from-to is deprecated.")
   (string-replace-substring
    s1 s2 s3 0 (string-length s1) (max 0 (1- start))
    (and (positive? end-after) (+ (max 0 (1- start)) (1- end-after)))))

commit d5729306a07bf022c7ee4ba2d7c3011acd87ebeb
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue Feb 18 21:24:41 2020 +0800

    [report-core] don't need to remove jquery anymore

diff --git a/gnucash/report/report-core.scm b/gnucash/report/report-core.scm
index f563eaedd..b62539bf2 100644
--- a/gnucash/report/report-core.scm
+++ b/gnucash/report/report-core.scm
@@ -730,22 +730,13 @@ not found.")))
 
 ;; looks up the report by id and renders it with gnc:report-render-html
 ;; marks the cursor busy during rendering; returns the html
-;; Note: the final html document is post-processed to ensure there's only one single
-;;       inclusion of the jquery/jqplot libraries. This is only needed to fix multicolumn
-;;       reports with multiple charts, but doing it more generally is an
-;;       acceptable hack until a cleaner solution can be found (bug #704525)
 (define (gnc:report-run id)
   (let ((report (gnc-report-find id))
         (html #f))
     (gnc-set-busy-cursor '() #t)
     (gnc:backtrace-if-exception
      (lambda ()
-       (if report
-           (begin
-             (set! html (gnc:report-render-html report #t))
-             (set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.min.js") "" 2 -1))
-             (set! html (gnc:substring-replace-from-to html (gnc:html-js-include "jqplot/jquery.jqplot.js") "" 2 -1))
-             ))))
+       (if report (set! html (gnc:report-render-html report #t)))))
     (gnc-unset-busy-cursor '())
     html))
 



Summary of changes:
 bindings/guile/utilities.scm   |  1 +
 gnucash/report/report-core.scm | 11 +----------
 2 files changed, 2 insertions(+), 10 deletions(-)



More information about the gnucash-changes mailing list