The basic flow is that in the C code, the report engine asks the html code to show a uri such as "report:id=3". The html code sees the uri type "report" and calls the report engine back to supply it with html. The report engine then returns a string with the html code. I don't know why gnc-document gets in there.
Phil ________________________________ From: Chris Dennis <[email protected]> To: Phil Longstaff <[email protected]> Cc: Gnucash list <[email protected]> Sent: Monday, March 30, 2009 3:00:16 AM Subject: Re: Webkit status (updated) Phil Longstaff wrote: > So, at this point, with libwebkit-1.0-1 and libwebkit-dev installed (on > kubuntu), I can replace use of gtkhtml by webkit. Excellent! Would it also be possible to include the option for a report to return a simple HTML string rather than a gnc document? My new-fangled eguile-based reports (see http://bugzilla.gnome.org/show_bug.cgi?id=574582) create such an HTML string, and then convert it to a gnc document, and then it gets converted straight back again. In fact I think all that is required to achieve this is the following patch (which I've edited to avoid wrapping, but you get the gist): Index: report.scm =================================================================== --- report.scm (revision 18001) +++ report.scm (working copy) @@ -633,8 +633,11 @@ (stylesheet (gnc:report-stylesheet report)) (doc (renderer report)) (html #f)) - (gnc:html-document-set-style-sheet! doc stylesheet) - (set! html (gnc:html-document-render doc headers?)) + (if (string? doc) + (set! html doc) + (begin + (gnc:html-document-set-style-sheet! doc stylesheet) + (set! html (gnc:html-document-render doc headers?)))) (gnc:report-set-ctext! report html) ;; cache the html (gnc:report-set-dirty?! report #f) ;; mark it clean html) cheers Chris -- Chris Dennis [email protected] Fordingbridge, Hampshire, UK _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
