Home GnuPG
Diffusion GpgOL 0d2db8b81ab2

Enable File -> SaveAs also for mails in window

Description

Enable File -> SaveAs also for mails in window

* src/gpgoladdin.cpp (GpgolRibbonExtender::GetIDsOfNames)
(GpgolRibbonExtender::Invoke)
(GetCustomUI_MIME): Add new command and wire it up.
* src/mail.cpp (Mail::checkAttachments_o): Add safeguard
not to warn about our own mime structure.
(Mail::close): Ignore hidden attachments in check.
* src/ribbon-callbacks.cpp (override_file_save_as):
Add check for inspector context and handle it differently.
(override_file_save_as_in_window): New.
* src/ribbon-callbacks.h: Update accordingly.

While the explorer loads a new mail object on File->saveAs
this does not happen in the inspector. So in the inspector
we have to close it to allow the write on the current object.
This is currently ugly because it will close the window and
hide the content.

Fixing the check for attachments in Mail::close is also
a real fix as otherwise our own mime strucutre attachment
would be detected.

The trick here is not to close the mail before the
save as event actually passes the event loop but right after
that.

Details

Provenance
aheineckeAuthored on Dec 13 2019, 4:01 PM
Parents
rOa2cd96b85164: Post release version bump
Branches
Unknown
Tags
Unknown