Review Request: new kded daemon to check .thumbnail directory space usage

Jaime Torres Amate jtamate at gmail.com
Wed Sep 21 20:37:59 BST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102083/
-----------------------------------------------------------

(Updated Sept. 21, 2011, 7:37 p.m.)


Review request for kdelibs.


Changes
-------

Done a lot of improvements, like:
* I was using a QList as a queue, now use a Queue.
* It is now ready to handle more than one directory to check. (the previous patch had some problems :-().
  I know now what the Notify Contexts are. They need a little more information in the documentation :-)
* It only deletes regular files, otherwise it is too risky (I've deleted my home directory in the development process some times, not anymore).
* fixed Christoph warnings, except one.
  * The suffix MiB or MB
because as you have seen in all this years, I'm not good at GUI programming (yet).
  If someone is able to create a configuration to add/remove/select more than one directory, the maximum space allowed, and if it will be deleted automatically or not, and also change the configuration read/save, it will be able to work with more than one directory. 
At the moment, only $HOME/.thumbnails.


Summary (updated)
-------

Checks the head of a queue of directories every x minutes (default 30) to see if this directory (and children) use more space than the allowed (default 512 Mib). If so, it shows a notification allowing the user to clean the oldest files, open the file manager, or configure the daemon (time to wait for the next directory, delete automatically...).


This addresses bug 79943.
    http://bugs.kde.org/show_bug.cgi?id=79943


Diffs (updated)
-----

  CMakeLists.txt 1d7c637 
  directoryusagenotifier/CMakeLists.txt PRE-CREATION 
  directoryusagenotifier/COPYING PRE-CREATION 
  directoryusagenotifier/Messages.sh PRE-CREATION 
  directoryusagenotifier/README PRE-CREATION 
  directoryusagenotifier/cleanupdirectory.h PRE-CREATION 
  directoryusagenotifier/cleanupdirectory.cpp PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier.h PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier.cpp PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier.desktop PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier.kcfg PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier.notifyrc PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier_config.cpp PRE-CREATION 
  directoryusagenotifier/directoryusagenotifier_prefs_base.ui PRE-CREATION 
  directoryusagenotifier/module.h PRE-CREATION 
  directoryusagenotifier/module.cpp PRE-CREATION 
  directoryusagenotifier/settings.kcfgc PRE-CREATION 
  directoryusagenotifier/tests/CMakeLists.txt PRE-CREATION 
  directoryusagenotifier/tests/cleanupunittest.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/102083/diff


Testing (updated)
-------

It works as expected.
It shows the notification, and deletes the oldest files in the .thumbnail directory until the files left use less or equal space than the specified.


Thanks,

Jaime Torres

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110921/85f22c2e/attachment.htm>


More information about the kde-core-devel mailing list