Progress in GSoC plasmaland

Google Summer of Code doesn’t kick off for a few more days, but that hasn’t stopped Siddharth Sharma and I from working on the KPart which our summer of code projects are based around, and any other KDE application can take advantage of.

zomg, it’s allliiiiiive

As you can see, I’m still using stock, and sometimes hackish (KTodoList, I’m looking at you!) applets, but those will all be rewritten in due time with actual Kontact applets. These are there to just take up space.

As it is right now, there is no real API for applications to control what applets get placed in the containment by default. You can specify a default layout in a plasma-$app-appletsrc style file which will be loaded by default if no other config is found. However, we’re going to be taking this one or two ways:

ECMAscript!

Or as it is more widely known, javascript, is supported in plasma-desktop, allowing you to do some really cool things. Aaron Seigo pointed us towards this, and its a path that at some point I think would be beneficial to go down. Either an application could provide a default-applets.js, which would be auto-loaded by the part, if no config file is found, or some sort of extension to KParts::ReadWritePart which allows us to load arbitrary JS.

The Javascript doohickies are nice, but dependencies may end up being a big issue with these sorts of things. Only time will tell. There are, of course, other options…

Other options!

How’d you like that segue? Pretty snazzy. Wow, it’s late, I’m being a dork…

Siddharth and Aleix Pol of KDevelop fame have an interesting idea for how to implement a plasma-based dashboard… Basically, instead of letting the KPart handle widget launching and hiding, there should be a small API to add/Remove widgets to the containment. At first I was against such an idea, as I didn’t see how it could be sanely done, but it has a few nice upshots: The applets can be handled by the existing plugin infrastructure. For example, KDevelop has a boatload of existing plugins. Instead of having each plugin code also need to output a Plasma::Applet .so file which can be loaded by the KPart, there would be a function which would return an Applet* or QWidget* which we could then pass to the kpart. Siddharth will be manning that helm, and I can’t wait to see what comes of it.

Segue again

In the beginning of writing the KPart I took code from other shells all willy-nilly not really thinking about what I was using. As it turns out, this was bad and led to much wailing and gnashing of teeth when I discovered that (not surprisingly) kdebase-workspace is not a valid runtime dependency for applications. It also turns out that there is a lot of nice stuff in kdebase-workspace/libs, including the WidgetBrowser class, which is the browser we are currently using in the desktop and other shells. Since this KPart will be existing in kdebase-runtime or something, we kinda can’t use it. Which leads me to writing a KCM that acts as an Applet Browser!

Of course, this is mostly broken right now, and consumes me when I’m not busy playing with all the wicked awesome stuff in trunk *stares at Activities*

More some other time! Stuff is trucking along for SoC 2010!! Hopefully next time I write, I will have something to show for Kontact integration… Hopefully after the Akonadi meeting, KDEPIM builds again๐Ÿ˜‰ You guys rock.

=-=-=-=-=
Powered by Blogilo

~ by Ryan Rix on 17 May 2010.

11 Responses to “Progress in GSoC plasmaland”

  1. Can’t you try to get the code you need moved from kdebase-workspace to kdebase-runtime instead of rewriting it all?

    • the code in workspace is there for… some reason. Aaron gave it to me. And the WidgetBrowser workflow didn’t really match with the kind of workflow a dashboard would achieve.

      • Well, as I said on IRC, I still think code which is useful than more than just the workspace should move to kdelibs (which is actually a better place than kdebase-runtime).

  2. Nice.
    We were looking for something like that for Rekonq.
    It would be nice if the “new tab” button could open a page with a plasma kpart embeded.
    It could then show RSS plasmoid for example.

    How does it react when the window is resized ?

    • .. or a web snippet plasmoid, or a ..๐Ÿ™‚

      it sounds like a great idea. and when the window is resied, then the plasmoids are also resized .. but that’s really up to the layout in the Containment that is being used. with a different layout, the plasmoids could retain their size and stay in the enter of the window, for instance.

  3. suggestion: could you make KPart plasmoids easy to add to the desktop(/current activity)? For example, an E-mail checker in Kontact to be added straight to the desktop and run independently of the application (since the new KDEPIM will be based on Akonadi, I think this should be possible).

    Nice work so far.๐Ÿ™‚

    • there already is an email checker using kontact (lion mail), it just needs to be “finished” enough that the author (Sebas) feels comfortable putting it out in a release.

      in any case, my biggest concern with the “direct injection of Plasmoid *’s” is that the plasmoids will end up overly coupled to the application.

      Ryan made it sound like the two approaches are mutually exclusive, but I don’t think they are. I think that the direct injection method is a necessity for how many applications are already written, but that for something like Kontact it should be all but uneccessary and for KDevelop only necessary for certain kinds of plugins (such as ones that rely on the build system actually running in the background.. iow, large parts of the IDE itself)

  4. That is excellent !!!

    As you know, the Skrooge team is also having a close look on this work, it’s nice seeing you and Siddharth making progresses. Keep it up๐Ÿ™‚

  5. Nice!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: