Gtk.RecentInfo¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gtk.RecentInfo¶
Contains the metadata associated with an item in the recently used files list.
- create_app_info(app_name)[source]¶
- Parameters:
app_name (
strorNone) – the name of the application that should be mapped to aGAppInfo; ifNoneis used then the default application for the MIME type is used- Raises:
- Returns:
the newly created
GAppInfo- Return type:
Gio.AppInfoorNone
Creates a
GAppInfofor the specifiedGtkRecentInfoIn case of error, error will be set either with a %GTK_RECENT_MANAGER_ERROR or a %G_IO_ERROR
- exists()[source]¶
-
Checks whether the resource pointed by self still exists. At the moment this check is done only on resources pointing to local files.
- get_added()[source]¶
- Returns:
a
GDateTimefor the time when the resource was added- Return type:
Gets the time when the resource was added to the recently used resources list.
- get_age()[source]¶
- Returns:
a positive integer containing the number of days elapsed since the time this resource was last modified
- Return type:
Gets the number of days elapsed since the last update of the resource pointed by self.
- get_application_info(app_name)[source]¶
- Parameters:
app_name (
str) – the name of the application that has registered this item- Returns:
Noneif no application with app_name has registered this resource inside the recently used list otherwise a tuple containing:- app_exec:
string containing the command line
- count:
the number of times this item was registered
- time_:
the timestamp this item was last registered for this application
- Return type:
Gets the data regarding the application that has registered the resource pointed by self.
If the command line contains any escape characters defined inside the storage specification, they will be expanded.
- get_applications()[source]¶
- Returns:
a newly allocated
None-terminated array of strings. UseGLib.strfreev() to free it.- Return type:
[
str]
Retrieves the list of applications that have registered this resource.
- get_description()[source]¶
- Returns:
the description of the resource. The returned string is owned by the recent manager, and should not be freed.
- Return type:
Gets the (short) description of the resource.
- get_display_name()[source]¶
- Returns:
the display name of the resource. The returned string is owned by the recent manager, and should not be freed.
- Return type:
Gets the name of the resource.
If none has been defined, the basename of the resource is obtained.
- get_groups()[source]¶
- Returns:
a newly allocated
Noneterminated array of strings. UseGLib.strfreev() to free it.- Return type:
[
str]
Returns all groups registered for the recently used item self.
The array of returned group names will be
Noneterminated, so length might optionally beNone.
- get_mime_type()[source]¶
- Returns:
the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed.
- Return type:
Gets the MIME type of the resource.
- get_modified()[source]¶
- Returns:
a
GDateTimefor the time when the resource was last modified- Return type:
Gets the time when the meta-data for the resource was last modified.
- get_private_hint()[source]¶
-
Gets the value of the “private” flag.
Resources in the recently used list that have this flag set to
Trueshould only be displayed by the applications that have registered them.
- get_short_name()[source]¶
-
Computes a valid UTF-8 string that can be used as the name of the item in a menu or list.
For example, calling this function on an item that refers to “file:///foo/bar.txt” will yield “bar.txt”.
- get_uri()[source]¶
- Returns:
the URI of the resource. The returned string is owned by the recent manager, and should not be freed.
- Return type:
Gets the URI of the resource.
- get_uri_display()[source]¶
- Returns:
a newly allocated UTF-8 string containing the resource’s URI or
None. UseGLib.free() when done using it.- Return type:
Gets a displayable version of the resource’s URI.
If the resource is local, it returns a local path; if the resource is not local, it returns the UTF-8 encoded content of [method`Gtk`.RecentInfo.get_uri].
- get_visited()[source]¶
- Returns:
a
GDateTimefor the time when the resource was last visited- Return type:
Gets the time when the meta-data for the resource was last visited.
- has_application(app_name)[source]¶
- Parameters:
app_name (
str) – a string containing an application name- Returns:
Trueif an application with name app_name was found,Falseotherwise- Return type:
Checks whether an application registered this resource using app_name.
- has_group(group_name)[source]¶
-
Checks whether group_name appears inside the groups registered for the recently used item self.
- is_local()[source]¶
-
Checks whether the resource is local or not by looking at the scheme of its URI.
- last_application()[source]¶
-
Gets the name of the last application that have registered the recently used resource represented by self.
- match(info_b)[source]¶
- Parameters:
info_b (
Gtk.RecentInfo) – aGtkRecentInfo- Returns:
Trueif bothGtkRecentInfopoint to the same resource,Falseotherwise- Return type:
Checks whether two
GtkRecentInfopoint to the same resource.