mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Add "file://" URL type to images in invoices. On win32, this at least allows the exported
invoice html to load in firefox. It still doesn't fix it in webkit, for some reason. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18328 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
41042912b1
commit
eb5b4f7bb4
@ -679,6 +679,7 @@
|
||||
(export gnc:get-assoc-account-balances)
|
||||
(export gnc:select-assoc-account-balance)
|
||||
(export gnc:get-assoc-account-balances-total)
|
||||
(export make-file-url)
|
||||
|
||||
(load-from-path "commodity-utilities.scm")
|
||||
(load-from-path "html-barchart.scm")
|
||||
|
@ -17,6 +17,8 @@
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(use-modules (srfi srfi-13))
|
||||
|
||||
(define (list-ref-safe list elt)
|
||||
(if (> (length list) elt)
|
||||
(list-ref list elt)
|
||||
@ -967,3 +969,12 @@
|
||||
(total 'merge (car (cdr account-balance)) #f))
|
||||
account-balances)
|
||||
total))
|
||||
|
||||
;; Adds "file://" to the beginning of a URL if it doesn't already exist
|
||||
;;
|
||||
;; @param url URL
|
||||
;; @return URL with "file://" as the URL type if it isn't already there
|
||||
(define (make-file-url url)
|
||||
(if (string-prefix? "file://" url)
|
||||
url
|
||||
(string-append "file://" url)))
|
||||
|
@ -358,7 +358,7 @@
|
||||
(gnc:html-table-set-cell!
|
||||
t 0 0
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-img logopixmap)))))
|
||||
(gnc:html-markup-img (make-file-url logopixmap))))))
|
||||
|
||||
(if (and headpixmap (> (string-length headpixmap) 0))
|
||||
(begin
|
||||
@ -367,7 +367,7 @@
|
||||
(gnc:make-html-text
|
||||
(string-append
|
||||
"<div align=\"" align "\">"
|
||||
"<img src=\"" headpixmap "\">"
|
||||
"<img src=\"" (make-file-url headpixmap) "\">"
|
||||
"</div>")))
|
||||
)
|
||||
(gnc:html-table-set-cell!
|
||||
|
@ -354,7 +354,7 @@
|
||||
(gnc:html-table-set-cell!
|
||||
t 0 0
|
||||
(gnc:make-html-text
|
||||
(gnc:html-markup-img logopixmap))) )
|
||||
(gnc:html-markup-img (make-file-url logopixmap)))) )
|
||||
|
||||
(if (and headpixmap
|
||||
(not (string=? headpixmap "")))
|
||||
@ -367,7 +367,7 @@
|
||||
;; (gnc:html-markup-img headpixmap)?
|
||||
(string-append
|
||||
"<div align=\"" align "\">"
|
||||
"<img src=\"" headpixmap "\">"
|
||||
"<img src=\"" (make-file-url headpixmap) "\">"
|
||||
"</div>")))
|
||||
)
|
||||
(gnc:html-table-set-cell!
|
||||
|
Loading…
Reference in New Issue
Block a user