gaupol.Extension

Source: gaupol/extension.py

Anchestors: builtins.object

class gaupol.Extension
Separate object that can be activated and deactivated during runtime.

Methods

Extension.setup(application)

Setup extension for use with application.

This method is called every time the extension is associated with application, i.e. both when it is manually activated and also every time right after application start.

Extension.show_help()

Show documentation on using extension.

Subclasses can override this to, for example, launch a web browser with gaupol.util.show_uri() to view HTML documentation.

Extension.show_preferences_dialog(parent)

Show a preferences dialog for configuring extension.

parent is the parent window that the dialog can be centered on.

Extension.teardown(application)

End use of extension with application.

This method is called every time the extension is unassociated with application, i.e. both when it is manually deactivated and also every time right before application exit.

Extension.update(application, page)

Update state of extension for application and active page.

The main purpose of this method is to update sensitivities of UI manager actions associated with this extension.