summaryrefslogtreecommitdiff
path: root/alot/db/envelope.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-05-12 21:01:56 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2012-05-12 21:01:56 +0100
commite47ee126ab7572387e7133e4bf34ba0d513878b6 (patch)
tree8e7b63d8e146ae9740fea8f0d90899c41178a415 /alot/db/envelope.py
parentf4ade9b28e2223853967558c00ab8ca164ea6253 (diff)
lookup gpg key once during compose
.. and not in reply/forward/editnew. This also obsoletes Envelope.apply_account_crypto_settings, which needed a reference to UI for error notifications.
Diffstat (limited to 'alot/db/envelope.py')
-rw-r--r--alot/db/envelope.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/alot/db/envelope.py b/alot/db/envelope.py
index f75e9dd1..9d8e2599 100644
--- a/alot/db/envelope.py
+++ b/alot/db/envelope.py
@@ -137,25 +137,6 @@ class Envelope(object):
if self.sent_time:
self.modified_since_sent = True
- def apply_account_crypto_settings(self, account, ui):
- """
- initializes sign and sign_key from the account settings.
- """
- if account is None:
- return
-
- self.sign = account.sign_by_default
-
- if account.gpg_key is None:
- return
-
- try:
- key = crypto.CryptoContext().get_key(str(account.gpg_key))
- except GPGProblem, e:
- ui.notify(e.message, priority='error')
- return
- self.sign_key = key
-
def construct_mail(self):
"""
compiles the information contained in this envelope into a