Re: Making a FileFilter case insensitive



Hello.

I'm hoping someone can help me out here - I've got a GTK FileChooserDialog
which I want to filter the file list in. I've got this working ok using
Gtk2::FileFilter, with one exception... the filtering seems to be
case-sensitive. Eg, if I add a filter '*.avi', files name '.AVI' aren't
displaying in the dialog. What am I missing here?

Simple globbing is case sensitive and I don't think it can be made
insensitive easily. What you can do is add another patter to your
filter. This way your "AVI Video Files" filter will have two patterns:
"*.avi" and "*.AVI".

For even more control, you can use custom filter function by calling
gtk_file_filter_add_custom().

Tadej

-- 
Tadej BorovÅak
tadeboro.blogspot.com
tadeboro gmail com
tadej borovsak gmail com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]