summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/defaults/default.theme2
-rw-r--r--alot/defaults/theme.spec4
-rw-r--r--alot/settings/theme.py11
-rw-r--r--alot/widgets.py2
4 files changed, 10 insertions, 9 deletions
diff --git a/alot/defaults/default.theme b/alot/defaults/default.theme
index 1f87c5ec..00ea84eb 100644
--- a/alot/defaults/default.theme
+++ b/alot/defaults/default.theme
@@ -33,7 +33,7 @@
[[threadline]]
normal = 'default','','default','default','#6d6','default'
focus = 'standout','','light gray','dark gray','white','#68a'
- order = date,mailcount,tags,authors,subject
+ parts = date,mailcount,tags,authors,subject
[[[date]]]
normal = 'default','','light gray','default','g58','default'
focus = 'standout','','light gray','dark gray','g89','#68a'
diff --git a/alot/defaults/theme.spec b/alot/defaults/theme.spec
index 825c2060..3f8d1108 100644
--- a/alot/defaults/theme.spec
+++ b/alot/defaults/theme.spec
@@ -23,7 +23,7 @@
focus = attrtriple
# order subwidgets are displayed. subset of {date,mailcount,tags,authors,subject,count}
# every element listed must have its own subsection below
- order = string_list(default=list(date,mailcount,tags,authors,subject))
+ parts = string_list(default=None)
[[[__many__]]]
normal = attrtriple
focus = attrtriple
@@ -32,7 +32,7 @@
[[__many__]]
normal = attrtriple
focus = attrtriple
- order = string_list(default=list(date,mailcount,tags,authors,subject))
+ parts = string_list(default=None)
[[[__many__]]]
normal = attrtriple
focus = attrtriple
diff --git a/alot/settings/theme.py b/alot/settings/theme.py
index 2b708ce6..b3a47b1b 100644
--- a/alot/settings/theme.py
+++ b/alot/settings/theme.py
@@ -31,9 +31,11 @@ class Theme(object):
# make sure every entry in 'order' lists have their own subsections
for sec in self._config['search']:
if sec.startswith('threadline'):
+ logging.debug(sec)
threadline = self._config['search'][sec]
- if 'order' in threadline:
- listed = set(threadline['order'])
+ logging.debug(threadline)
+ if threadline['parts'] is not None:
+ listed = set(threadline['parts'])
present = set(threadline.sections)
difference = listed.difference(present)
if difference:
@@ -79,14 +81,13 @@ class Theme(object):
matches(candidate, thread):
match = candidate
break
- #logging.debug('match: %s' % match)
# fill in values
res = {}
res['normal'] = pickcolour(match.get('normal', default['normal']))
res['focus'] = pickcolour(match.get('focus', default['focus']))
- res['order'] = match.get('order', default['order'])
- for part in res['order']:
+ res['parts'] = match.get('parts', default['parts'])
+ for part in res['parts']:
res[part] = {}
res[part]['width'] = match[part].get('width') or ('fit', 0, 0)
res[part]['alignment'] = match[part].get('alignment')
diff --git a/alot/widgets.py b/alot/widgets.py
index 5986c49a..3ddd1903 100644
--- a/alot/widgets.py
+++ b/alot/widgets.py
@@ -210,7 +210,7 @@ class ThreadlineWidget(urwid.AttrMap):
self.widgets = []
columns = []
self.structure = settings.get_threadline_theming(self.thread)
- for partname in self.structure['order']:
+ for partname in self.structure['parts']:
minw = maxw = None
width_tuple = self.structure[partname]['width']
if width_tuple is not None: