From d8075a23e61ed802cd4d9a0b0335c5eb1ddfdf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Bili=C5=84ski?= Date: Fri, 18 Jul 2008 07:05:07 +0000 Subject: [PATCH] Small sync commit. --- src/plugins/gui.py | 4 ++-- src/plugins/helpers.py | 2 +- src/plugins/plugin.py | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/plugins/gui.py b/src/plugins/gui.py index 9b0734215..1aa4d0140 100644 --- a/src/plugins/gui.py +++ b/src/plugins/gui.py @@ -19,7 +19,7 @@ GUI classes related to plug-in management. :author: Mateusz Biliński -:since: 06/06/2008 +:since: 6th June 2008 :copyright: Copyright (2008) Mateusz Biliński :license: GPL ''' @@ -183,7 +183,7 @@ class PluginsWindow(object): else: # No plugin selected. this should never be reached. As configure - # plugin button should only my clickable when plugin is selected. + # plugin button should only be clickable when plugin is selected. # XXX: maybe throw exception here? pass diff --git a/src/plugins/helpers.py b/src/plugins/helpers.py index 3379bd300..fc6ff9c5d 100644 --- a/src/plugins/helpers.py +++ b/src/plugins/helpers.py @@ -19,7 +19,7 @@ Helper code related to plug-ins management system. :author: Mateusz Biliński -:since: 05/30/2008 +:since: 30th May 2008 :copyright: Copyright (2008) Mateusz Biliński :license: GPL ''' diff --git a/src/plugins/plugin.py b/src/plugins/plugin.py index ffb9ede3d..3a6144472 100644 --- a/src/plugins/plugin.py +++ b/src/plugins/plugin.py @@ -97,6 +97,20 @@ class GajimPlugin(object): ''' Extension points that plugin wants to connect with. ''' + config_default_values = {} + ''' + Default values for keys that should be stored in plug-in config. + + This dict is used when when someone calls for config option but it has not + been set yet. + + Values are tuples: (default_value, option_description). The first one can + be anything (this is the advantage of using shelve/pickle instead of + custom-made config I/O handling); the second one should be unicode (gettext + can be used if need and/or translation is planned). + + :type: {} of 2-element tuples + ''' @log_calls('GajimPlugin') def __init__(self):