gtk.RecentInfo — information found when looking up an entry of the recently used files list. (new in PyGTK 2.10)
class gtk.RecentInfo(gobject.GBoxed): |
def get_uri()
Returns : | the URI of the resource. |
This method is available in PyGTK 2.10 and above.
Returns the URI of the resource.
def get_display_name()
Returns : | the display name of the resource. |
This method is available in PyGTK 2.10 and above.
Returns the name of the resource. If none has been defined, the basename of the resource is obtained.
def get_description()
Returns : | the description of the resource. |
This method is available in PyGTK 2.10 and above.
Returns the (short) description of the resource.
def get_mime_type()
Returns : | the MIME type of the resource. |
This method is available in PyGTK 2.10 and above.
Returns the MIME type of the resource.
def get_added()
Returns : | the number of seconds elapsed from system's Epoch when the resource was added to the list, or -1 on failure. |
This method is available in PyGTK 2.10 and above.
Returns the timestamp (seconds from system's Epoch) when the resource was added to the recently used resources list.
def get_modified()
Returns : | the number of seconds elapsed from system's Epoch when the resource was last modified, or -1 on failure. |
This method is available in PyGTK 2.10 and above.
Returns the timestamp (seconds from system's Epoch) when the resource was last modified.
def get_visited()
Returns : | the number of seconds elapsed from system's Epoch when the resource was last visited, or -1 on failure. |
This method is available in PyGTK 2.10 and above.
Returns the timestamp (seconds from system's Epoch) when the resource was last visited.
def get_private_hint()
Returns : | True if the private flag was
found. |
This method is available in PyGTK 2.10 and above.
Returns the value of the "private" flag. Resources in the
recently used list that have this flag set to True
should only be displayed by the applications that have registered
them.
def get_application_info(app_name
)
| the name of the application that has registered this item |
Returns : | a 3-tuple (containing the command line, the
number of times this item was registered and the timestamp this
item was last registered for this application) if an application
named app_name has registered this resource
inside the recently used list, or None
otherwise. |
This method is available in PyGTK 2.10 and above.
Returns a 3-tuple containg the data regarding the application that has registered this resource. The 3-tuple contains the command line, the number of times this item was registered and the timestamp this item was last registered for this application
If the command line contains any escape characters defined inside the storage specification, they will be expanded.
def get_applications(length
)
Returns : | a list of application name strings. |
This method is available in PyGTK 2.10 and above.
Returns the list of applications that have registered this resource.
def last_application()
Returns : | an application name. |
This method is available in PyGTK 2.10 and above.
Returns the name of the last application that has registered the recently used resource.
def has_application(app_name
)
| a string containing an application name |
Returns : | True if an application with
the name app_name was found,
False otherwise. |
This method is available in PyGTK 2.10 and above.
Checks whether an application registered this resource using
app_name
.
def get_groups(length
)
Returns : | a list of group names. |
This method is available in PyGTK 2.10 and above.
Returns a list containing the names of all groups registered for the recently used item.
def has_group(group_name
)
| the name of a group |
Returns : | True if the group was
found. |
This method is available in PyGTK 2.10 and above.
Checks whether group_name
appears inside
the groups registered for the recently used item.
def get_icon(size
)
| the size of the icon in pixels |
Returns : | a gtk.gdk.Pixbuf
containing the icon, or
None . |
This method is available in PyGTK 2.10 and above.
Retrieves the icon of size size
associated to the resource MIME type.
def get_short_name()
Returns : | the short name as a UTF-8 string |
This method is available in PyGTK 2.10 and above.
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".
def get_uri_display()
Returns : | a UTF-8 string containing the resource's URI or
None |
This method is available in PyGTK 2.10 and above.
Gets a displayable version of the resource's URI.
def get_age()
Returns : | a positive integer containing the number of days elapsed since the time this resource was last modified. |
This method is available in PyGTK 2.10 and above.
Returns the number of days elapsed since the last update of the resource.
def is_local()
Returns : | True if the resource is
local. |
This method is available in PyGTK 2.10 and above.
Checks whether the resource is local or not by looking at the scheme of its URI.
def exists()
Returns : | True if the resource
exists |
This method is available in PyGTK 2.10 and above.
Checks whether the resource still exists. At the moment this check is done only on resources pointing to local files.
def match(info_b
)
| a gtk.RecentInfo |
Returns : | True if
info_b matches this recent
info. |
This method is available in PyGTK 2.10 and above.
Checks if info_b
matches this recent
info.