summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatrick <p.totzke@ed.ac.uk>2011-08-04 15:27:04 +0100
committerpatrick <p.totzke@ed.ac.uk>2011-08-04 15:27:04 +0100
commit3d22e66611642e237ebc807965d94118074d7449 (patch)
treef7d957d57c8efff8068453045077896227d4ac85
parent7c0153913a04d66049855f4bce081e8aa9de939d (diff)
sort taglist in get_tags()
-rw-r--r--alot/db.py4
-rw-r--r--alot/message.py4
-rw-r--r--alot/widgets.py1
3 files changed, 7 insertions, 2 deletions
diff --git a/alot/db.py b/alot/db.py
index ffa6385c..74c2f405 100644
--- a/alot/db.py
+++ b/alot/db.py
@@ -197,7 +197,9 @@ class Thread:
def get_tags(self):
"""returns tags attached to this thread as list of strings"""
- return list(self._tags)
+ l = list(self._tags)
+ l.sort()
+ return l
def add_tags(self, tags, sync_maildir_flags=False):
"""adds tags to all messages in this thread
diff --git a/alot/message.py b/alot/message.py
index b1ea7484..ca4c5a83 100644
--- a/alot/message.py
+++ b/alot/message.py
@@ -100,7 +100,9 @@ class Message:
def get_tags(self):
"""returns tags attached to this message as list of strings"""
- return list(self._tags)
+ l = list(self._tags)
+ l.sort()
+ return l
def get_thread(self):
"""returns the thread this msg belongs to as alot.db.Thread object"""
diff --git a/alot/widgets.py b/alot/widgets.py
index 20580ffa..9854e44d 100644
--- a/alot/widgets.py
+++ b/alot/widgets.py
@@ -48,6 +48,7 @@ class ThreadlineWidget(urwid.AttrMap):
cols.append(('fixed', len(mailcountstring), self.mailcount_w))
tags = self.thread.get_tags()
+ tags.sort()
for tag in tags:
tw = TagWidget(tag)
self.tag_widgets.append(tw)