[webkit-gtk] Handling "create-plugin-widget" signals
mbarnes at redhat.com
Fri Apr 9 09:27:43 PDT 2010
I'm starting to integrate WebKit/GTK+ into Evolution and I need a bit of
In order to not be completely blocked on libsoup's "new-io" branch, I've
been trying to convert a few cases where we use custom URI schemes with
GtkHTML to <object> tags, but I can't seem to get it working.
A simple case is embedding themed icons into the HTML output.
Using GtkHTML, our hypertext markup looked like this:
<img width="16" height="16" src="evo-icon:<<icon-name>>"/>
and we would handle this in GtkHTML's "url-requested" signal.
With WebKit/GTK+, I'm attempting to do this:
<object width="16" height="16"
and then handle it in WebKitWebView's "create-plugin-widget" signal.
The signal is being emitted and has the correct parameters. In the
handler I load a GdkPixbuf using gtk_icon_theme_load_icon(), then wrap
it in a GtkImage widget, call gtk_widget_show(), and return the widget
to the web view.
As far as I can tell I'm doing everything correctly according to the API
docs, yet the image widget is not shown. It looks like there's a space
allocated for it with correct dimensions, but no image. I'm stumped.
Anything I've described here look wrong or isn't supported yet?
I'm building against the WebKit git repo from maybe a week ago.
More information about the webkit-gtk