gtk.RecentAction

gtk.RecentAction — An action of which represents a list of recently used files (new in PyGTK 2.12)

Synopsis

class gtk.RecentAction(gtk.Action):
    gtk.RecentAction(name, label, tooltip, stock_id)
def get_show_numbers()
def set_show_numbers(show_numbers)
Functions
 
    def gtk.recent_action_new_for_manager(name, label, tooltip, stock_id, manager)

Ancestry

+-- gobject.GObject
  +-- gtk.Action
    +-- gtk.RecentAction

gtk.RecentAction Properties

gtk.Action Properties

"show-numbers"Read-WriteWhether the items should be displayed with a number. Default value: False

Description

A gtk.RecentAction represents a list of recently used files, which can be shown by widgets such as gtk.RecentChooserDialog or gtk.RecentChooserMenu.

To construct a submenu showing recently used files, use a gtk.RecentAction as the action for a <menuitem>. To construct a menu toolbutton showing the recently used files in the popup menu, use a gtk.RecentAction as the action for a <toolitem> element.

Constructor

gtk.RecentAction

    gtk.RecentAction(name, label, tooltip, stock_id)

name :

a unique name for the action

label :

the label displayed in menu items and on buttons, or None.

tooltip :

a tooltip for the action, or None.

stock_id :

the stock icon to display in widgets representing the action, or None.

Returns :

a new gtk.RecentAction

Note

This constructor is available in PyGTK 2.12 and above.

Creates a new gtk.RecentAction object. To add the action to a gtk.ActionGroup and set the accelerator for the action, call gtk.ActionGroup.add_action_with_accel().

Methods

gtk.RecentAction.get_show_numbers

    def get_show_numbers()

Returns :

True if numbers should be shown.

Note

This method is available in PyGTK 2.12 and above.

The get_show_numbers() method returns the value set by gtk.RecentAction.set_show_numbers().

gtk.RecentAction.set_show_numbers

    def set_show_numbers(show_numbers)

show_numbers :

True if the shown items should be numbered.

Note

This method is available in PyGTK 2.12 and above.

The set_show_numbers() method sets whether a number should be added to the items shown by the widgets representing action. The numbers are shown to provide a unique character for a mnemonic to be used inside the menu item's label. Only the first ten items get a number to avoid clashes.

Functions

gtk.recent_action_new_for_manager

    def recent_action_new_for_manager(name, label, tooltip, stock_id, manager)

name :

a unique name for the action

label :

the label displayed in menu items and on buttons, or None.

tooltip :

a tooltip for the action, or None.

stock_id :

the stock icon to display in widgets representing the action, or None.

manager :

a gtk.RecentManager, or None for using the default gtk.RecentManager

Note

This function is available in PyGTK 2.12 and above.

The recent_action_new_for_manager() function creates a new gtk.RecentAction object. To add the action to a gtk.ActionGroup and set the accelerator for the action, call gtk.ActionGroup.add_action_with_accel().