Object Hierarchy:

Object hierarchy for RecentFilter


[ CCode ( type_id = "gtk_recent_filter_get_type ()" ) ]
public class RecentFilter : InitiallyUnowned, Buildable

A RecentFilter can be used to restrict the files being shown in a RecentChooser.

Files can be filtered based on their name (with add_pattern), on their mime type (with add_mime_type), on the application that has registered them (with add_application), or by a custom filter function (with add_custom).

Filtering by mime type handles aliasing and subclassing of mime types; e.g. a filter for text/plain also matches a file with mime type application/rtf, since application/rtf is a subclass of text/plain. Note that RecentFilter allows wildcards for the subtype of a mime type, so you can e.g. filter for image/\*.

Normally, filters are used by adding them to a RecentChooser, see add_filter, but it is also possible to manually use a filter on a file with filter.

Recently used files are supported since GTK+ 2.10.

GtkRecentFilter as GtkBuildable

The GtkRecentFilter implementation of the GtkBuildable interface supports adding rules using the `<mime-types>`, `<patterns>` and ` <applications>` elements and listing the rules within. Specifying a `<mime-type>`, `<pattern>` or `<application>` has the same effect as calling add_mime_type, add_pattern or add_application.

An example of a UI definition fragment specifying `GtkRecentFilter` rules:

<object class="GtkRecentFilter">

Namespace: Gtk
Package: gtk+-3.0


Creation methods:


Inherited Members: