Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

Class Gtk.RecentFilter

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkRecentFilter
Class : RecentFilter
Implements: Gtk.Buildable
Extends: GObject.InitiallyUnowned
A GtkRecentFilter can be used to restrict the files being shown
in a GtkRecentChooser. Files can be filtered based on their name
(with gtk_recent_filter_add_pattern()), on their mime type (with
gtk_file_filter_add_mime_type()), on the application that has
registered them (with gtk_recent_filter_add_application()), or by
a custom filter function (with gtk_recent_filter_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 GtkRecentFilter 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 GtkRecentChooser,
see gtk_recent_chooser_add_filter(), but it is also possible to
manually use a filter on a file with gtk_recent_filter_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> is the same
as calling gtk_recent_filter_add_mime_type(), gtk_recent_filter_add_pattern()
or gtk_recent_filter_add_application().

A UI definition fragment specifying GtkRecentFilter rules


text/plain
image/png


*.txt
*.png


gimp
gedit
glade


]]>



Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gtk.RecentChooser
Property
filter : Gtk.RecentFilter
The GtkRecentFilter object to be used when displaying
the recently used resources.
Gtk.RecentChooser
Method
add_filter (RecentFilter filter) : none
Adds filter to the list of GtkRecentFilter objects held by chooser.
Gtk.RecentChooser
Method
get_filter () : Gtk.RecentFilter
Gets the GtkRecentFilter object currently used by chooser to affect
the display of the recently used resources.
Gtk.RecentChooser
Method
remove_filter (RecentFilter filter) : none
Removes filter from the list of GtkRecentFilter objects held by chooser.
Gtk.RecentChooser
Method
set_filter (RecentFilter filter) : none
Sets filter as the current GtkRecentFilter object used by chooser
to affect the displayed recently used resources.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:13:43 GMT+0800 (HKT)