1 2@c %start of fragment 3 4@node GtkRecentFilter 5@chapter GtkRecentFilter 6A filter for selecting a subset of recently used files 7 8@section Overview 9A @code{<gtk-recent-filter>} can be used to restrict the files being shown in a 10@code{<gtk-recent-chooser>}. Files can be filtered based on their name (with 11@code{gtk-recent-filter-add-pattern}), on their mime type (with 12@code{gtk-file-filter-add-mime-type}), on the application that has registered 13them (with @code{gtk-recent-filter-add-application}), or by a custom filter 14function (with @code{gtk-recent-filter-add-custom}). 15 16Filtering by mime type handles aliasing and subclassing of mime types; e.g. a 17filter for text/plain also matches a file with mime type application/rtf, since 18application/rtf is a subclass of text/plain. Note that 19@code{<gtk-recent-filter>} allows wildcards for the subtype of a mime type, so 20you can e.g. filter for image/*. 21 22Normally, filters are used by adding them to a @code{<gtk-recent-chooser>}, see 23@code{gtk-recent-chooser-add-filter}, but it is also possible to manually use a 24filter on a file with @code{gtk-recent-filter-filter}. 25 26Recently used files are supported since GTK+ 2.10. 27 28@section Usage 29@include defuns-gtkrecentfilter.xml.texi 30 31@c %end of fragment 32