diff --git a/data/glade/plugins_window.glade b/data/glade/plugins_window.glade index d8996b53e..425d77dd7 100644 --- a/data/glade/plugins_window.glade +++ b/data/glade/plugins_window.glade @@ -1,6 +1,6 @@ - + 650 @@ -322,6 +322,7 @@ True + False True @@ -555,6 +556,9 @@ + True + False + True Available diff --git a/plugins/acronyms_expander.py b/plugins/acronyms_expander.py index 43a33a8d2..f650f45b6 100644 --- a/plugins/acronyms_expander.py +++ b/plugins/acronyms_expander.py @@ -43,7 +43,7 @@ class AcronymsExpanderPlugin(GajimPlugin): def __init__(self): super(AcronymsExpanderPlugin, self).__init__() - self.__class__.gui_extension_points = { + self.gui_extension_points = { 'chat_control_base' : (self.connect_with_chat_control_base, self.disconnect_from_chat_control_base) } diff --git a/plugins/length_notifier.py b/plugins/length_notifier.py index 7c9f2422a..63c0d6d44 100644 --- a/plugins/length_notifier.py +++ b/plugins/length_notifier.py @@ -43,7 +43,7 @@ class LengthNotifierPlugin(GajimPlugin): def __init__(self): super(LengthNotifierPlugin, self).__init__() - self.__class__.gui_extension_points = { + self.gui_extension_points = { 'chat_control' : (self.connect_with_chat_control, self.disconnect_from_chat_control) } diff --git a/src/plugins/plugin.py b/src/plugins/plugin.py index fd49c6a44..1d0ee7cb9 100644 --- a/src/plugins/plugin.py +++ b/src/plugins/plugin.py @@ -94,4 +94,29 @@ class GajimPlugin(object): @log_calls('GajimPlugin') def __init__(self): - pass \ No newline at end of file + self.config = Config() + ''' + Plug-in configuration dictionary. + + Automatically saved and loaded and plug-in (un)load. + + :type: `plugins.plugin.Config` + ''' + + self._load_config() + + @log_calls('GajimPlugin') + def _save_config(self): + pass + + @log_calls('GajimPlugin') + def _load_config(self): + pass + + @log_calls('GajimPlugin') + def __del__(self): + self._save_config() + + +class Config(dict): + pass \ No newline at end of file