gtk.RecentInfo

gtk.RecentInfo — information found when looking up an entry of the recently used files list. (new in PyGTK 2.10)

Synopsis

class gtk.RecentInfo(gobject.GBoxed):
    def get_uri()
def get_display_name()
def get_description()
def get_mime_type()
def get_added()
def get_modified()
def get_visited()
def get_private_hint()
def get_application_info(app_name)
def get_applications()
def last_application()
def has_application(app_name)
def get_groups()
def has_group(group_name)
def get_icon(size)
def get_short_name()
def get_uri_display()
def get_age()
def is_local()
def exists()
def match(info_b)

Description

A gtk.RecentInfo contains the information about an entry in a gtk.RecentManager.

Methods

gtk.RecentInfo.get_uri

    def get_uri()
Returns :the URI of the resource.

Note

This method is available in PyGTK 2.10 and above.

Returns the URI of the resource.

gtk.RecentInfo.get_display_name

    def get_display_name()
Returns :the display name of the resource.

Note

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.

gtk.RecentInfo.get_description

    def get_description()
Returns :the description of the resource.

Note

This method is available in PyGTK 2.10 and above.

Returns the (short) description of the resource.

gtk.RecentInfo.get_mime_type

    def get_mime_type()
Returns :the MIME type of the resource.

Note

This method is available in PyGTK 2.10 and above.

Returns the MIME type of the resource.

gtk.RecentInfo.get_added

    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.

Note

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.

gtk.RecentInfo.get_modified

    def get_modified()
Returns :the number of seconds elapsed from system's Epoch when the resource was last modified, or -1 on failure.

Note

This method is available in PyGTK 2.10 and above.

Returns the timestamp (seconds from system's Epoch) when the resource was last modified.

gtk.RecentInfo.get_visited

    def get_visited()
Returns :the number of seconds elapsed from system's Epoch when the resource was last visited, or -1 on failure.

Note

This method is available in PyGTK 2.10 and above.

Returns the timestamp (seconds from system's Epoch) when the resource was last visited.

gtk.RecentInfo.get_private_hint

    def get_private_hint()
Returns :TRUE if the private flag was found.

Note

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.

gtk.RecentInfo.get_application_info

    def get_application_info(app_name)
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.

Note

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.

gtk.RecentInfo.get_applications

    def get_applications(length)
Returns :a list of application name strings.

Note

This method is available in PyGTK 2.10 and above.

Returns the list of applications that have registered this resource.

gtk.RecentInfo.last_application

    def last_application()
Returns :an application name.

Note

This method is available in PyGTK 2.10 and above.

Returns the name of the last application that has registered the recently used resource.

gtk.RecentInfo.has_application

    def has_application(app_name)
app_name :a string containing an application name
Returns :TRUE if an application with the name app_name was found, FALSE otherwise.

Note

This method is available in PyGTK 2.10 and above.

Checks whether an application registered this resource using app_name.

gtk.RecentInfo.get_groups

    def get_groups(length)
Returns :a list of group names.

Note

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.

gtk.RecentInfo.has_group

    def has_group(group_name)
group_name :the name of a group
Returns :TRUE if the group was found.

Note

This method is available in PyGTK 2.10 and above.

Checks whether group_name appears inside the groups registered for the recently used item.

gtk.RecentInfo.get_icon

    def get_icon(size)
size :the size of the icon in pixels
Returns :a gtk.gdk.Pixbuf containing the icon, or None.

Note

This method is available in PyGTK 2.10 and above.

Retrieves the icon of size size associated to the resource MIME type.

gtk.RecentInfo.get_short_name

    def get_short_name()
Returns :the short name as a UTF-8 string

Note

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".

gtk.RecentInfo.get_uri_display

    def get_uri_display()
Returns :a UTF-8 string containing the resource's URI or None

Note

This method is available in PyGTK 2.10 and above.

Gets a displayable version of the resource's URI.

gtk.RecentInfo.get_age

    def get_age()
Returns :a positive integer containing the number of days elapsed since the time this resource was last modified.

Note

This method is available in PyGTK 2.10 and above.

Returns the number of days elapsed since the last update of the resource.

gtk.RecentInfo.is_local

    def is_local()
Returns :TRUE if the resource is local.

Note

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.

gtk.RecentInfo.exists

    def exists()
Returns :TRUE if the resource exists

Note

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.

gtk.RecentInfo.match

    def match(info_b)
info_b :a gtk.RecentInfo
Returns :TRUE if info_b matches this recent info.

Note

This method is available in PyGTK 2.10 and above.

Checks if info_b matches this recent info.