From 1f72f815f36cf740f996e0647fdfa85d689f55a3 Mon Sep 17 00:00:00 2001 From: Johannes Kulick Date: Sat, 15 Dec 2012 15:07:44 +0100 Subject: if all encryption keys are removed set flag to false If all the encryption keys are deleted from the encryption list set the encrypt flag in the enveleope to false --- alot/commands/envelope.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'alot') diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index cc549953..45ede761 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -488,6 +488,8 @@ class EncryptCommand(Command): if e.code == gpgme.ERR_INV_VALUE: raise GPGProblem("Can not find key to remove.") raise GPGProblem(str(e)) + if not envelope.encrypt_keys: + envelope.encrypt = False ui.current_buffer.rebuild() return elif self.action == 'encrypt': -- cgit v1.2.3