[KPhotoAlbum] [patch] Excluding Files and Directories

Ashley J Gittins agittins at purple.dropbear.id.au
Sun Sep 24 16:18:26 BST 2006


Hi Jesper and everyone,
	After my own whining about wanting to exclude my RAW files from being 
indexed, others having similar desires, plus others who want to exclude 
entire directories from being indexed, I decided to shut up and try and fix 
it instead of just complaining :-)

Attached is a patch which adds an option to the general tab in the config 
settings, allowing the user to enter a regular expression to define files or 
directories to ignore. This expression is tested for while scanning new 
files, and applies to files and directories. If a directory matches, 
KPhotoAlbum will not descend that directory (unless it gets there by other 
means like following a link), if a file matches it never gets considered for 
indexing.

I hope it's up to standard but please let me know if there is further cleaning 
up or functionality that needs to be done. Jesper, I was thinking that adding 
a button to bring up your KRegExpEditor dialog would be a nice touch, I just 
don't have time right now to look into that.

Other possible enhancements would be adding a combobox to select whether to 
use regexp or wildcard matching formats (the latter being a bit more 
user-friendly but less powerful), and a checkbox to determine case 
sensitivity.

I had created the patch against a copy of 2.2, but I've just noticed that 
trunk has been refactored somewhat, so I have also attached a patch against 
the current SVN repository. So those still running 2.2 who would like to try 
this out can use the 2.2 patch while anyone tracking the current svn 
repository can use the latter svn patch.

Feedback welcomed.

-- 
Regards,
	Ashley J Gittins
	web: 	http://www.purple.dropbear.id.au
	jabber: agittins at purple.dropbear.id.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kphotoalbum-2.2-ignoreRegExp.patch
Type: text/x-diff
Size: 5687 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20060925/b2ad9f37/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kphotoalbum-svn-ignoreRegExp.patch
Type: text/x-diff
Size: 5637 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kphotoalbum/attachments/20060925/b2ad9f37/attachment-0001.patch>


More information about the Kphotoalbum mailing list