Gtk.RecentAction

g GObject.GInterface GObject.GInterface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.RecentChooser Gtk.RecentChooser GObject.GInterface->Gtk.RecentChooser GObject.Object GObject.Object Gtk.Action Gtk.Action GObject.Object->Gtk.Action Gtk.RecentAction Gtk.RecentAction Gtk.Action->Gtk.RecentAction Gtk.Buildable->Gtk.Action Gtk.RecentChooser->Gtk.RecentAction

Subclasses:

None

Methods

Inherited:

Gtk.Action (42), GObject.Object (37), Gtk.Buildable (10), Gtk.RecentChooser (31)

Structs:

GObject.ObjectClass (5)

class

new (name, label, tooltip, stock_id)

class

new_for_manager (name, label, tooltip, stock_id, manager)

get_show_numbers ()

set_show_numbers (show_numbers)

Virtual Methods

Inherited:

Gtk.Action (6), GObject.Object (7), Gtk.Buildable (10), Gtk.RecentChooser (13)

Properties

Inherited:

Gtk.Action (16), Gtk.RecentChooser (10)

Name

Type

Flags

Short Description

show-numbers

bool

r/w/en

Whether the items should be displayed with a number deprecated

Signals

Inherited:

Gtk.Action (1), GObject.Object (1), Gtk.RecentChooser (2)

Fields

Inherited:

Gtk.Action (1), GObject.Object (1), Gtk.RecentChooser (2)

Name

Type

Access

Description

parent_instance

Gtk.Action

r

Class Details

class Gtk.RecentAction(*args, **kwargs)
Bases:

Gtk.Action, Gtk.RecentChooser

Abstract:

No

Structure:

Gtk.RecentActionClass

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.

classmethod new(name, label, tooltip, stock_id)[source]
Parameters:
  • name (str) – a unique name for the action

  • label (str or None) – the label displayed in menu items and on buttons, or None

  • tooltip (str or None) – a tooltip for the action, or None

  • stock_id (str or None) – the stock icon to display in widgets representing the action, or None

Returns:

the newly created Gtk.RecentAction.

Return type:

Gtk.Action

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().

New in version 2.12.

Deprecated since version 3.10.

classmethod new_for_manager(name, label, tooltip, stock_id, manager)[source]
Parameters:
Returns:

the newly created Gtk.RecentAction

Return type:

Gtk.Action

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().

New in version 2.12.

Deprecated since version 3.10.

get_show_numbers()[source]
Returns:

True if numbers should be shown.

Return type:

bool

Returns the value set by Gtk.RecentChooserMenu.set_show_numbers().

New in version 2.12.

Deprecated since version 3.10.

set_show_numbers(show_numbers)[source]
Parameters:

show_numbers (bool) – True if the shown items should be numbered

Sets whether a number should be added to the items shown by the widgets representing self. 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.

New in version 2.12.

Deprecated since version 3.10.

Property Details

Gtk.RecentAction.props.show_numbers
Name:

show-numbers

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether the items should be displayed with a number.

Deprecated since version 3.10.