Archive for September, 2007

Where did that fishy go? A Places data engine.

9th September 2007

You know that side bar in Dolphin and the file open/save dialogue boxes? The one that lists things like “Home” “Root” “Volume (vfat)” “Remote” etc? Yes, that one.

There’s now a data engine for it. You can fire up plasmaengineexplorer and check it out, if you like. You know, if you’re particularly bored.

The implementation uses KFilePlacesModel. And KFreeDiskSpace from KIO. Because logically related things are never put together in APIs :-P.

One of the interesting things about KFilePlacesModel is what does and doesn’t propagate between programs.

For example, if you change the name of “Home” to “Home Directory” in Dolphin, the KFilePlacesModel will notice and tell the Places engine that the old data is invalid. And the engine will duly send the updated information to whoever asked for it.

However, if you mount (“set up” in Solid terminology) a removable device in Dolphin (by clicking on it), the KFilePlacesModel in the Places data engine won’t notice. So Places will still claim that the device needs setting up and has no URL (mount point), and will not tell you about free disk space. How rude. In fact, the same goes for hiding/unhiding places.

Unfortunately, Solid doesn’t provide this kind of notification, either (should it?). And it wouldn’t fix the hiding problem even if it did (although that’s not so important). So the only solution I can see is to periodically refresh the data.

Well, the real solution would be to make KFilePlacesModel pick up on these things. But that’s more work than I’m willing to do right now, with kdeprint to look at as well.

Default Browser

7th September 2007

Today is a sad day. I changed my default browser from Konqueror to Firefox on my KDE 3 desktop. Unfortunately, Konqi stopped working properly on the sites I frequent the most (the sites themselves are at least partly to blame for this, I suspect). I’m getting fed up with copying and pasting urls from emails…

On the other hand, I’m about to try using KDE 4 as my default desktop. Hopefully it’s functional enough to not annoy the hell out of me. And if it isn’t… well, I’ll just have to help fix it :-P

KPrinter Blues

7th September 2007

I’ve been lurking around KDE for a while now, doing odd bits and pieces here and there on KDE 4. But now I’m working on something substantial (together with John Layt): making kdeprint work again.

Last week, it didn’t work. Despite all the amazing work of Michael Goffioul all those years ago in creating it, it’s looking a little tired. It hasn’t really had any serious love for many years, and the transition to Qt4 did for it.

It now works, just about. The problem, it turned out, was that the port from K3Process to KProcess hadn’t been done properly in the kded module. That’s fixed, but the codebase is reasonably large and other things are not working right.

On top of that, there’s the maintainability aspect to consider. The current code, for example, wraps QPrinter rather than inheriting from it (for good reason: it was written at the time of Qt2, when QPrinter was very inflexible) which means every QPrinter method has to be wrapped.

But, Qt4 to the rescue! The QPrinter option system has been abstracted into QPrintEngine, the painting is all done with a wrapped QPaintEngine and now QPrintDialog acts on QPrinter, rather than the other way around. We can hopefully leverage this to make the kdeprint codebase smaller and simpler.

However, there are less than four weeks to do this in. kdelibs (and kdesupport, and kdebase/runtime) go into release mode on 3rd October. Yikes.


Follow

Get every new post delivered to your Inbox.