Extender update.

As you might know, I’m implementing ‘extenders’ in plasma for the Google Summer of Code. I haven’t blogged about my progress yet, and I’ve made some good progress, so time for a new blogpost. For an explanation about what extenders are and why they’re useful you should read my previous blogpost.

So what’s working right now?
Detachable widgets can be freely dragged around, dropped in other applets, dropped in a containment, ordered, and you’ll see spacers inserted in layouts on the place where the detachable will land when dropped there, so we even got some nice visual feedback.
When an applet that uses detachables is put into vertically constrained space, it automagically ‘collapses’: the detachables are moved to an extender and only an icon is shown where clicking the icon shows/hides the extender. Showing an icon is the default behavior, but you can reimplement a function to customize this behavior.
Detachables can have configuration data associated with them, so they can be reinstantiated when plasma gets restarted. This only requires the developer to implement a factory function.
The api provides a way to quickly search through all detachables that have been created by a certain applet so detachables will not be duplicated after a plasma restart.
When an applet contains no detachables it can automagically display a label telling so, so you won’t have a completely empty applet when it has nothing to display.

I’ve also started developing a kuiserver data engine and applet. The applet displays all running file transfers, and is the first actually useful applet that uses extenders (the other applet being a test applet that’s really just that and does nothing remotely useful). It’s quite limited at the moment still, (not to speak about the sheer ugliness of the thing), but it shows how easy it is to use extenders in a real world applet: the applet, minus whitespace and comments, is only 25 lines of code. Plasma rocks! 🙂

Now for the obligatory screenshot:

A screenshot showing the very first useful applet that uses an extender

A screenshot showing the very first useful applet that uses an extender

What do you see, except for some quite ugly graphics? You see the kuiserver applet (the icon in the panel, it’s extender showing two completed transfers), and one of the transfers it shows is being dragged to another applet (the useless test applet). In case you’re wondering, the blue things are drag handles.

So what’s next? Pinheiro has agreed to make some mockups of extenders, so soon I’ll be able to make them actually look good. I will also add a ‘collect detachables’ function: a way to quickly return detached widgets to the applet they came from. And the kuiserver applet could use some love: the ability to cancel/pause transfers would be a nice addition for example. Stay tuned: I’ll probably create a little screencast showing extender usage in action soon.


11 Responses to “Extender update.”

  1. DanaKil Says:

    Wow, extenders looks great 🙂
    Thank you for your work !

  2. Kitsune Says:

    I’m not sure which is more awesome, extenders or the kuiserver applet? Definitely a hard decision, both rock quite hard!

    The KUIServer applet sounds like one of the original features planned for KDE 4 but was unfortunately dropped, definitely something to look forward to in KDE 4.2 (I doubt this’ll make it past the feature freeze?), along with the other possibilities that extenders will allow!

  3. Gopala Krishna Says:

    Nice work 🙂
    Every now and then I thank creators of GraphicsView for their highly motivating, flexible, advanced library! There are so many people using it already 🙂

  4. SSJ Says:

    I’m genuinely looking forward to seeing this all come together; great work! 🙂

  5. shamaz Says:

    Thank you for blogging about this :).
    Great work !

  6. Luke Parry Says:

    I cannot remember if this is still planned, but wasn’t there a plan to make tasks in kde be generalised so that they could be shown in a plasma applet.

    These tasks would be like downloading files, transferring files, so principally I thought it would be the same thing.

    Otherwise very pleased with your efforts and looking very forward to this through svn.


  7. j-b-m Says:


    There currently is a kuiserver with a great dbus spec that is in KDE/kdebase/runtime/kuiserver

    Wouldn’t it be better to turn it to a plasma appler instead of writing another uiserver ? Or are you working on a replacement for the current kuiserver?

    Anyways, thanks for your work, I think a job tracking applet applet with extenders that can be used by all KDE apps that would be a great step forward!

  8. parena Says:

    Great job there. Looks very, very useful. 🙂 I’m assuming this will be fore 4.2?

  9. rscheepmaker Says:

    @Luke: the infrastructure for that is already in kdelibs, Some applications might need some changes though, since any job that is interesting enough to monitor through this applet needs to be registered to the kuiserver job tracker (while checking email for example, having a job for every mail account registered to kuiserver might be a bit overkill for example). But the kjob infrastructure is there and can be used for any job. 🙂

  10. rscheepmaker Says:

    @j-b-m: yes, I’m aware of the kuiserver app. This applet (or, well, actually the kuiserver dataengine i’ve made for plasma) exposes the same dbus interface, so you can use it as a replacement for the current kuiserver application.

    @parena: yes, both extenders and the kuiserver applet will most likely be part of KDE 4.2.

  11. tom Says:

    hi, absolutely awesome! i was always looking forward to this functionality, a general applet for every transaction/progress. this is kde: its all about integration. thanks so much!

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: