A real solution instead of <img> will probably involve registering either a uri type handler or a mime type handler and getting control back that way to load the content. Unfortunately, I don't see api's to do that yet. I could probably access the underlying webkit or gtkmozembed object, but that would involve C++ coding.
Phil ________________________________ From: Christian Stimming <[email protected]> To: [email protected] Cc: Phil Longstaff <[email protected]>; Gnucash list <[email protected]> Sent: Monday, March 30, 2009 2:23:50 PM Subject: Re: Webkit status (updated) Sound great! I'll have a look these days. Am Samstag, 28. März 2009 23:28 schrieb Phil Longstaff: > It turned out to be simple to look through the html string for an <object> > tag, then remove it and pass it to an object handler. The object handlers > used by gnc_html_webkit parse this string for the info put into the html > string by html-barchart.scm/html-piechart.scm/html-linechart.scm/html- > scatter.scml and use that to pass to gog to create the graph pixbuf. The > pixbuf is then saved to /tmp as a png image, and the original <object> > string is replaced by a new <img> string with a reference to the image. Err... saving images into /tmp and embedding them through <img> is a good idea to get the new engine up and running. However, in the long run this is probably not so good a solution, because saving temporary files somewhere on disk opens up a new can of worms. Privacy issues about the pictures with financial data being the most prominent, I guess. Are there other solutions for picture embedding available in the long run? > What configuration policies do we want? If webkit is available, use it and > otherwise fall back to gtkhtml? Require webkit and never use gtkhtml > again? Once I have modified configure.in appropriately and done a bit of > cleanup, it will be ready to move to trunk. > > The same trick could also be used for gtkmozembed in case we want to embed > gecko instead. Support for gtkmozembed in gnucash is just preliminary but > can be easily modeled after the webkit support. > > Thoughts? I think gtkhtml can be removed completely quite soon, as soon as several developers have confirmed all required features are available. Gruß Christian _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
