Marco added borders around the window previews, which were really needed now that we can show multiple window thumbnails per preview (and we'll be working on making it possible to mouse over those tooltips and select windows from there too :), Rob has been tidying up the extenders and jobs/notifications in the system tray, Sebastian's been working on Akonadi and OpenSocial glue, a number of nice little additions have been made to various widgets (including the often requested "Show applications by name in Kickoff" option), to name a few things off the top of my head.
The new system tray hotness we've been working on is now in extragear/libs/ for 4.3 and we'll be rolling a tarball for libknotificationitem-1.so.1 for 4.3 and committing our changes to various KDE apps to use the new protocol. So if you come across a check for libknotificationitem, you know where to look now. ;) I'm very excited about that.
It was when I visited planetkde.org, however, that I found my "fun thing to do today": Jos' blog on writing applications with SVG.
"SVG!" I murmured to myself, "I know SVG stuff! Plasma knows SVG stuff! Screw showing it in a web browser, let's try it on Plasma!" Now, Plasma::Svg is not designed for things like Jos' app-in-an-SVG; it is an image painter that uses SVG data to create the pixmaps. That's very, very useful (more so than you might think until you start trying to use SVG to paint interface elements :) but also very, very different from what Jos is doing.
However, Plasma has Plasma::WebView which is a nice little QGraphicsView wrapper around QtWebKit, and QtWebKit comes with an SVG engine that is quite capable of handling Jos' file. Just to check, I threw down a Web Browser plasmoid and loaded the SVG file from disk in it:

(It's a little blocky because I was also playing with the zoom level.)
That wasn't very exciting though: I knew it would work because

Here's the code, all four lines of it:
layout = new LinearLayout(plasmoid);
view = new WebView();
layout.addItem(view);
view.url = Url(plasmoid.file("images", "cubetest.svg"));
All the magic, of course, is in WebView and the cubetest.svg file. The Plasmoid is fully resizable (yes, the contents scale to match the size of the Plasmoid smoothly) and the SVG is fully interactive. As I started spinning cubes around P. came up and said, "Ooh, what's that? Is it a new game? How do you play it?" :)
You may notice in the above code that the SVG file is fetched from the Plasmoid. It's actually using the Plasma::Package associated with the Plasmoid and finding the cubetest.svg file in the images location. That makes the Plasmoid 100% self-contained: it's the application (cubetest.svg) and the "player" (QtWebKit via Plasma) all in one.
If you have KDE from svn (or, soon enough, 4.3) you can download the Cube Test Plasmoid here, all 4.7k of it, and try it out today!
p.s. I totally missed posting this when I was first sent the link, but one of my presentations from the Student Summit on Sustainability on the social implications of F/OSS is up on blip.tv. Thanks, Pascal, for passing this on and everyone on the organization team that made S3 such a terrific event!

9 comments:
Excellent!
Another comment (with working example!) I got on using SVG for writing applications is that one can embedded images with data urls.
Seeing that there is at a potential fan (P.), I guess I'll have to go the whole distance in porting CubeTest.
Oh another small remark/challenge.
That svg is actually transparent, but the plasmoid is not ....
it's arora :)
The browser is spelt "arora" not "aurora".
"self contained"? I can't help but feel you are cheating a little. The plasma package doesn't really contain the player, not the part that does the heavy lifting anyways, just the bit that says "Oi! use WebKit to render ths"
@Jos: "That svg is actually transparent, but the plasmoid is not"
this is something that was broken in QtWebKit last year and STILL hasn't been fixed.
@maninalift: that's the deceptively beautiful thing about it:
it's a way to ship about small hunks of code that do big things without too much definition or shape pushed upon them.
you could take that same package and hook it up to some other renderer or toolkit or whatever. no problems.
we can run it on handheld devices or big computers. we could store them in the flash of otherwise dumb machines and transfer them to more capable machines on the fly to interact with those otherwise dumb machines.
we can use different languages or even completely different different frameworks (see the google gadgets or edje examples) to form these concepts.
etc ...
it's a pretty obvious set of ideas, really, but ones we haven't really fully realized yet.
"web pages" are about as close as we've come to this and it's really only a pale version of what could be done with the concept.
it's what people are thinking about when they drool over the ideas of "cloud computing" or "web 2.0" without really realizing that what we are trying to create "web 2.0" out of is simply not up to the task .. and it never will as long as the answer is "put a webserver on it" or "run some javascript inside an application designed for reading documents".
see, it's really not about the "it's using webkit!" aspect but about the "it's self contained and small and simple and can be thrown about at will!" aspect of it.
@Aaron: care to mention what is broken in QtWebKit?
@Ariya: it insists on painting a white background. :/
@Aaron: see my blog, check out if the same trick works...
@Ariya: yes! that does the trick. thanks.
i have to say, though, that's complete black magic and not very Qt. :/
Post a Comment