diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-15 12:20:20 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-15 12:20:20 +0100 |
commit | 46b0dc1852b004b7c535c3d343ad41d667960b44 (patch) | |
tree | e9d42a8f2b6cc9e3a45a83fae0a68d6c05745452 /alot/commands/thread.py | |
parent | d717cebf152f80415845b947af4fd968a34bb78f (diff) |
decorate thread:reply
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r-- | alot/commands/thread.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 3323e012..53b25c58 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -20,11 +20,12 @@ from alot.message import encode_header MODE = 'thread' -@registerCommand(MODE, 'reply', {}) -@registerCommand(MODE, 'groupreply', {'groupreply': True}) +@registerCommand(MODE, 'reply', arguments=[ + (['--all'], {'action':'store_true', 'help':'reply to all'})] +) class ReplyCommand(Command): """format reply for currently selected message and open envelope for it""" - def __init__(self, message=None, groupreply=False, **kwargs): + def __init__(self, message=None, all=False, **kwargs): """ :param message: the original message to reply to :type message: `alot.message.Message` @@ -32,7 +33,7 @@ class ReplyCommand(Command): :type groupreply: boolean """ self.message = message - self.groupreply = groupreply + self.groupreply = all Command.__init__(self, **kwargs) def apply(self, ui): @@ -228,7 +229,7 @@ class FoldMessagesCommand(Command): widget.fold(visible=False) -@registerCommand(MODE, 'toggleheaders', {}) +@registerCommand(MODE, 'toggleheaders') class ToggleHeaderCommand(Command): def apply(self, ui): msgw = ui.current_buffer.get_selection() @@ -395,7 +396,7 @@ class OpenAttachmentCommand(Command): ui.notify('unknown mime type') -@registerCommand(MODE, 'select', {}) +@registerCommand(MODE, 'select') class ThreadSelectCommand(Command): def apply(self, ui): focus = ui.get_deep_focus() |