summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-02-18 12:11:29 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-02-18 12:16:24 +0000
commit1a173309684cb592b9ff3a0ceef033294f31823d (patch)
treee56d382b69128e0c24e9f57d86ea61288e320063
parente7c257e0c396f8e920751c6e11205de6b8c90afa (diff)
getter for alot/notmuch settings
-rw-r--r--alot/settings.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/alot/settings.py b/alot/settings.py
index b559f172..adfbce41 100644
--- a/alot/settings.py
+++ b/alot/settings.py
@@ -85,6 +85,34 @@ class SettingsManager(object):
logging.debug('unable to load hooks file:%s' % hooks_path)
+ def getc_setting(self, key):
+ """
+ look up global config values from alot's config
+
+ :param key: key to look up
+ :type key: str
+ """
+ value = None
+ if key in self._config:
+ value = self._config[key]
+ if isinstance(value, Section):
+ value = None
+ return value
+
+ def get_notmuch_setting(self, section, key):
+ """
+ look up config values from notmuch's config
+
+ :param section: key is in
+ :type section: str
+ :param key: key to look up
+ :type key: str
+ """
+ value = None
+ if key in self._notmuchconfig:
+ value = self._notmuchconfig[key]
+ return value
+
def get_theming_attribute(self, mode, name):
colours = int(self._config.get('colourmode'))
return self.theme.get_attribute(mode, name, colours)