Diffusion GpgOL be57fa9d9f52

Override file close cmd to trigger shutdown

Authored by aheinecke on Nov 9 2018, 11:20 AM.

Description

Override file close cmd to trigger shutdown

* src/gpgoladdin.cpp (GpgolRibbonExtender::GetIDsOfNames)
(GpgolRibbonExtender::Invoke): Hookup override.
(GetCustomUI_MIME): Override File->Close command.
* src/ribbon-callbacks.cpp (override_file_close): New.
* src/ribbon-callbacks.h: Update accordingly.

There are two ways Outlook can be closed. Either through
a Windowmessage (which wie handled already) or through
the FileClose Command. We now also handle the FileClose
to shutdown.
Doing the shutdown later does not work for us because before
we get any events or shutdown notifications we already have
to close / discard our decrypted contents.

Details