Make sure to store the state of the crypto actions when saving a mail to

drafts, but only if the state of the mail itself should not be used as
indication of the state of the actions. This is governd by the option
to "never sign and encrypt when saving to drafts" in the security 
settings.

Prokde35-z item 44.
BUG: 103240


svn path=/branches/kdepim/enterprise/kdepim/; revision=702320
wilder-work
Till Adam 19 years ago
parent 79a826e0e7
commit d5c6931510
  1. 15
      kmcomposewin.cpp

@ -1835,6 +1835,10 @@ void KMComposeWin::setMsg(KMMessage* newMsg, bool mayAutoSign,
break;
}
// if these headers are present, the state of the message should be overruled
mLastSignActionState = (mMsg->headerField( "X-KMail-SignatureActionEnabled" ) == "true");
mLastEncryptActionState = (mMsg->headerField( "X-KMail-EncryptActionEnabled" ) == "true");
mLastIdentityHasSigningKey = !ident.pgpSigningKey().isEmpty() || !ident.smimeSigningKey().isEmpty();
mLastIdentityHasEncryptionKey = !ident.pgpEncryptionKey().isEmpty() || !ident.smimeEncryptionKey().isEmpty();
@ -4010,6 +4014,17 @@ void KMComposeWin::doSend( KMail::MessageSender::SendMethod method,
}
}
if (neverEncrypt && saveIn != KMComposeWin::None ) {
// we can't use the state of the mail itself, to remember the
// signing and encryption state, so let's add a header instead
mMsg->setHeaderField( "X-KMail-SignatureActionEnabled", mSignAction->isChecked()? "true":"false" );
mMsg->setHeaderField( "X-KMail-EncryptActionEnabled", mEncryptAction->isChecked()? "true":"false" );
} else {
mMsg->removeHeaderField( "X-KMail-SignatureActionEnabled" );
mMsg->removeHeaderField( "X-KMail-EncryptActionEnabled" );
}
kdDebug(5006) << "KMComposeWin::doSend() - calling applyChanges()"
<< endl;
applyChanges( neverEncrypt );

Loading…
Cancel
Save