Wednesday, August 20, 2008

Size limits for trash

Some weeks ago, one of our customers asked for a nice
feature that was requested 4 years ago the first time
as far as I can see from the bug tracking system.
He wanted an option to set a maximum size for the users
trash like you can do on Windows or MacOSX to avoid situations
where the trash fills 50% of your hard disc and you wonder why
you can't download emails any more ;)

As you can see in bug 79553 and 111861, there are some more
ideas how to improve the space handling of your desktop trash,
so instead of just implementing a static size limit I started
implement most of the features requested there and 3 days later
we have a nice trash space handling now.

When you right click on your trash icon on the desktop and
choose the 'Properties' entry, the appearing dialog will
offer a new tab 'Size Limits' now as shown in the screen shot

Here you can choose whether files that lie in the trash for
longer than X days shall be deleted automatically or whether
there shall be a size fixed limit.

If a size limit is set and your trash is full already, trying
to put another file into the trash will trigger an action that
can be one of the following:

  • Warn user only: A dialog is shown to inform the user that his trash is full and that he has to remove files manually before he can put new files into the trash
  • Delete oldest files from trash: This will remove files (beginning with the oldest one) successively from the trash until the new file fits in
  • Delete biggest files from trash: This will remove files (beginning with the largest one) successively from the trash until the new file fits in
One of the nice features of the trash standard is, that you can have multiple trashes, one for each mount point.
If your administrator has setup these, the trash configuration dialog will look like below:

Now you can configure different size limits for each trash.

As you may have recognized, this patch is for KDE 3.5.9, because our customer is still running that version. I'll try to push that patch
into KDE 3.5.10 and port it forward to KDE 4.2 as well.

Tuesday, March 4, 2008

Today I had an interview with Emanuel from about the progress and future of Akonadi. After the interview we talked about different stuff and to my surprise Emanuel studies ethic and history on lectureship. So he is the second KDE fellow (Carsten Niehaus is the first one) I know, who will teach the pupils of the next generation how great KDE is ;)

So I thought about how to combine KDE with ethic and history. Ethic is a difficult thingy, but history is fine. I really miss a program which shows me a time line with
all important things that happened in history. Honestly I was no keen on history during school, but that has slightly changed nowadays.

So after some hours of hacking I can present a neat, little application, which reads facts about historical events from a XML file and shows them in chronological order.
For every event the file contains:
  • the date of the event
  • a short description
  • a reference to an image
  • a link to a source that provides more information (e.g. wikipedia article)
  • a category tag
At the moment it's only a small pet project, however it can be extended for general purpose. For example you could provide a XML file that contains information about all KDE releases, with small screenshots of the desktop and links to the release announcements.

And here comes the obligatory screenshot:

When you click on the link, the wikipedia page for Martin Luther King is opened in the default browser.

Tuesday, January 22, 2008

Downloading links with Konqueror4

From time to time I've to download several documents from a website (e.g. university) and there is nothing more boring than right clicking on every link, choosing 'Save link as...', selecting the directory... and doing that several times.

Fortunately Konqueror has this cool embedded konsole window, so if all link addresses follow a special schema, you can do some magic with 'for i in 1 2 3 4 5; do wget http://host/doc$i.pdf; done'.

However not all professors name their documents by a special schema... so back to the 'Save link as...' solution? Not anymore! :)

I've written a plugin for Konqueror in KDE4, which allows you to select a couple of links on a website, choose a menu entry from the menu bar, selecting a destination folder and all links, independent of their names, will be downloaded. As pictures say more than 1000 words, here are the obligatory screenshots:

1) Select the links and choose 'Download selected Links...' from 'Tools' menu

2) Select the target directory

3) The download dialog will show the progress of the download

If anyone is interested in this plugin, I would commit it to extragear/base during the next days.