diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-03-02 23:20:03 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-03-02 23:20:03 +0000 |
commit | ebc037f0982c2a54121c5cb808057fd66f13b0ff (patch) | |
tree | 4c7a016934d39ee0396f6d85cd829b85f28a5e93 /alot | |
parent | 947359f7817dfbf56cda08415a2be4e9d051272f (diff) |
some cleanups
Diffstat (limited to 'alot')
-rw-r--r-- | alot/helper.py | 2 | ||||
-rw-r--r-- | alot/widgets.py | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/alot/helper.py b/alot/helper.py index b096df41..56250c71 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -17,7 +17,7 @@ from twisted.internet.protocol import ProcessProtocol from twisted.internet.defer import Deferred import StringIO import logging -from configobj import ConfigObj, ConfigObjError, flatten_errors, Section +from configobj import ConfigObj, ConfigObjError, flatten_errors from validate import Validator from alot.errors import ConfigError diff --git a/alot/widgets.py b/alot/widgets.py index c32f171a..daea6342 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -93,13 +93,14 @@ class ThreadlineWidget(urwid.AttrMap): else: newest = None if newest == None: - datestring = u' ' * 10 + datestring = '' else: formatstring = settings.get('timestamp_format') if formatstring is None: - datestring = pretty_datetime(newest).rjust(ThreadlineWidget.pretty_datetime_len) + datestring = pretty_datetime(newest) else: datestring = newest.strftime(formatstring) + datestring = datestring.rjust(self.pretty_datetime_len) self.date_w = urwid.AttrMap(urwid.Text(datestring), self._get_theme('date')) cols.append(('fixed', len(datestring), self.date_w)) @@ -680,7 +681,8 @@ class AttachmentWidget(urwid.WidgetWrap): if not isinstance(attachment, message.Attachment): self.attachment = message.Attachment(self.attachment) att = settings.get_theming_attribute('thread', 'attachment') - focus_att = settings.get_theming_attribute('thread', 'attachment_focus') + focus_att = settings.get_theming_attribute('thread', + 'attachment_focus') widget = urwid.AttrMap(urwid.Text(self.attachment.__str__()), att, focus_att) urwid.WidgetWrap.__init__(self, widget) |