Skip to content

Gio.SimpleActionGroup

class — extends GObject.Object, ActionGroup, ActionMap

GSimpleActionGroup is a hash table filled with Action objects, implementing the ActionGroup and ActionMap interfaces.

Constructors

new

@classmethod
def new(cls) -> SimpleActionGroup

Creates a new, empty, SimpleActionGroup.

Methods

add_entries

def add_entries(self, entries: list[ActionEntry], user_data: int | None = ...) -> None

:::warning Deprecated since 2.38 This API is deprecated. :::

A convenience function for creating multiple SimpleAction instances and adding them to the action group.

Parameters:

  • entries — a pointer to the first item in an array of ActionEntry structs
  • user_data — the user data for signal connections

insert

def insert(self, action: Action) -> None

:::warning Deprecated since 2.38 This API is deprecated. :::

Adds an action to the action group.

If the action group already contains an action with the same name as action then the old action is dropped from the group.

The action group takes its own reference on action.

Parameters:

lookup

def lookup(self, action_name: str) -> Action

:::warning Deprecated since 2.38 This API is deprecated. :::

Looks up the action with the name action_name in the group.

If no such action exists, returns None.

Parameters:

  • action_name — the name of an action

remove

def remove(self, action_name: str) -> None

:::warning Deprecated since 2.38 This API is deprecated. :::

Removes the named action from the action group.

If no action of this name is in the group then nothing happens.

Parameters:

  • action_name — the name of the action