From ff75ad7043fc6e3d6c216b93a698a2d05522a358 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 27 Dec 2021 09:44:00 -0800 Subject: [PATCH] gnc:html-foo-include: Use gnc-resolve-file-path. --- bindings/core-utils.i | 6 +++--- gnucash/report/html-chart.scm | 3 +-- gnucash/report/html-utilities.scm | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bindings/core-utils.i b/bindings/core-utils.i index e5cd3cf54c..f8c9edb3c5 100644 --- a/bindings/core-utils.i +++ b/bindings/core-utils.i @@ -69,15 +69,15 @@ gchar * gnc_path_get_localedir(void); %newobject gnc_path_get_stdreportsdir; gchar * gnc_path_get_stdreportsdir(void); -%newobject gnc_path_find_localized_html_file; -gchar * gnc_path_find_localized_html_file(const gchar *); - %newobject gnc_build_userdata_path; gchar * gnc_build_userdata_path(const gchar *); %newobject gnc_file_path_absolute; gchar *gnc_file_path_absolute (const gchar *, const gchar *); +%newobject gnc_resolve_file_path; +gchar *gnc_resolve_file_path (const gchar *); + %newobject gnc_build_scm_path; gchar * gnc_build_scm_path(const gchar *); diff --git a/gnucash/report/html-chart.scm b/gnucash/report/html-chart.scm index 6750c51ed5..1091a89fe3 100644 --- a/gnucash/report/html-chart.scm +++ b/gnucash/report/html-chart.scm @@ -444,8 +444,7 @@ document.getElementById(chartid).onclick = function(evt) { ;; clashing on multi-column reports (id (symbol->string (gensym "chart")))) - (push (gnc:html-js-include - (gnc-path-find-localized-html-file "chartjs/Chart.bundle.min.js"))) + (push (gnc:html-js-include "chartjs/Chart.bundle.min.js")) ;; the following hidden h3 is used to query style and copy onto chartjs (push "

") diff --git a/gnucash/report/html-utilities.scm b/gnucash/report/html-utilities.scm index 20bf5e3546..033723ada9 100644 --- a/gnucash/report/html-utilities.scm +++ b/gnucash/report/html-utilities.scm @@ -425,12 +425,12 @@ (define (gnc:html-js-include file) (format #f "\n" - (make-uri (gnc-path-find-localized-html-file file)))) + (make-uri (gnc-resolve-file-path file)))) (define (gnc:html-css-include file) (format #f - "\n" - (gnc-path-find-localized-html-file file))) + "\n" + (make-uri (gnc-resolve-file-path file))))