gtk.RecentAction — An action of which represents a list of recently used files (new in PyGTK 2.12)
class gtk.RecentAction(gtk.Action): |
Functions
def gtk.recent_action_new_for_manager(name
, label
, tooltip
, stock_id
, manager
)
|
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.
gtk.RecentAction(name
, label
, tooltip
, stock_id
)
| a unique name for the action |
| the label displayed in menu items and on buttons, or None . |
| a tooltip for the action, or None . |
| the stock icon to display in widgets representing the action, or None . |
Returns : | a new
gtk.RecentAction
|
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
().
def get_show_numbers()
Returns : | True if numbers should be shown. |
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
().
def set_show_numbers(show_numbers
)
| True if the shown items should be numbered. |
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.
def recent_action_new_for_manager(name
, label
, tooltip
, stock_id
, manager
)
| a unique name for the action |
| the label displayed in menu items and on buttons, or None . |
| a tooltip for the action, or None . |
| the stock icon to display in widgets representing the action, or None . |
| a gtk.RecentManager, or
None for using the default
gtk.RecentManager |
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
().