>>()
27 Reader Comments
MM_swapImage()
;P
This tutorial is not "GTK+ in a browser". It is a WebKit renderer in a GTK+ window on the desktop. It's about using web technologies to accelerate desktop application development, not the other way around.
Of course they make a renderer, they just didn't do it from scratch. Unless you also question Apple writing an OS, either.
Yeah I see your point. Don't I feel stupid.
FFS, you could get the guy's name right.
It is Tim Berners-Lee.
He is somewhat important.
That's not the logic behind ChromeOS, FireFox, and WebOS.
One note, though:
I just turned
into
I didn't look at the documentation or anything, just threw a random parameter in there. Seems to work.
Thanks!
Yep, it depends on which version of PyGTK+ you are using. According to the docs, the pos attribute has a default value of -1 in PyGTK+ 2.12 and higher. I figured that most people would have that by now, but I guess some people on more stable long-term distros might have older versions.
EDIT:
Hmm,
Gives me 2.15.4. And I can use status icons from Python, which was added in 2.12, wasn't it?
EDIT THE SECOND:
According to my package manager, I have 2.12.1-63.3 installed.
GLib-ERROR **: The thread system is not yet initialized.
aborting...
Aborted
Workaround:
import gobject
gobject.threads_init()
Just insert both lines above line 18 (self.editor = webkit.WebView())
Seconded! Good stuff, Ryan.
How does FireFox fit in with the other 2 in your list?
This is a Macromedia specific behavior.
I'm sure there is something important to be learned about humanity in there (particularly near the end), but I can't quite figure out what it is. I guess that is what happens when people with Asperger's try to use a bug tracker.
Was a silly joke to semantic web developers out there that don't use javascript for simple image rollovers. Shows why we prefer hand coding to WYSIWYG editing. Not downplaying Ryan's work, just throwing in a bit of nostalgia for old school devs.
Firefox is largely a XUL/JS app wrapped around Gecko.
rpm -q python
python-2.5.1-26.fc9.i386
rpm -q pywebkitgtk
pywebkitgtk-1.0.1-1.fc9.i386
rpm -q pygtk2
pygtk2-2.12.1-6.fc9.i386
Anyway, great article!
It's also not the logic behind almost all mobile operating systems in use today. iPhone, Windows Mobile 6.1 - 7, Pre ... All use HTML of some sort and javascript to produce applications for the platform. At this point, it looks more and more like the OSX/Linux/Windows desktop models are the odd men out. Even GDI+ is dying a slow death on Windows giving way to DirectX 2D. How long is it before the 3D browser stuff converges with the DirectX 2D api's to provide standard Windows applications. Not long in my opinion especially if Windows 7 widgets do even remotely well.
Not that I dislike wxPython. It's just that I had to learn a whole new system.
Wonderful article. This is exactly what I was looking for on a side project I'm currently undertaking. I had no idea WebKit could be used this easily and effectively as a WYSIWYG editor component.
The PyQt version will probably appear in the near future.
Traceback (most recent call last):
File "test.py", line 8, in <module>
import gtk, webkit, os
ImportError: No module named webkit"
Just letting other Ubuntu 9.04/Jaunty users know that you need to install 'python-webkit' for the examples to work.
You can install it via Synaptic or 'sudo aptitude install python-webkit' in the terminal.
This package is also required on other Linux distros, but it may go by a different name. Cheers!
You must login or create an account to comment.