From 69e4ae1875681b43f049dff1c6c2ca9360b92384 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 18 Jun 2010 13:07:02 +0100 Subject: [PATCH] Switch plugins from being enabled by default to being disabled by default. An annoying change to have to make, but since almost nobody is using them yet, hopefully nobody will notice --- doc/terminator_config.5 | 8 +++++--- terminatorlib/config.py | 3 ++- terminatorlib/plugin.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index ab6f5f76..91ea6797 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -96,9 +96,11 @@ Default value: \fB'#000000'\fR Sets the colour of the background of the titlebar of any terminal that will \fBnot\fR receive input from the active terminal. Default value: \fB'#C0BEBF'\fR .TP -.B disabled_plugins -A list of plugins which should not be loaded by default. -Default value: \fB"TestPlugin, CustomCommandsMenu"\fR +.B enabled_plugins +A list of plugins which should be loaded by default. All other plugin classes will be ignored. The default value includes two +plugins related to Launchpad, which are enabled by default to provide continuity with earlier releases where these were the +only substantial plugins available, and all plugins were loaded by default. +Default value: \fB"LaunchpadBugURLHandler, LaunchpadCodeURLHandler"\fR .SH keybindings These are the options Terminator currently supports in the keybindings section: diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 2b013302..1848fc8d 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -92,7 +92,8 @@ DEFAULTS = { 'title_receive_bg_color' : '#0076c9', 'title_inactive_fg_color' : '#000000', 'title_inactive_bg_color' : '#c0bebf', - 'disabled_plugins' : ['TestPlugin', 'CustomCommandsMenu'], + 'enabled_plugins' : ['LaunchpadBugURLHandler', + 'LaunchpadCodeURLHandler'], }, 'keybindings': { 'zoom_in' : 'plus', diff --git a/terminatorlib/plugin.py b/terminatorlib/plugin.py index c88460d5..99c3aa2b 100755 --- a/terminatorlib/plugin.py +++ b/terminatorlib/plugin.py @@ -85,7 +85,8 @@ class PluginRegistry(borg.Borg): try: module = __import__(plugin[:-3], None, None, ['']) for item in getattr(module, 'AVAILABLE'): - if not testing and item in config['disabled_plugins']: + if not testing and item not in config['enabled_plugins']: + dbg('plugin %s not enabled, skipping' % item) continue if item not in self.instances: func = getattr(module, item)