Functions
gtk_recent_chooser_set_show_private ()
void
gtk_recent_chooser_set_show_private (GtkRecentChooser *chooser,
gboolean show_private);
Whether to show recently used resources marked registered as private.
Since: 2.10
gtk_recent_chooser_get_show_private ()
gboolean
gtk_recent_chooser_get_show_private (GtkRecentChooser *chooser);
Returns whether chooser
should display recently used resources
registered as private.
Returns
TRUE if the recent chooser should show private items,
FALSE otherwise.
Since: 2.10
gtk_recent_chooser_set_show_not_found ()
void
gtk_recent_chooser_set_show_not_found (GtkRecentChooser *chooser,
gboolean show_not_found);
Sets whether chooser
should display the recently used resources that
it didn’t find. This only applies to local resources.
Since: 2.10
gtk_recent_chooser_get_show_not_found ()
gboolean
gtk_recent_chooser_get_show_not_found (GtkRecentChooser *chooser);
Retrieves whether chooser
should show the recently used resources that
were not found.
Returns
TRUE if the resources not found should be displayed, and
FALSE otheriwse.
Since: 2.10
gtk_recent_chooser_set_show_icons ()
void
gtk_recent_chooser_set_show_icons (GtkRecentChooser *chooser,
gboolean show_icons);
Sets whether chooser
should show an icon near the resource when
displaying it.
Since: 2.10
gtk_recent_chooser_get_show_icons ()
gboolean
gtk_recent_chooser_get_show_icons (GtkRecentChooser *chooser);
Retrieves whether chooser
should show an icon near the resource.
Returns
TRUE if the icons should be displayed, FALSE otherwise.
Since: 2.10
gtk_recent_chooser_set_select_multiple ()
void
gtk_recent_chooser_set_select_multiple
(GtkRecentChooser *chooser,
gboolean select_multiple);
Sets whether chooser
can select multiple items.
Since: 2.10
gtk_recent_chooser_get_select_multiple ()
gboolean
gtk_recent_chooser_get_select_multiple
(GtkRecentChooser *chooser);
Gets whether chooser
can select multiple items.
Returns
TRUE if chooser
can select more than one item.
Since: 2.10
gtk_recent_chooser_set_local_only ()
void
gtk_recent_chooser_set_local_only (GtkRecentChooser *chooser,
gboolean local_only);
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.
Since: 2.10
gtk_recent_chooser_set_show_tips ()
void
gtk_recent_chooser_set_show_tips (GtkRecentChooser *chooser,
gboolean show_tips);
Sets whether to show a tooltips containing the full path of each
recently used resource in a GtkRecentChooser widget.
Since: 2.10
gtk_recent_chooser_get_show_tips ()
gboolean
gtk_recent_chooser_get_show_tips (GtkRecentChooser *chooser);
Gets whether chooser
should display tooltips containing the full path
of a recently user resource.
Returns
TRUE if the recent chooser should show tooltips,
FALSE otherwise.
Since: 2.10
gtk_recent_chooser_set_sort_type ()
void
gtk_recent_chooser_set_sort_type (GtkRecentChooser *chooser,
GtkRecentSortType sort_type);
Changes the sorting order of the recently used resources list displayed by
chooser
.
Since: 2.10
gtk_recent_chooser_set_sort_func ()
void
gtk_recent_chooser_set_sort_func (GtkRecentChooser *chooser,
GtkRecentSortFunc sort_func,
gpointer sort_data,
GDestroyNotify data_destroy);
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.
Since: 2.10
gtk_recent_chooser_set_current_uri ()
gboolean
gtk_recent_chooser_set_current_uri (GtkRecentChooser *chooser,
const gchar *uri,
GError **error);
Sets uri
as the current URI for chooser
.
Returns
TRUE if the URI was found.
Since: 2.10
gtk_recent_chooser_get_current_uri ()
gchar *
gtk_recent_chooser_get_current_uri (GtkRecentChooser *chooser);
Gets the URI currently selected by chooser
.
Returns
a newly allocated string holding a URI.
Since: 2.10
gtk_recent_chooser_select_uri ()
gboolean
gtk_recent_chooser_select_uri (GtkRecentChooser *chooser,
const gchar *uri,
GError **error);
Selects uri
inside chooser
.
Returns
TRUE if uri
was found.
Since: 2.10
gtk_recent_chooser_unselect_uri ()
void
gtk_recent_chooser_unselect_uri (GtkRecentChooser *chooser,
const gchar *uri);
Unselects uri
inside chooser
.
Since: 2.10
gtk_recent_chooser_select_all ()
void
gtk_recent_chooser_select_all (GtkRecentChooser *chooser);
Selects all the items inside chooser
, if the chooser
supports
multiple selection.
Since: 2.10
gtk_recent_chooser_unselect_all ()
void
gtk_recent_chooser_unselect_all (GtkRecentChooser *chooser);
Unselects all the items inside chooser
.
Since: 2.10
gtk_recent_chooser_get_items ()
GList *
gtk_recent_chooser_get_items (GtkRecentChooser *chooser);
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
.
Since: 2.10
gtk_recent_chooser_get_uris ()
gchar **
gtk_recent_chooser_get_uris (GtkRecentChooser *chooser,
gsize *length);
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
A newly allocated, NULL-terminated array of strings. Use
g_strfreev() to free it.
[array length=length zero-terminated=1][transfer full]
Since: 2.10
gtk_recent_chooser_list_filters ()
GSList *
gtk_recent_chooser_list_filters (GtkRecentChooser *chooser);
Gets the GtkRecentFilter objects held by chooser
.
Returns
A singly linked list
of GtkRecentFilter objects. You
should just free the returned list using g_slist_free().
[element-type GtkRecentFilter][transfer container]
Since: 2.10
gtk_recent_chooser_set_filter ()
void
gtk_recent_chooser_set_filter (GtkRecentChooser *chooser,
GtkRecentFilter *filter);
Sets filter
as the current GtkRecentFilter object used by chooser
to affect the displayed recently used resources.
Since: 2.10
gtk_recent_chooser_get_filter ()
GtkRecentFilter *
gtk_recent_chooser_get_filter (GtkRecentChooser *chooser);
Gets the GtkRecentFilter object currently used by chooser
to affect
the display of the recently used resources.
Since: 2.10
Property Details
The “filter” property
“filter” GtkRecentFilter *
The GtkRecentFilter object to be used when displaying
the recently used resources.
Owner: GtkRecentChooser
Flags: Read / Write
Since: 2.10
The “limit” property
“limit” gint
The maximum number of recently used resources to be displayed,
or -1 to display all items.
Owner: GtkRecentChooser
Flags: Read / Write
Allowed values: >= -1
Default value: 50
Since: 2.10
The “local-only” property
“local-only” gboolean
Whether this GtkRecentChooser should display only local (file:)
resources.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: TRUE
Since: 2.10
The “select-multiple” property
“select-multiple” gboolean
Allow the user to select multiple resources.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: FALSE
Since: 2.10
The “show-icons” property
“show-icons” gboolean
Whether this GtkRecentChooser should display an icon near the item.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: TRUE
Since: 2.10
The “show-not-found” property
“show-not-found” gboolean
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).
Owner: GtkRecentChooser
Flags: Read / Write
Default value: TRUE
Since: 2.10
The “show-private” property
“show-private” gboolean
Whether the private items should be displayed.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: FALSE
The “show-tips” property
“show-tips” gboolean
Whether this GtkRecentChooser should display a tooltip containing the
full path of the recently used resources.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: FALSE
Since: 2.10
The “sort-type” property
“sort-type” GtkRecentSortType
Sorting order to be used when displaying the recently used resources.
Owner: GtkRecentChooser
Flags: Read / Write
Default value: GTK_RECENT_SORT_NONE
Since: 2.10