Avoid callbacks to track copied mail object
* src/cryptcontroller.cpp (CryptController::do_crypto): Extend comment. * src/mail.cpp (g_mail_copy_triggerer): Remove. (Mail::setAdditionalReference): Helper to track the copy IDispatch object together with the ItemLoad IDispatch object. (Mail::copy): Change to avoid g_mail_copy_triggerer logic. (Mail::splitAndSend_o): Use new copy. (Mail::searchMailsByUUID): New. Find mail objects by uuid.
This avoid the complexit with the g_mail_copy_triggerer callback
to go back into the Outlook event loop.
Instead we are now using the MAPI GpgOL UUID property to identify
the matching mail object after copy.
As releasing the IDispatch returned by the OOM copy call triggers
an Unload of the copied mail we need to track it as an additional
reference in the Mail object which was created with a different
IDispatch pointer in the ItemLoad event.
- GnuPG-Bug-Id: T4814