Class p.c.a.ActionsConfig(BaseConfig):

Part of pida.core.actions View In Hierarchy

Known subclasses: pida.core.editors.EditorActionsConfig, pida.editors.emacs.emacs.EditorActionsConfig, pida.services.appcontroller.appcontroller.AppcontrollerActions, pida.services.buffer.buffer.BufferActionsConfig, pida.services.bugreport.bugreport.BugreportActions, pida.services.commander.commander.CommanderActionsConfig, pida.services.filemanager.filemanager.FileManagerActionsConfig, pida.services.grepper.grepper.GrepperActionsConfig, pida.services.help.help.HelpActionsConfig, pida.services.manhole.manhole.ManholeActionsConfig, pida.services.notify.notify.NotifyActionsConfig, pida.services.openwith.openwith.OpenWithActions, pida.services.optionsmanager.optionsmanager.OptionsActions, pida.services.plugins.plugins.PluginsActionsConfig, pida.services.project.project.ProjectActionsConfig, pida.services.sessions.sessions.SessionsActionsConfig, pida.services.shortcuts.shortcuts.ShortcutsActionsConfig, pida.services.versioncontrol.versioncontrol.VersionControlActions, pida.services.webbrowser.webbrowser.WebActions, pida.services.window.window.WindowActionsConfig, pida.utils.debugger.debugger.DebuggerActionsConfig (hide last 18 again) ... and 18 more

The base action configurator.

Services using actions should subclass this, and set their actions_config class attribute to the class. It will be instantiated on service activation with the service instance passed as the parameter to the constructor. The service will be available as the svc attribute in the configurator instance.

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
80 Method create Called to initialize this configurator.
96 Method create_actions Called to create the actions.
105 Method remove_actions Undocumented
108 Method create_action Create an action for this service.
150 Method _create_key_option Undocumented
161 Method _get_shortcut_gconf_key Undocumented
165 Method _get_group_name Undocumented
168 Method get_action Get the named action
174 Method get_action_group Get the action group
180 Method get_keyboard_options Get the keyboard options.
191 Method _create_accel_path Undocumented
194 Method _set_action_keypress Undocumented
199 Method _set_action_keypress_from_option Undocumented
202 Method _on_shortcut_notify Undocumented
205 Method subscribe_keyboard_shortcuts Set the keyboard shortcuts for the actions with keyboard shortcuts

Inherited from BaseConfig:

Line # Kind Name Docs
4 Method __init__ Undocumented
11 Method get_service_name Undocumented
Line # Kind Name Docs
4 Method __init__ Undocumented
191 Method _create_accel_path Undocumented
150 Method _create_key_option Undocumented
165 Method _get_group_name Undocumented
161 Method _get_shortcut_gconf_key Undocumented
202 Method _on_shortcut_notify Undocumented
194 Method _set_action_keypress Undocumented
199 Method _set_action_keypress_from_option Undocumented
80 Method create Called to initialize this configurator.
108 Method create_action Create an action for this service.
96 Method create_actions Called to create the actions.
168 Method get_action Get the named action
174 Method get_action_group Get the action group
180 Method get_keyboard_options Get the keyboard options.
11 Method get_service_name Undocumented
105 Method remove_actions Undocumented
205 Method subscribe_keyboard_shortcuts Set the keyboard shortcuts for the actions with keyboard shortcuts
def create(self):
Called to initialize this configurator.

Will initialise attributes, call create_actions, then register the actions and the ui definitions with the Boss.

def create_actions(self):
Called to create the actions.

Create your service actions actions here. Each action should be created with a call to create_action. These actions will be added to the action group for the service, and can be used for any purpose.

def remove_actions(self):
Undocumented
def create_action(self, name, atype, label, tooltip, stock_id, callback=None, accel_string='NOACCEL'):
Create an action for this service.

:param name:
    The unique name for the action. This must be unique for the
    service, so choose names wisely. For example:
    `show_project_properties`
:param atype:
    This is the type of action, and maps directly to a type of
    gtk.Action. Types include:
    - TYPE_NORMAL: A normal gtk.Action
    - TYPE_TOGGLE: A gtk.ToggleAction
    - TYPE_RADIO: A gtk.RadioAction
    - TYPE_MENUTOOL: A custom Action which contains a dropdown menu
      when rendered as a tool item
:param label:
    The label to display on proxies of the action.
:param toolip:
    The tool tip to display on proxies of the action.
:param stock_id:
    The stock id of the icon to display on proxies of the action.
:param callback:
    The callback function to be called when the action is activated.
    This function should take the action as a parameter.
:param accel_string:
    The accelerator string set as the default accelerator for this
    action, or 'NOACCEL' for actions that do not need an accelerator.
    To be used these actions must be proxied as items in one of the
    menus or toolbars.
def _create_key_option(self, act, name, label, tooltip, accel_string):
Undocumented
def _get_shortcut_gconf_key(self, name):
Undocumented
def _get_group_name(self):
Undocumented
def get_action(self, name):
Get the named action
def get_action_group(self):
Get the action group
def get_keyboard_options(self):
Get the keyboard options.

The keyboard options are a dict which stores the GConf directory containing the values for the keyboard shortcuts for the actions that do not have NOACCEL set. These are persisted on first run, and then loaded from GConf to maintian user preferences.

def _create_accel_path(self, name):
Undocumented
def _set_action_keypress(self, name, accel_string):
Undocumented
def _set_action_keypress_from_option(self, option):
Undocumented
def _on_shortcut_notify(self, client, id, entry, option, *args):
Undocumented
def subscribe_keyboard_shortcuts(self):
Set the keyboard shortcuts for the actions with keyboard shortcuts enabled.
API Documentation for PIDA, generated by pydoctor.