gaupol.Action

Source: gaupol/action.py

Anchestors: gi.overrides.Gtk.Action, gi.repository.Gtk.Action, gi.overrides.GObject.Object, gi.repository.GObject.Object, gi._gobject._gobject.GObject, builtins.object

class gaupol.Action

Base classes for Gtk.UIManager actions.

Action.accelerator

Accelerator string or None

accelerator defines a string in the format understood by Gtk.accelerator_parse(), leave undefined to fall back on a blank string, i.e. no accelerator.

Action.action_group

Name of action group to place action into

Use “main-safe” for actions that do not conflict with widgets’ own built-in keybindings (e.g. clipboard keybindings in entries) and “main-unsafe” for ones that do.

Action.tool_item_type

Class of tool item widget

The default value is Gtk.ToolButton. For buttons with a menu attached, use Gtk.MenuToolButton.

Action.widgets

Tuple of names of related application widgets

widgets should be acquirable with getattr() from gaupol.Application. Their sensitivities will be kep in sync with sensitivity of the corresponding action.

Methods

Action.__init__(name)

Initialize an Action instance.

Action.do_create_tool_item()

Return a tool button widget.

Action.finalize(application)

Connect action to widgets and methods of application.

Action.set_sensitive(sensitive)

Set the sensitivity of action and all its widgets.

Action.update_sensitivity(application, page, selected_rows)

Update the sensitivity of action and all its widgets.