diff options
Diffstat (limited to 'alot')
-rw-r--r-- | alot/account.py | 2 | ||||
-rw-r--r-- | alot/buffer.py | 5 | ||||
-rw-r--r-- | alot/command.py | 4 | ||||
-rwxr-xr-x | alot/init.py | 10 | ||||
-rw-r--r-- | alot/message.py | 1 | ||||
-rw-r--r-- | alot/ui.py | 8 | ||||
-rw-r--r-- | alot/widgets.py | 2 |
7 files changed, 13 insertions, 19 deletions
diff --git a/alot/account.py b/alot/account.py index f76f8d0d..fa47b177 100644 --- a/alot/account.py +++ b/alot/account.py @@ -108,7 +108,7 @@ class Account(object): msg.set_flags('S') else: msg = mailbox.Message(mail) - key = mbx.add(mail) + mbx.add(mail) mbx.flush() mbx.unlock() diff --git a/alot/buffer.py b/alot/buffer.py index 77eef99e..c0d34774 100644 --- a/alot/buffer.py +++ b/alot/buffer.py @@ -152,9 +152,10 @@ class SearchBuffer(Buffer): def rebuild(self): if self.isinitialized: - focusposition = self.threadlist.get_focus()[1] + pass + #focusposition = self.threadlist.get_focus()[1] else: - focusposition = 0 + #focusposition = 0 self.isinitialized = True self.result_count = self.dbman.count_messages(self.querystring) diff --git a/alot/command.py b/alot/command.py index d4ccc12b..58020b35 100644 --- a/alot/command.py +++ b/alot/command.py @@ -344,7 +344,6 @@ class ToggleThreadTagCommand(Command): #remove line from searchlist if thread doesn't match the query qs = "(%s) AND thread:%s" % (cb.querystring, self.thread.get_thread_id()) - msg_count = ui.dbman.count_messages(qs) if ui.dbman.count_messages(qs) == 0: ui.logger.debug('remove: %s' % self.thread) cb.threadlist.remove(threadwidget) @@ -445,12 +444,11 @@ class RetagCommand(Command): self.thread = ui.current_buffer.get_selected_thread() if not self.thread: return - initial_tagstring = ','.join(self.thread.get_tags()) tags = filter(lambda x: x, self.tagsstring.split(',')) ui.logger.info("got %s:%s" % (self.tagsstring, tags)) try: self.thread.set_tags(tags) - except DatabaseROError, e: + except DatabaseROError: ui.notify('index in read-only mode', priority='error') return diff --git a/alot/init.py b/alot/init.py index 1e347171..d89e9c8f 100755 --- a/alot/init.py +++ b/alot/init.py @@ -101,11 +101,11 @@ def main(): query = args.query # set up and start interface - ui = UI(dbman, - logger, - aman, - query, - args.colours, + UI(dbman, + logger, + aman, + query, + args.colours, ) if __name__ == "__main__": diff --git a/alot/message.py b/alot/message.py index 75895456..4f473172 100644 --- a/alot/message.py +++ b/alot/message.py @@ -164,7 +164,6 @@ class Message(object): def get_text_content(self): res = '' for part in self.get_email().walk(): - ctype = part.get_content_type() enc = part.get_content_charset() if part.get_content_maintype() == 'text': raw_payload = part.get_payload(decode=True) @@ -118,7 +118,7 @@ class UI(object): ('fixed', len(prefix), leftpart), ('weight', 1, editpart), ]) - prompt_widget = urwid.AttrMap(both, 'prompt', 'prompt') + urwid.AttrMap(both, 'prompt', 'prompt') # put promptwidget as overlay on main widget overlay = urwid.Overlay(both, main, @@ -229,7 +229,6 @@ class UI(object): :param messages: The popups to remove. This should be exactly what notify() returned """ - footer = self.mainframe.get_footer() newpile = self.notificationbar.widget_list for l in messages: newpile.remove(l) @@ -280,7 +279,7 @@ class UI(object): ], dividechars=1) else: # above both = urwid.Pile([msgpart, choicespart]) - prompt_widget = urwid.AttrMap(both, 'prompt', 'prompt') + urwid.AttrMap(both, 'prompt', 'prompt') # put promptwidget as overlay on main widget overlay = urwid.Overlay(both, main, @@ -314,7 +313,6 @@ class UI(object): if timeout == -1 and block: msgs.append(build_line('(hit any key to proceed)', 'normal')) - footer = self.mainframe.get_footer() if not self.notificationbar: self.notificationbar = urwid.Pile(msgs) else: @@ -327,7 +325,7 @@ class UI(object): self.mainloop.draw_screen() if block: - keys = self.mainloop.screen.get_input() + self.mainloop.screen.get_input() clear() else: if timeout >= 0: diff --git a/alot/widgets.py b/alot/widgets.py index 092a414a..14d97d6c 100644 --- a/alot/widgets.py +++ b/alot/widgets.py @@ -341,8 +341,6 @@ class MessageWidget(urwid.WidgetWrap): self.attachmentw = urwid.Pile(lines) return self.attachmentw - attachments = message.get_attachments() - def _get_body_widget(self): """creates/returns the widget that displays the mail body""" if not self.bodyw: |