summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-02-19 21:48:33 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-02-19 21:48:33 +0000
commit45fce4a54f4448864525462bc66f5d327c0d8def (patch)
treecf507bba22a6dc1ead796e299de8c15d3459de97 /alot
parent790ebe9d71f87b9295a99de28ae892d22caabe42 (diff)
dont pass config parm to hooks
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/envelope.py8
-rw-r--r--alot/commands/thread.py8
-rw-r--r--alot/ui.py8
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
diff --git a/alot/ui.py b/alot/ui.py
index 032f627b..e4092e63 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -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')