Implement printing from the file menu
* src/application-events.cpp (BeforePrint): Note down that a before print was seen. (ItemLoad): If a BeforePrint was seen. Mark the mail. * src/mail.cpp (setIsPrint, isPrint, m_printing): New state. (Mail::decryptVerify_o): Do not do async decryption when printing. Check for childs of print mails. (Mail::updateCategories_o): Do not set categories for prints. (Mail::checkIfMailIsChildOfPrintMail_o): Check if the currently decrypting mail is actually a print.
The BeforePrint event allows us to catch when we are printing. In
that case we do blocking decryption (which we already had implemented
as a debug option \o/).
But we see multiple mailitems here. One is the mail as currently
visible in the Inspector. One is the Mail in the print preview,
which we mark as print. And the last one is the actual printout
that is loaded once the "Print" button is really pressed.
The third one makes the checkIfMailIsChildOfPrintMail_o code
- GnuPG-Bug-Id: T4560