Wednesday, August 20, 2008

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

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

When you right click on your trash icon on the desktop andchoose the 'Properties' entry, the appearing dialog willoffer a new tab 'Size Limits' now as shown in the screen shotbelow.

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

If a size limit is set and your trash is full already, tryingto put another file into the trash will trigger an action thatcan 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 freedesktop.org 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 patchinto KDE 3.5.10 and port it forward to KDE 4.2 as well.