gecko-embed API additions
Marco Pesenti Gritti
mpg at redhat.com
Wed Sep 20 19:41:21 EDT 2006
Owen Williams wrote:
> I develop an RSS reader called PenguinTV[1] that I am adapting for use
> on the olpc. Right now I use gtkhtml for my program, but I'd like to
> adapt it for gecko-embed. However there are some gaps in the API that
> makes it impossible to use in its current state.
>
> Right now there is no way to tell the widget to load arbitrary html
> data. I need to do this to render my RSS pages, and I can imagine that
> other projects would also want to be able to display arbitrary html. In
> gtkmozembed, there are three functions that provide this functionality:
> open_stream, append_data, and close_stream. I think it would be
> reasonable to add these functions to the python API.
>
> The other thing I need is to be able to tell moz that I don't want it to
> respond to links clicked in the browser. For instance, my application
> handles all of the URIs itself, and performs actions for some internal
> pseudo-URIs or spawns a new browser window (activity) for any external
> internet links that are clicked.
>
> Currently, gtkmozembed enables this behavior by listening to the
> response to the "open-uri" signal. If I return True from my handler,
> moz cancels the page load. While this seems acceptable to me, I was
> chatting with Marco and he said there were problems with this scheme.
> The specific mechanism doesn't make a big difference to me, but I need
> to be able to prevent gecko-embed from loading new pages unless I tell
> it to.
>
> I think these changes are reasonable, considering that they allow
> gecko-embed to be used anywhere one wants html renderring but not web
> browsing. It could apply to email, rss, or chat.
>
Hi Owen,
this made me rethink a bit about the whole gecko embedding situation. I
will try to post about it later but the quick summary is... I dropped
gecko-embed and made sugar use gtkmozembed directly. Also, I added the
gtkmozembed bindings to sugar-jhbuild.
The remaining issue is open-uri being basically broken in the bindings,
right? It should be fixable, we can figure it out tomorrow.
Thanks,
Marco
More information about the Devel
mailing list