diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-19 21:48:33 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-19 21:48:33 +0000 |
commit | 45fce4a54f4448864525462bc66f5d327c0d8def (patch) | |
tree | cf507bba22a6dc1ead796e299de8c15d3459de97 | |
parent | 790ebe9d71f87b9295a99de28ae892d22caabe42 (diff) |
dont pass config parm to hooks
-rw-r--r-- | alot/commands/envelope.py | 8 | ||||
-rw-r--r-- | alot/commands/thread.py | 8 | ||||
-rw-r--r-- | alot/ui.py | 8 |
3 files changed, 7 insertions, 17 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index 8b95783b..cc67a5a1 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -198,7 +198,7 @@ class EditCommand(Command): if '*' in blacklist: blacklist = set(self.envelope.headers.keys()) self.edit_headers = edit_headers - blacklist - logging.info('editable headers: %s' % blacklist) + logging.info('editable headers: %s' % self.edit_headers) def openEnvelopeFromTmpfile(): # This parses the input from the tempfile. @@ -216,8 +216,7 @@ class EditCommand(Command): # call post-edit translate hook translate = settings.get_hook('post_edit_translate') if translate: - template = translate(template, ui=ui, dbm=ui.dbman, - config=settings) + template = translate(template, ui=ui, dbm=ui.dbman) self.envelope.parse_template(template) if self.openNew: ui.buffer_open(buffers.EnvelopeBuffer(ui, self.envelope)) @@ -244,8 +243,7 @@ class EditCommand(Command): # call pre-edit translate hook translate = settings.get_hook('pre_edit_translate') if translate: - bodytext = translate(bodytext, ui=ui, dbm=ui.dbman, - config=settings) + bodytext = translate(bodytext, ui=ui, dbm=ui.dbman) #write stuff to tempfile tf = tempfile.NamedTemporaryFile(delete=False) diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 7ffb9b98..c3a5da8d 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -96,9 +96,7 @@ class ReplyCommand(Command): timestamp = self.message.get_date() qf = settings.get_hook('reply_prefix') if qf: - quotestring = qf(name, address, timestamp, - ui=ui, dbm=ui.dbman, - config=settings) + quotestring = qf(name, address, timestamp, ui=ui, dbm=ui.dbman) else: quotestring = 'Quoting %s (%s)\n' % (name, timestamp) mailcontent = quotestring @@ -197,9 +195,7 @@ class ForwardCommand(Command): timestamp = self.message.get_date() qf = settings.get_hook('forward_prefix') if qf: - quote = qf(name, address, timestamp, - ui=ui, dbm=ui.dbman, - config=settings) + quote = qf(name, address, timestamp, ui=ui, dbm=ui.dbman) else: quote = 'Forwarded message from %s (%s):\n' % (name, timestamp) mailcontent = quote @@ -436,9 +436,7 @@ class UI(object): if cmd.prehook: logging.debug('calling pre-hook') try: - cmd.prehook(ui=self, dbm=self.dbman, - config=settings) - + cmd.prehook(ui=self, dbm=self.dbman) except: logging.exception('prehook failed') @@ -447,9 +445,7 @@ class UI(object): if cmd.posthook: logging.debug('calling post-hook') try: - cmd.posthook(ui=self, dbm=self.dbman, - config=settings) - #TODO: ducument hooks wrt settingsmanager + cmd.posthook(ui=self, dbm=self.dbman) except: logging.exception('posthook failed') |