Comment 2 for bug 374274

Revision history for this message
Michael Terry (mterry) wrote : Re: Can't exclude filename patterns

I think your instinct to use two buttons is good. Some thoughts:

We'd probably need to store the values in a separate gconf list (because folders can technically have characters like a glob pattern, I believe). So we'd need to synthesize the two gconf lists into one user-visible list. Not hard, but just a detail. We could have a seperate icon for the globs in the list (like we have a folder icon for folders) or maybe no icon -- something to distinguish visibly.

The "Add Pattern" button should probably pop up a dialog that explains what the user can do here (i.e. "This lets you exclude files in any directory that match the glob" but nicer. :)). Just a bit of user-guidance.

The primary use case here is almost certainly to exclude files based on file suffix. It would rock if the dialog had a drop down list of mime types in user-friendly wording (this data is either available through GIO or freedesktop.org xml data files, which can probably be accessed via some library -- I've never messed with this particular area). So the use would select "Text Files" and this would behind the scenes select some simple glob like '*.txt' or '*.txt|*.text' or whatever. The dialog should also let the user specify a manual glob instead if desired, but I suspect 90% of users just want a file type. The button might be renamed to "Add File Type" then... But that doesn't get across that you can also manually do a glob...

Moreover, we may order the list to offer commonly-large things at the top (like 'iso files' or 'avi files' or something). We may even want to offer a meta option like 'video files' that would select avi, ogv, etc.

I know I'm making it into a bigger job that you probably wanted. :) But I'd be glad to help! If you'd like, contact the ~deja-dup-hackers list, grab me on Freenode IRC (username mterry), or email me.