So I start trying and found a way to use webkit inside wxPython.
I haven't done many tests and only run it in my system (Ubuntu 10.04)
I'm not sure if it's robust enough to be used in prodution code,
but at least it's funny. You can even edit on it, doing .SetEditable(True)
There's some problems with pages with flash only - content draw problem.
The same happend with pygtk - so not a wxPython problem.
To run the demo attached you need:
pywebkitgtk
pygtk
I tested with:
pywebkitgtk 1.1.7
pygtk 2.17
wxPython 2.6 and 2.8
All from Ubuntu 10.04 repository
Regards,
Ricardo
I found that flash was freezing the app.
I attached the all demo again, correcting this issue, I hope
Ricardo
This is a good example. It would be nice if it was added to the wiki
along with some explainations so others can easily find it there if they
need to do something similar.
--
Robin Dunn
Software Craftsman
http://wxPython.org
Finally I added to the wiki (http://wiki.wxpython.org/wxGTKWebKit)
It's a simpler "version" of what I've posted here, just to be cleaner and clear.
Is the explanation good enough?
What could be done to improve it?
Is the page title wxGTKWebKit OK?
Should have a link to it somewhere?
Ricardo
Thanks
> Why is a GTK Pizza required? That seems kind of strange to me.
>
The best I can say, It's a wxWidget internal control to "bridge" the
wxWidgets and GTK
funcionality.
You can read a tecnical description in src/gtk/window.cpp, for eg:
http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/src/gtk/window.cpp?revision=61811&view=markup
around line 90
Ricardo
> I linked to it from the Recipes page: http://wiki.wxpython.org/RecipesControls
>
> Why is a GTK Pizza required? That seems kind of strange to me.
The Pizza widget is where a lot of the wx personality for non-control
widgets (like panels) is implemented. I'm not sure why that name was
chosen, maybe just to help ensure it didn't conflict with something else.
Glad that may be usefull for you.
Today's distros (gnome based, at least) are python and pygtk depend.
I was hoping that was the case that a distro near-clean install was
enough but I was not sure since my system is far from be a clean
install at the moment, so I didn't mentioned.
> One suggestion for the wiki. It wasn't immediately clear that the
> first block of code should be saved as a module called webkit_gtk.py
> which should be put in the same folder as a module with the other code
> in it. Once I figured that out it was plain sailing. Once again,
> thanks for sharing your solution.
You are right. Done.
Ricardo
You should also be able to use the EVT_WINDOW_CREATE event to do it. On
wxGTK that event is sent when the window is "realized" (X-Windows
terminology which means that it has been mapped to the display server.)
You can see an example of using EVT_WINDOW_CREATE in the ShapedWindow
sample in the demo.