commit 21bc8e1e7dcf39e77f19a77324e3a0c6b33b3204
parent 52f2c04ffecdb4b3780e1c50de3c229250877f5f
Author: Eric Davis <edavis@insanum.com>
Date: Thu, 10 Jul 2014 21:06:01 -0700
show trash tag for deleted notes in title and note view
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/view_note.py b/view_note.py
@@ -47,6 +47,9 @@ def get_status_bar(self):
t = time.localtime(float(self.note['modifydate']))
mod_time = time.strftime('%a, %d %b %Y %H:%M:%S', t)
tags = '%s' % ','.join(self.note['tags'])
+ if self.note['deleted']:
+ if tags: tags += u',trash'
+ else: tags = u'trash'
status_title = \
urwid.AttrMap(urwid.Text(u'Title: ' +
utils.get_note_title(self.note),
diff --git a/view_titles.py b/view_titles.py
@@ -57,6 +57,9 @@ def format_title(self, note):
# get the note tags
tags = '%s' % ','.join(note['tags'])
+ if note['deleted']:
+ if tags: tags += u',trash'
+ else: tags = u'trash'
# format the note modification date
t = time.localtime(float(note['modifydate']))