summaryrefslogtreecommitdiff
path: root/alot/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/settings.py')
-rw-r--r--alot/settings.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/alot/settings.py b/alot/settings.py
index 51a25827..b373016c 100644
--- a/alot/settings.py
+++ b/alot/settings.py
@@ -269,11 +269,16 @@ DEFAULTS = {
}
}
+NOTMUCH_DEFAULTS = {
+ 'maildir': {
+ 'synchronize_flags': 'False',
+ },
+}
-class CustomConfigParser(SafeConfigParser):
+
+class DefaultsConfigParser(SafeConfigParser):
def __init__(self, defaults):
self.defaults = defaults
- self.hooks = None
SafeConfigParser.__init__(self)
self.optionxform = lambda x: x
for sec in defaults.keys():
@@ -299,6 +304,11 @@ class CustomConfigParser(SafeConfigParser):
value = self.get(section, option, **kwargs)
return [s.strip() for s in value.split(',')]
+class AlotConfigParser(DefaultsConfigParser):
+ def __init__(self, defaults):
+ DefaultsConfigParser.__init__(self, defaults)
+ self.hooks = None
+
def read(self, file):
if not os.path.isfile(file):
return
@@ -388,7 +398,8 @@ class HookManager:
return f
-config = CustomConfigParser(DEFAULTS)
+config = AlotConfigParser(DEFAULTS)
+notmuchconfig = DefaultsConfigParser(NOTMUCH_DEFAULTS)
hooks = HookManager()
mailcaps = mailcap.getcaps()