Easier OpenDocument coding in Calligra and lovely junior jobs

The office suite Calligra can save many file formats, but the main one is OpenDocument Format. With a proposed improvement, it can be easier than ever to code on Calligra.

The OpenDocument files (odt, ods, odp) that Calligra writes are zip files with XML documents and images. The XML documents have a schema, a set of rules that say what goes where in the files. Here is a small sample of ODF, indented for readability:


KDE Plasma Desktop 4.11's new Task Manager

One of the many things to look forward to in the impending KDE Plasma 4.11 release is a new version of the default Task Manager applet, which had its front-facing bits rewritten from scratch, along with additional support work and improvements in the underlying library.

The motivation for the rewrite was two-fold: Address many long-standing and gnarly bugs the old applet was suffering from, and to pull the Task Manager forward into the QML era, making it ready to transition to Plasma 2. Visual and interaction changes were to be kept to a minimum for now, focusing on a regression-free port, but a leaner and meaner codebase along with QML's designed-in flexibility should make a much better foundation for future experiments.

Let's take a look at some of the improvements over the old applet :).

Side bar: The art of putting tasks on screen

The 4.11 Task Manager
There's a lot going on here.

Laying out a task manager is complicated business. Task items have preferred minimum and maximum sizes in both dimensions, derived from the current theme and font settings. This size range information factors into calculating when to break into additional rows (or columns), provided the available space and user settings allow for it. Layout also behaves akin to justified text layout, dividing available space between tasks evenly even when wrapping into multiple rows - but not allowing them to grow beyond their preferred maximum size.

The addition of launcher items complicates things further, making it necessary to carefully negotiate the peaceful graphical co-existence of two different types of items with different preferred sizes, throwing the easy assumption that all items are going to be the same out the window.

Layout also doesn't just have its internal concerns to worry about, but some external ones as well: It has to keep track of when it considers the Task Manager to be full (again drawing on the preferred size range information) and communicate that to the machinery that will try to opportunistically group windows to conserve space. It also has to generate useful size hints for the applet, allowing for things like Plasma's auto-growing/shrinking panels to work correctly.

And then all of that has to work well in both horizontal and vertical orientations, with some subtle differences to tune things for both cases.

Layout: A lot better now

Unfortunately, the old applet didn't do so well on mastering the above. Its layout code suffered from many, many bugs, ranging from just making bad placement decisions to getting stuck mid-animation to causing hangs due to infinite loops. Consistency between horizontal and vertical layout wasn't very good, with support for vertical orientation introduced via copious special-casing and being perennially out of sync with the better-maintained horizontal codepaths.

Layout is also involved with reordering tasks by Drag-and-Drop (if sorting is set to "Manual"), and in the old applet, would occasionally compute incorrect indices for the reinsertion of dragged tasks, particularly at the end of rows and when right-to-left locales like Arabic and Hebrew were used. DND across multiple rows was also a bit crashy.

Many of these bugs only surfaced in somewhat unusual configurations, with the general theme being that new layout features had been added without enough attention being paid to how they would interact with all of the permutations allowed by the feature matrix, not just the most common cases. An example would be combining the presence of launchers with multiple rows, illustrated here:

Layout bug
Layout gone bad: Launchers larger than tasks ...

Layout fixed
And now it's good.

All of these bugs should hopefully be resolved by the new version's layout engine.

Consistent interactions

Not just layout behaves more consistently across features and configurations now, interacting with the Task Manager does, too. For example, the popup for window groups now supports switching between tasks via the mouse wheel and reordering tasks by dragging (again, provided sorting is set to "Manual"), just as the primary UI does.

Speaking of those group popups: Up until now, they weren't smart enough to adjust their size as windows came and went or window titles changed, and if windows set very long titles for themselves, the resulting popups could sometimes show up with unreasonably large sizes. They're much smarter now, handling these situations properly.

Group popup
Group popups learned many new tricks.

Visual fixes and polish

Task buttons have frames (depending on your theme, they come in less or more varieties), and those frames aren't purely decorative - they're used to communicate important state like the identity of the active window. The old applet had several bugs in the code handling button frames, sometimes causing it to claim multiple windows as active or forgetting to reset a frame after a task context menu had been used. These kinds of bugs are gone now.

Task buttons also (well, usually - if layout thinks it has enough space for them!) have text labels with nifty-looking shadows behind them - which the old applet sometimes forgot to re-render for text changes, namely when the font settings were changed. Poof, gone as well.

Themes are also generally applied more correctly now, e.g. taking frame margins into account when making decisions on the size of elements inside them.

Playing nice with the rest of the Workspace

The Task Manager is also responsible for communicating task item positions to the window manager, so the window manager can know the destination for the minimize animation of a window. The old applet sometimes dropped the ball on this duty, causing KWin to animate windows minimizing into the center of the screen, or into outdated positions. Once more I'm happy to report the new version should take this obligation a lot more seriously.

Configuration handling

The old applet would occasionally be reluctant to apply changed settings immediately, e.g. toggling the "Force row settings" option wouldn't take effect unless the value for the "Maximum rows" setting was changed at the same time. Its successor suffers from no such compunctions.


QML is kind to us here, and it's not even the shiny OpenGL-powered Qt 5 version yet. Animations are generally a bit smoother across the board, and specifically the throbber/spinner animation used in place of the icon on task startup notification items sports a much higher frame rate than before.

Startup notification throbber
It may be hard to tell from a still image, but it's spinning a lot more smoothly now.

There's also some bad news (with a side dish of glimmers-of-hope)

Sadly, a few features didn't make it into the new version - yet, at least.

One is the ability to drag tasks from the Task Manager onto the pager, a very nifty way to move windows between virtual desktops. That this wasn't retained is down to a limitation in the components we implemented to teach QML Drag-and-Drop support; I've proposed a patch to address it in Plasma 2 that may even be back-portable to KDE 4, so stay tuned for 4.11.1 possibly addressing this.

The other two are support for manual grouping and uncollapsing groups into an inline representation in the primary UI. Both seem to have relatively few users, partly due to unfriendly interaction design: Figuring out how to actually manually group windows generally took an internet search to learn about the necessary keyboard modifier. That doesn't make the regressions any less regrettable, of course, but on the other hand we will try to bring these back in much improved incarnations in Plasma 2 (or perhaps sooner). It's part of the reason why they didn't make it yet - both features had some fundamentally bad aspects to their current realization, and burdening the new codebase with their complexity was thoroughly unattractive from a cost/gain perspective. We'll do better.

Future plans

The new QML-powered Task Manager is here to stay - this is the codebase we're taking into Plasma 2, delivering on our intentions to make the transition to KDE 5 a more iterative, less disruptive one. The regressions mentioned above imply some open to-dos, and beyond that we'll be investigating new features and ideas, such as allowing apps to do more with the context menus of their launcher and task items.

Meanwhile, the move to Wayland will cause some further work as well, below the visual level this time, adapting the underlying library to KWin becoming the new authoritative source for window data.

I'm hoping you'll enjoy the new 4.11 Task Manager. If you've got any fancy ideas: Throw them my way in the comments!

PS.: A few of the things described here took final form quite late. If you have a problem with the Task Manager in one of the betas or RCs, take the above as an update on what you can expect from the final release.


30 Second Akademy Interviews

Who is KDE? I did some 30 second interviews on the booze cruise last night to give you a flavour.

30 Second KDE Akademy Interviews


Akademy 2013 Day 5 in Photos

K people discussing KPeople

The organising team busy organising


Memory usage improvements for 4.11

The other day I went to buy a DDR stick but the shop was closed so the only solution was to sit down and fix some memory hungry applications ;).

These will be in 4.11:

* Fixed a bug where maildir resource would use 1 or 2GB when importing large folders.

* Fixed a bug where mixedmaildir resource would also use 1 or 2GB.
(Thanks to Martin Steigerwald for providing a a 77k e-mail folder).

* akonadiserver wasn't clearing uneeded query caches. Saved 65MB here.


Akademy 2013 Day 4 in Photos

The day started with a long release schedule BoF. No conclusion but less freezes seemed popular. Shorter release schedule seemed mostly popular with a 4 month schedule getting a fair bit of approval. Not ideal of us though as it would get things out of sync with the Ubuntu schedule.


QtWebKit 2.3.2 and QtWebKit for Qt 5.1

Thursday I tagged QtWebKit 2.3.2. To avoid confusion I will present both QtWebKit for Qt 5.1 and QtWebKit 2.3.2.

The new features in QtWebKit for Qt 5.1 can be seen on http://qt-project.org/wiki/New-Features-in-Qt-5.1 . Let me expand a few interesting ones below:


Kubuntu All Stars @ Akademy

A quiet day for me at Akademy catching up on e-mail and learning how to make an apt archive so here's some more photos from the rocking party last night.

More photos from Martin "Ross Halfin" Klapetek

IMG 7017 v1
The Kubuntu All Stars rocks Akademy


Akademy 2013 Day 3 in Photos - Kubuntu Developer Summit

At the Kubuntu Developer Summit we discussed various topics. The guys on the left are from a 15,000 seat Kubuntu rollout in Munich, we worked out a plan to supply LTS backport packages they need.


Akademy 2013 Day 2 in Photos

Lydia tells us how to talk to each other

An audience waits to see which of them will win an Akademy Award