[Kde-pim] Disabling signing after saving a draft

Alexis Papadopoulos iacp at free.fr
Tue Aug 21 15:05:11 BST 2007


Hello Till,

thank you very much for the feedback. Indeed, the choice of using the state 
headers wasn't wise, and since it was my first contact with the code, I 
didn't feel comfortable with adding new ones. Now it sure seems better that 
way.

However, there is a small issue with your fix. If "never encrypt to self" is 
unchecked, you will not set your *ActionEnabled headers since you can rely on 
the *State ones, from what I understand. This means that here :

// 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"); 

You should first check to see if these headerFields do exist (in this case 
they don't, since never encrypt to self is unchecked), therefore you disable 
signature and encryption.

I'm attaching a patch, although the fix is rather straightforward. Your 
commits were not apparently made on the 3.5 branch on which I'm working. 
Could you please also include them, so that they are part of the next stable 
release (this is why I deemed usefull to provide with the patch too) ?

Thanks in advance,
acp

P.S: Taking the liberty to CC you, hope you won't mind...

On Monday 20 August 2007, Till Adam wrote:
> On Saturday 21 July 2007 19:09, Alexis Papadopoulos wrote:
> > On Thursday 28 June 2007, Ingo Klöcker wrote:
> > > Thanks for the patch. I'll check it out asap, but first I have to do
> > > some packing for aKademy. :-)
> >
> > Hello there, I just wanted to know if this has been commited or not.
>
> Thanks a lot for your patch, Alexis. It did work as advertised, but I've
> committed a simpler fix, which I think is more correct and easier to
> maintain. The problem is that the state of the actinos should be restored
> either according to the state of the mail, or according to the saved state
> of the actions from editing, depending on whether the option to "never
> encrypt and sign drafts" is set or not. Mixing this action state keeping in
> with the actual state of the message object just makes things less clear,
> and requires changes all over the place as you noticed. As you can see in
> the bug report, I chose a much more straight forward path.
>
> Thanks again for your work on this, though, and please keep those patches
> coming, they are much appreciated. :)
>
> Cheers,
>
> Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 1573 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070821/522b6d9c/attachment.diff>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list