A filter to select a subset of files.
This is a filter that is basically used to restrict the the files that are shown in a GtkFileChooserWidget. You may filter the files either by basis of their names (add_pattern() ), mime types (add_mime_type() ), or files that are supported by GdkPixbuf (add_pixbuf_formats() ). To check with your very own function, use add_custom() with a callback.
When you choose to filter by mime types, note that selecting a particular mime type will also automatically include all subclasses of that type. For example, filtering for the mime type text/plain will also include all files of type application/rtf since it a subclass of text/plain. You may also use wild card to specify your mime type, such as image/*.
The most common way to use a file filter is to add it to a GtkFileChooserWidget with the set_filter method. Of course, the same method may also be used on a GtkFileChooserButton or a GtkFileChooserDialog.
GtkFileFilter ();-- Creates a new file filter.
add_custom() Display files passing checks of your own function. add_mime_type() Allow files of specified mime type to be displayed. add_pattern() Allow files with names that match with the specified pattern to be displayed. add_pixbuf_formats() Allow images supported by GdkPixbuf to be displayed. filter() Test file filters. get_name() Returns the human-readable name of the file filter. get_needed() FIXME! set_name() Sets the human-readable name of the file filter.