Skip to content

Gtk.NamedAction

class — extends ShortcutAction

Activates a named action.

See WidgetClass.install_action and Widget.insert_action_group for ways to associate named actions with widgets.

Constructors

new

@classmethod
def new(cls, name: str) -> NamedAction

Creates an action that when activated, activates the named action on the widget.

It also passes the given arguments to it.

See Widget.insert_action_group for how to add actions to widgets.

Parameters:

  • name — the detailed name of the action

Methods

get_action_name

def get_action_name(self) -> str

Returns the name of the action that will be activated.

Properties

action_name

action_name: str  # read/write

The name of the action to activate.