the recently used resources.
gtk.recent_chooser_mixin
Module for [RecentChooser] interface mixin
Templates 2
#GtkRecentChooser is an interface that can be implemented by widgets displaying the list of recently used files. In GTK+, the main objects that implement this interface are #GtkRecentChooserWidget, #GtkRecentChooserDialog and #GtkRecentChooserMenu.
Recently used files are supported since GTK+ 2.10.
Get filter property.
Returns
Set filter property.
Parameters
propval | The #GtkRecentFilter object to be used when displaying the recently used resources. |
Get limit property.
Returns
or -1 to display all items.
Set limit property.
Parameters
propval | The maximum number of recently used resources to be displayed, or -1 to display all items. |
Get localOnly property.
Returns
resources.
Set localOnly property.
Parameters
propval | Whether this #GtkRecentChooser should display only local (file:) resources. |
Get selectMultiple property.
Returns
Set selectMultiple property.
Parameters
propval | Allow the user to select multiple resources. |
Get showIcons property.
Returns
Set showIcons property.
Parameters
propval | Whether this #GtkRecentChooser should display an icon near the item. |
Get showNotFound property.
Returns
even if not present anymore. Setting this to false will perform a potentially expensive check on every local resource (every remote resource will always be displayed).
Set showNotFound property.
Parameters
propval | Whether this #GtkRecentChooser should display the recently used resources even if not present anymore. Setting this to false will perform a potentially expensive check on every local resource (every remote resource will always be displayed). |
Get showTips property.
Returns
full path of the recently used resources.
Set showTips property.
Parameters
propval | Whether this #GtkRecentChooser should display a tooltip containing the full path of the recently used resources. |
Get sortType property.
Returns
Set sortType property.
Parameters
propval | Sorting order to be used when displaying the recently used resources. |
Adds filter to the list of #GtkRecentFilter objects held by chooser.
If no previous filter objects were defined, this function will call [gtk.recent_chooser.RecentChooser.setFilter].
Parameters
filter | a #GtkRecentFilter |
Gets the #GtkRecentInfo currently selected by chooser.
Returns
when you have finished using it.
Gets the URI currently selected by chooser.
Returns
Gets the #GtkRecentFilter object currently used by chooser to affect the display of the recently used resources.
Returns
Gets the list of recently used resources in form of #GtkRecentInfo objects.
The return value of this function is affected by the “sort-type” and “limit” properties of chooser.
Returns
list of #GtkRecentInfo objects. You should use [gtk.recent_info.RecentInfo.unref] on every item of the list, and then free the list itself using [glib.list.List.free].
Gets the number of items returned by [gtk.recent_chooser.RecentChooser.getItems] and [gtk.recent_chooser.RecentChooser.getUris].
Returns
returned.
Gets whether only local resources should be shown in the recently used resources selector. See [gtk.recent_chooser.RecentChooser.setLocalOnly]
Returns
Gets whether chooser can select multiple items.
Returns
Retrieves whether chooser should show an icon near the resource.
Returns
Retrieves whether chooser should show the recently used resources that were not found.
Returns
false otheriwse.
Returns whether chooser should display recently used resources registered as private.
Returns
false otherwise.
Gets whether chooser should display tooltips containing the full path of a recently user resource.
Returns
false otherwise.
Gets the value set by [gtk.recent_chooser.RecentChooser.setSortType].
Returns
Gets the URI of the recently used resources.
The return value of this function is affected by the “sort-type” and “limit” properties of chooser.
Since the returned array is null terminated, length may be null.
Returns
[glib.global.strfreev] to free it.
Gets the #GtkRecentFilter objects held by chooser.
Returns
of #GtkRecentFilter objects. You should just free the returned list using [glib.slist.SList.free].
Removes filter from the list of #GtkRecentFilter objects held by chooser.
Parameters
filter | a #GtkRecentFilter |
Selects all the items inside chooser, if the chooser supports multiple selection.
Selects uri inside chooser.
Parameters
uri | a URI |
Returns
Throws
Sets uri as the current URI for chooser.
Parameters
uri | a URI |
Returns
Throws
Sets filter as the current #GtkRecentFilter object used by chooser to affect the displayed recently used resources.
Parameters
filter | a #GtkRecentFilter |
Sets the number of items that should be returned by [gtk.recent_chooser.RecentChooser.getItems] and [gtk.recent_chooser.RecentChooser.getUris].
Parameters
limit | a positive integer, or -1 for all items |
Sets whether only local resources, that is resources using the file:// URI scheme, should be shown in the recently used resources selector. If local_only is true (the default) then the shown resources are guaranteed to be accessible through the operating system native file system.
Parameters
localOnly | true if only local files can be shown |
Sets whether chooser can select multiple items.
Parameters
selectMultiple | true if chooser can select more than one item |
Sets whether chooser should show an icon near the resource when displaying it.
Parameters
showIcons | whether to show an icon near the resource |
Sets whether chooser should display the recently used resources that it didn’t find. This only applies to local resources.
Parameters
showNotFound | whether to show the local items we didn’t find |
Whether to show recently used resources marked registered as private.
Parameters
showPrivate | true to show private items, false otherwise |
Sets whether to show a tooltips containing the full path of each recently used resource in a #GtkRecentChooser widget.
Parameters
showTips | true if tooltips should be shown |
Sets the comparison function used when sorting to be sort_func. If the chooser has the sort type set to #GTK_RECENT_SORT_CUSTOM then the chooser will sort using this function.
To the comparison function will be passed two #GtkRecentInfo structs and sort_data; sort_func should return a positive integer if the first item comes before the second, zero if the two items are equal and a negative integer if the first item comes after the second.
Parameters
sortFunc | the comparison function |
Changes the sorting order of the recently used resources list displayed by chooser.
Parameters
sortType | sort order that the chooser should use |
Unselects all the items inside chooser.
Unselects uri inside chooser.
Parameters
uri | a URI |
Connect to ItemActivated signal.
This signal is emitted when the user "activates" a recent item in the recent chooser. This can happen by double-clicking on an item in the recently used resources list, or by pressing Enter.
Parameters
callback | signal callback delegate or function to connect void callback(gtk.recent_chooser.RecentChooser recentChooser) recentChooser the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to SelectionChanged signal.
This signal is emitted when there is a change in the set of selected recently used resources. This can happen when a user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.
Parameters
callback | signal callback delegate or function to connect void callback(gtk.recent_chooser.RecentChooser recentChooser) recentChooser the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Set filter property.
Parameters
propval | The #GtkRecentFilter object to be used when displaying the recently used resources. |
Returns
Set limit property.
Parameters
propval | The maximum number of recently used resources to be displayed, or -1 to display all items. |
Returns
Set localOnly property.
Parameters
propval | Whether this #GtkRecentChooser should display only local (file:) resources. |
Returns
Set recentManager property.
Parameters
propval | The #GtkRecentManager instance used by the #GtkRecentChooser to display the list of recently used resources. |
Returns
Set selectMultiple property.
Parameters
propval | Allow the user to select multiple resources. |
Returns
Set showIcons property.
Parameters
propval | Whether this #GtkRecentChooser should display an icon near the item. |
Returns
Set showNotFound property.
Parameters
propval | Whether this #GtkRecentChooser should display the recently used resources even if not present anymore. Setting this to false will perform a potentially expensive check on every local resource (every remote resource will always be displayed). |
Returns
Set showTips property.
Parameters
propval | Whether this #GtkRecentChooser should display a tooltip containing the full path of the recently used resources. |
Returns
Set sortType property.
Parameters
propval | Sorting order to be used when displaying the recently used resources. |