Archive for August, 2010

KGet is alive too

August 26, 2010

Alive and kicking

There haven’t been blogs on KGet for a long time, but KGet is alive too.

The last few months and weeks were quite busy for us, though we still managed to fix a lot of bugs and 4.5.1 will also see some further fixes. Still there are some serious bugs left that I hope to be able to track down with our users, since sometimes bugs aren’t reproduceable for me.

Besides the bug fixes some ui improvements have entered KGet that should make it more comfortable to use. Now if you resize the header of a list its size and position will be restored the next time you look at the list. This also holds true for some dialogs. Sometimes small details really can change a lot.

KDE Brainstorm

In any case this post is also about a new feature I am working on. I stumbled upon an idea on KDE Brainstorm that made quite some sense. You can set up KGet to monitor your clipboard and add urls automatically as downloads. The main problem is that any url — that is not a local file — would be taken.

What I added is a combined whitelist and blacklist. The user only has to add some rules, and the order of those rules defines their priority. Rules higher in the list have a higher priority than those being lower. Also supporting both Wildcards and RegExp makes it possible to realise some interesting usecases. In fact the added rules can also be edited later on, if the user wants to change them.

At first KGet will look if the url is not a local file, has a protocoll etc. and will then continue with your set rules, in our case it will automatically start downloads for any rar or zip file unless it is from http://kde*

A backdraw you can see in the screenshot is that “Add” has no shortcut — it is a default button provided by KDE — though this is not that bad, you simply enter the pattern and press return and then you can enter the next item.

As you can see I also changed the advanced configuration page a bit, I guess it still needs some work though.

The most interesting part imo is the code though. The feature was quite easy to implement but it is the GUI that took most of the time. Yeah 95% of the new code are just for GUI, not that this code was hard, since it is always the same: 1. create a model 2. create a delegate 3. add means to add/remove data

That really shows some of the strengths of ignoring GUI altogether and resorting on config files. Yet that wouldn’t be “user-friendly” nor discoverable, so we keep it at that. 😉 And I really try to make things useable and especially safe. “Safe” that it is hard to make wrong stuff, no adding empty items, editing can’t result in empty items etc. etc. Imo this is one of the keys to make features discoverable. If a user fears that any “wrong” click could destroy something they won’t even look for features that could be of use for them. Often my target is to have a KMines with as few mines as possible. 😀

I also have another new — very large — feature in my pipeline though I’ll work on it more before disclosing it here.