[git] GpgOL - branch, master, updated. outlook-2007-removal-6-g168792c

by Andre Heinecke cvs at cvs.gnupg.org
Thu May 17 09:54:16 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".

The branch, master has been updated
       via  168792c8a34d9773497ff9edb820eedb12eed6a8 (commit)
       via  ca7dfc3a807b30525c9e3ba468b26f621f1edab8 (commit)
       via  af65c5d0f46db05a948bc4ff6d3478354b7dd9f9 (commit)
       via  7f07af8575c35583c5dea06696d9cdd6261e2971 (commit)
       via  7fb4479dca4b066cad2479b49decf70b388eadb6 (commit)
      from  a11688d6c8881a0e540edb1049bc9006daa37514 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 168792c8a34d9773497ff9edb820eedb12eed6a8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 09:53:28 2018 +0200

    Remove GpgOLStr class
    
    --
    This was more of a failed experiment and is mostly uneccesary.

diff --git a/src/Makefile.am b/src/Makefile.am
index 2305df2..a529f8b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,6 @@ gpgol_SOURCES = \
     gpgoladdin.cpp gpgoladdin.h \
     gpgol.def \
     gpgol-ids.h \
-    gpgolstr.h gpgolstr.cpp \
     keycache.cpp keycache.h \
     mail.h mail.cpp \
     mailitem-events.cpp \
diff --git a/src/gpgolstr.cpp b/src/gpgolstr.cpp
deleted file mode 100644
index ff00259..0000000
--- a/src/gpgolstr.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* gpgolstr.cpp - String helper class for Outlook API.
- * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik
- * Software engineering by Intevation GmbH
- *
- * This file is part of GpgOL.
- *
- * GpgOL is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * GpgOL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-#include "gpgolstr.h"
-#include "common.h"
-
-GpgOLStr::GpgOLStr(const char *str) :
-  m_utf8str(NULL), m_widestr(NULL)
-{
-  if (!str)
-    return;
-  m_utf8str = strdup (str);
-}
-
-GpgOLStr::GpgOLStr(const wchar_t *str) :
-  m_utf8str(NULL), m_widestr(NULL)
-{
-  if (!str)
-    return;
-  m_widestr = wcsdup (str);
-}
-
-GpgOLStr::~GpgOLStr()
-{
-  xfree (m_utf8str);
-  xfree (m_widestr);
-}
-
-GpgOLStr::operator char*()
-{
-  if (!m_utf8str && m_widestr)
-    {
-      m_utf8str = wchar_to_utf8_2 (m_widestr, wcslen (m_widestr));
-    }
-  return m_utf8str;
-}
-
-GpgOLStr::operator wchar_t*()
-{
-  if (!m_widestr && m_utf8str)
-    {
-      m_widestr = utf8_to_wchar2 (m_utf8str, strlen (m_utf8str));
-    }
-  return m_widestr;
-}
diff --git a/src/gpgolstr.h b/src/gpgolstr.h
deleted file mode 100644
index 197e435..0000000
--- a/src/gpgolstr.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* gpgolstr.h - String helper class for Outlook API.
- * Copyright (C) 2015 by Bundesamt für Sicherheit in der Informationstechnik
- * Software engineering by Intevation GmbH
- *
- * This file is part of GpgOL.
- *
- * GpgOL is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * GpgOL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stddef.h>
-
-/* Small string wrapper that handles wchar / utf8 conversion and
-   can be used as a temporary object for an allocated string.
-   Modifying the char or wchar_t pointer directly results in
-   undefined behavior.
-   They are intended to be used for API calls that expect a
-   mutable string but are actually a constant.
-   */
-class GpgOLStr
-{
-public:
-  GpgOLStr() : m_utf8str(NULL), m_widestr(NULL) {}
-
-  GpgOLStr(const char *str);
-  GpgOLStr(const wchar_t *widestr);
-  ~GpgOLStr();
-
-  operator char* ();
-  operator wchar_t* ();
-
-private:
-  char *m_utf8str;
-  wchar_t *m_widestr;
-};
diff --git a/src/mail.cpp b/src/mail.cpp
index 76f1793..ca03066 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -33,7 +33,6 @@
 #include "mymapitags.h"
 #include "parsecontroller.h"
 #include "cryptcontroller.h"
-#include "gpgolstr.h"
 #include "windowmessages.h"
 #include "mlang-charset.h"
 #include "wks-helper.h"
diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 2cb451d..1dcef01 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -30,7 +30,6 @@
 #include "rfc822parse.h"
 #include "mapihelp.h"
 #include "parsetlv.h"
-#include "gpgolstr.h"
 #include "oomhelp.h"
 
 #include <string>
@@ -113,7 +112,7 @@ create_gpgol_tag (LPMESSAGE message, const wchar_t *name, const char *func)
   HRESULT hr;
   LPSPropTagArray proparr = NULL;
   MAPINAMEID mnid, *pmnid;
-  GpgOLStr propname(name);
+  wchar_t *propname = wcsdup (name);
   /* {31805ab8-3e92-11dc-879c-00061b031004}: GpgOL custom properties.  */
   GUID guid = {0x31805ab8, 0x3e92, 0x11dc, {0x87, 0x9c, 0x00, 0x06,
                                             0x1b, 0x03, 0x10, 0x04}};
@@ -125,6 +124,7 @@ create_gpgol_tag (LPMESSAGE message, const wchar_t *name, const char *func)
   mnid.Kind.lpwstrName = propname;
   pmnid = &mnid;
   hr = message->GetIDsFromNames (1, &pmnid, MAPI_CREATE, &proparr);
+  xfree (propname);
   if (FAILED (hr))
     proparr = NULL;
   if (FAILED (hr) || !(proparr->aulPropTag[0] & 0xFFFF0000) ) 
@@ -253,7 +253,7 @@ get_internetcharsetbody_tag (LPMESSAGE message, ULONG *r_tag)
   /* {4E3A7680-B77A-11D0-9DA5-00C04FD65685} */
   GUID guid = {0x4E3A7680, 0xB77A, 0x11D0, {0x9D, 0xA5, 0x00, 0xC0,
                                             0x4F, 0xD6, 0x56, 0x85}};
-  GpgOLStr propname (L"Internet Charset Body");
+  wchar_t propname[] = L"Internet Charset Body";
   int result;
 
   memset (&mnid, 0, sizeof mnid);
@@ -3572,7 +3572,7 @@ mapi_body_to_attachment (LPMESSAGE message)
   SPropValue prop;
   LPSTREAM outstream = NULL;
   LPUNKNOWN punk;
-  GpgOLStr body_filename (PGPBODYFILENAME);
+  char body_filename[] = PGPBODYFILENAME;
 
   instream = mapi_get_body_as_stream (message);
   if (!instream)
diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp
index 7ac4796..d0da7a9 100644
--- a/src/mimemaker.cpp
+++ b/src/mimemaker.cpp
@@ -42,7 +42,6 @@
 #include "mapihelp.h"
 #include "mimemaker.h"
 #include "oomhelp.h"
-#include "gpgolstr.h"
 #include "mail.h"
 
 static const unsigned char oid_mimetag[] =
@@ -2180,6 +2179,7 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd,
   engine_filter_t filter = NULL;
   unsigned int session_number;
   char *my_sender = NULL;
+  char gpgstr[] = "GPG";
 
   memset (sink, 0, sizeof *sink);
   memset (encsink, 0, sizeof *encsink);
@@ -2219,12 +2219,11 @@ mime_sign_encrypt (LPMESSAGE message, HWND hwnd,
       }
   }
 
-
   /* Create a temporary sink to construct the signed data.  */
   hr = OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffer,
                          (SOF_UNIQUEFILENAME | STGM_DELETEONRELEASE
                           | STGM_CREATE | STGM_READWRITE),
-                         NULL, GpgOLStr("GPG"), &tmpstream);
+                         NULL, gpgstr, &tmpstream);
   if (FAILED (hr))
     {
       log_error ("%s:%s: can't create temp file: hr=%#lx\n",

commit ca7dfc3a807b30525c9e3ba468b26f621f1edab8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 09:23:16 2018 +0200

    Remove no MIME UI
    
    --
    This should reduce the amount of strings to translate and
    also reduce the code lying around.

diff --git a/configure.ac b/configure.ac
index 2d1fab6..c94f968 100644
--- a/configure.ac
+++ b/configure.ac
@@ -246,18 +246,6 @@ fi
 AC_SUBST(W32LIBS)
 
 #
-# This should be a temporary option that will eventually become the
-# default.
-#
-AC_ARG_ENABLE(mime-send,
-            AC_HELP_STRING([--enable-mime-send], [Enable experimental send support for mime messages]),
-            mime_send=$enableval, mime_send=no)
-if test "$mime_send" != "no"; then
-  AC_DEFINE(MIME_SEND, 1,
-   [Sending Mime messages will be supported.])
-fi
-
-#
 # Print errors here so that they are visible all
 # together and the user can acquire them all together.
 #
diff --git a/src/addin-options.cpp b/src/addin-options.cpp
index 6677a30..8384efc 100644
--- a/src/addin-options.cpp
+++ b/src/addin-options.cpp
@@ -41,9 +41,6 @@ set_labels (HWND dlg)
   static struct { int itemid; const char *label; } labels[] = {
     { IDC_G_GENERAL,        N_("General")},
     { IDC_ENABLE_SMIME,     N_("Enable the S/MIME support")},
-#ifndef MIME_SEND
-    { IDC_MIME_UI,          N_("Enable simplified interface (experimental)")},
-#endif
 
     { IDC_G_SEND,           N_("Message sending")},
     { IDC_ENCRYPT_DEFAULT,  N_("&Encrypt new messages by default")},
@@ -66,22 +63,6 @@ set_labels (HWND dlg)
     SetDlgItemText (dlg, labels[i].itemid, _(labels[i].label));
 }
 
-
-/** Enable or disable options that are only relvant for mime ui */
-static void
-enable_disable_opts (HWND hDlg)
-{
-  BOOL enable = opt.mime_ui ? TRUE : FALSE;
-  EnableWindow (GetDlgItem (hDlg, IDC_ENCRYPT_DEFAULT), enable);
-  EnableWindow (GetDlgItem (hDlg, IDC_SIGN_DEFAULT), enable);
-  char *uiserver = get_uiserver_name ();
-  if (!uiserver && !opt.enable_smime)
-    {
-      EnableWindow (GetDlgItem (hDlg, IDC_AUTORRESOLVE), FALSE);
-    }
-  xfree (uiserver);
-}
-
 static void
 launch_kleo_config (HWND hDlg)
 {
@@ -153,17 +134,12 @@ options_window_proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                               !!opt.encrypt_default, 0L);
           SendDlgItemMessage (hDlg, IDC_SIGN_DEFAULT, BM_SETCHECK,
                               !!opt.sign_default, 0L);
-#ifndef MIME_SEND
-          SendDlgItemMessage (hDlg, IDC_MIME_UI, BM_SETCHECK,
-                              !!opt.mime_ui, 0L);
-#endif
           SendDlgItemMessage (hDlg, IDC_INLINE_PGP, BM_SETCHECK,
                               !!opt.inline_pgp, 0L);
           SendDlgItemMessage (hDlg, IDC_REPLYCRYPT, BM_SETCHECK,
                               !!opt.reply_crypt, 0L);
           SendDlgItemMessage (hDlg, IDC_AUTORRESOLVE, BM_SETCHECK,
                               !!opt.autoresolve, 0L);
-          enable_disable_opts (hDlg);
           set_labels (hDlg);
           ShowWindow (GetDlgItem (hDlg, IDC_GPG_OPTIONS),
                       opt.enable_debug ? SW_SHOW : SW_HIDE);
@@ -185,18 +161,6 @@ options_window_proc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
                   (hDlg, IDC_ENCRYPT_DEFAULT, BM_GETCHECK, 0, 0L);
                 opt.sign_default = !!SendDlgItemMessage
                   (hDlg, IDC_SIGN_DEFAULT, BM_GETCHECK, 0, 0L);
-#ifndef MIME_SEND
-                int mime_ui_old = opt.mime_ui;
-                opt.mime_ui = !!SendDlgItemMessage
-                  (hDlg, IDC_MIME_UI, BM_GETCHECK, 0, 0L);
-                if (opt.mime_ui != mime_ui_old)
-                  {
-                    MessageBox (NULL,
-                                _("Changing the interface requires a restart of Outlook."),
-                                _("GpgOL"),
-                                MB_ICONINFORMATION|MB_OK);
-                  }
-#endif
                 opt.inline_pgp = !!SendDlgItemMessage
                   (hDlg, IDC_INLINE_PGP, BM_GETCHECK, 0, 0L);
 
diff --git a/src/common.h b/src/common.h
index bd55a13..177bf6a 100644
--- a/src/common.h
+++ b/src/common.h
@@ -33,12 +33,6 @@
 
 #include <windows.h>
 
-#ifdef MIME_SEND
-# define MIME_UI_DEFAULT 1
-#else
-# define MIME_UI_DEFAULT 0
-#endif
-
 /* Registry path to store plugin settings */
 #define GPGOL_REGPATH "Software\\GNU\\GpgOL"
 
diff --git a/src/common_indep.h b/src/common_indep.h
index adfc8bf..7332dbd 100644
--- a/src/common_indep.h
+++ b/src/common_indep.h
@@ -196,7 +196,6 @@ struct
   int preview_decrypt;       /* Decrypt in preview window. */
   int prefer_html;           /* Prefer html in html/text alternatives. */
   int body_as_attachment;    /* Present encrypted message as attachment.  */
-  int mime_ui;               /* Only for Addin. Use the PGP/MIME ui */
   int inline_pgp;            /* Only for Addin. Use Inline PGP by default. */
   int autoresolve;           /* Autresolve keys with --locate-keys. */
   int reply_crypt;           /* Only for Addin. Encrypt / Sign based on cryptostatus. */
diff --git a/src/dialogs.h b/src/dialogs.h
index be662ca..217b0d0 100644
--- a/src/dialogs.h
+++ b/src/dialogs.h
@@ -7,27 +7,6 @@
 #define DIALOGS_H
 
 
-/* Ids used for bitmaps. There is some magic in the identifiers: In
-   the code we only use the first ID value and add 1 to find the mask.
-   */
-#define IDB_ENCRYPT_16                  0x1000
-#define IDB_ENCRYPT_16M                 0x1001
-
-#define IDB_SIGN_16                     0x1010
-#define IDB_SIGN_16M                    0x1011
-
-#define IDB_KEY_MANAGER_16              0x1020
-#define IDB_KEY_MANAGER_16M             0x1021
-
-#define IDB_DECRYPT_16                  0x1030
-#define IDB_DECRYPT_16M                 0x1031
-
-#define IDB_VERIFY_16                   0x1040
-#define IDB_VERIFY_16M                  0x1041
-
-#define IDB_DECRYPT_VERIFY_16           0x1050
-#define IDB_DECRYPT_VERIFY_16M          0x1051
-
 #define IDB_LOGO                        0x1060
 
 
@@ -37,47 +16,6 @@
 #define IDC_DEBUG_LOGFILE               0x4130
 
 
-/* Ids for the recipient selection dialog.  */
-#define IDD_ENC                         0x4210
-#define IDC_ENC_RSET1                   0x4220
-#define IDC_ENC_RSET2_T                 0x4230
-#define IDC_ENC_RSET2                   0x4240
-#define IDC_ENC_NOTFOUND_T              0x4250
-#define IDC_ENC_NOTFOUND                0x4260
-
-
-/* Ids for the two decryption dialogs.  */
-#define IDD_DEC                         0x4310
-#define IDD_DECEXT                      0x4320
-#define IDC_DEC_KEYLIST                 0x4330
-#define IDC_DEC_HINT                    0x4340
-#define IDC_DEC_PASSINF                 0x4350
-#define IDC_DEC_PASS                    0x4360
-#define IDC_DEC_HIDE                    0x4370
-#define IDC_DECEXT_RSET_T               0x4380
-#define IDC_DECEXT_RSET                 0x4390
-#define IDC_DECEXT_KEYLIST              0x43A0
-#define IDC_DECEXT_HINT                 0x43B0
-#define IDC_DECEXT_PASSINF              0x43C0
-#define IDC_DECEXT_PASS                 0x43D0
-#define IDC_DECEXT_HIDE                 0x43E0
-
-
-/* Ids for the verification dialog.  */
-#define IDD_VRY                         0x4410
-#define IDC_VRY_TIME_T                  0x4420
-#define IDC_VRY_TIME                    0x4430
-#define IDC_VRY_PKALGO_T                0x4440
-#define IDC_VRY_PKALGO                  0x4450
-#define IDC_VRY_KEYID_T                 0x4460
-#define IDC_VRY_KEYID                   0x4470
-#define IDC_VRY_STATUS                  0x4480
-#define IDC_VRY_ISSUER_T                0x4490
-#define IDC_VRY_ISSUER                  0x44A0
-#define IDC_VRY_AKALIST_T               0x44B0
-#define IDC_VRY_AKALIST                 0x44C0
-#define IDC_VRY_HINT                    0x44D0
-
 /* Ids used for the main config dialog.  */
 #define IDD_GPG_OPTIONS                 0x5000
 #define IDD_ADDIN_OPTIONS               0x5001
diff --git a/src/dialogs.rc b/src/dialogs.rc
index 4ee8f3b..5687041 100644
--- a/src/dialogs.rc
+++ b/src/dialogs.rc
@@ -138,185 +138,17 @@ BEGIN
 END
 
 
-/*
-   The dialog to select recipient keys
- */
-IDD_ENC DIALOG DISCARDABLE  0, 0, 332, 215
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "GpgOL - Select Recipients"
-FONT 8, "MS Sans Serif"
-BEGIN
-    CONTROL         "List1", IDC_ENC_RSET1,
-                    "SysListView32", LVS_REPORT | LVS_NOSORTHEADER |
-                                     WS_BORDER  | WS_TABSTOP,
-                    8, 4, 314, 92
-
-    LTEXT           "Ausgewählte Empfänger:", IDC_ENC_RSET2_T,
-                    8, 98, 130, 8
-
-    CONTROL         "List2", IDC_ENC_RSET2,
-                    "SysListView32",  LVS_REPORT | LVS_NOSORTHEADER |
-                                      WS_BORDER  | WS_TABSTOP,
-                    8, 110, 313, 49
-
-    LTEXT           "Recipient which were NOT found", IDC_ENC_NOTFOUND_T,
-                    8, 161, 128, 8
-
-    LISTBOX         IDC_ENC_NOTFOUND,
-                    8, 170, 313, 22,  LBS_SORT   | LBS_NOINTEGRALHEIGHT |
-                                      WS_VSCROLL | WS_TABSTOP
-
-    DEFPUSHBUTTON   "&OK", IDOK,
-                     221, 196, 50, 14
-
-    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
-                     273, 196, 50, 14
-END
-
-
-/* 
-   The decryption dialog used to select the secret key.
-*/
-IDD_DEC DIALOG DISCARDABLE  0, 0, 225, 101
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Secret Key Selection"
-FONT 8, "MS Sans Serif"
-BEGIN
-    COMBOBOX        IDC_DEC_KEYLIST, 
-                    9, 7, 209, 58,  CBS_DROPDOWNLIST | WS_VSCROLL | 
-                                    WS_TABSTOP
-
-    LTEXT           "", IDC_DEC_HINT,
-                    9, 25, 201, 10
-
-    LTEXT           "enter-passphrase", IDC_DEC_PASSINF,
-                    9, 37, 158, 8
-
-    EDITTEXT        IDC_DEC_PASS,
-                    9, 51, 207, 12,  ES_PASSWORD | ES_AUTOHSCROLL
-
-    CONTROL         "&Hide Typing", IDC_DEC_HIDE,
-                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
-                    138, 64, 81, 10
-
-    DEFPUSHBUTTON   "&OK", IDOK,
-                    115, 83, 50, 14
-
-    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
-                    167, 83, 50, 14
-END
-
-
-/* 
-   The extended decryption dialog used to select the secret key.
-*/
-IDD_DECEXT DIALOG DISCARDABLE  0, 0, 207, 134
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "GpgOL - Secret Key Selection"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "encrypted-to",IDC_DECEXT_RSET_T,
-                    7, 4, 128, 8
-
-    LISTBOX         IDC_DECEXT_RSET,
-                    7, 16, 193, 25,  LBS_NOINTEGRALHEIGHT | 
-                                     WS_VSCROLL | WS_TABSTOP
-
-    COMBOBOX        IDC_DECEXT_KEYLIST,
-                    8, 54, 191, 14,  CBS_DROPDOWN | CBS_SORT | 
-                                     WS_DISABLED | WS_VSCROLL | WS_TABSTOP
-
-    LTEXT           "", IDC_DECEXT_HINT,
-                    7, 73, 193, 8
-
-    LTEXT           "enter-passphrase", IDC_DECEXT_PASSINF,
-                    7, 85, 158, 8
-
-    EDITTEXT        IDC_DECEXT_PASS,
-                    7, 96, 192, 12,  ES_PASSWORD | ES_AUTOHSCROLL
-
-    CONTROL         "hide-typing", IDC_DECEXT_HIDE,
-                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
-                    122, 108, 81, 10
-
-    DEFPUSHBUTTON   "OK", IDOK,
-                    98, 125, 50, 14
-
-    PUSHBUTTON      "&Cancel-btn", IDCANCEL,
-                    149, 125, 50, 14
-END
-
-
-/* 
-   The dialog to display verification results.  
-*/
-IDD_VRY DIALOG DISCARDABLE  0, 0, 253, 116
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
-CAPTION "GpgOL - Signature Verification Result"
-FONT 8, "MS Sans Serif"
-BEGIN
-    LTEXT           "made-at", IDC_VRY_TIME_T,
-                    3, 6, 50, 8
-
-    EDITTEXT        IDC_VRY_TIME,
-                    55, 4, 76, 12,  ES_AUTOHSCROLL | ES_READONLY
-
-    LTEXT           "using", IDC_VRY_PKALGO_T,
-                    132, 6, 18, 8
-
-    EDITTEXT        IDC_VRY_PKALGO,
-                    152, 4, 20, 12,  ES_AUTOHSCROLL | ES_READONLY
-
-    LTEXT           "key-id", IDC_VRY_KEYID_T,
-                    174, 7, 50, 8
-
-    EDITTEXT        IDC_VRY_KEYID,
-                    196, 4, 51, 12,  ES_AUTOHSCROLL | ES_READONLY
-
-    EDITTEXT        IDC_VRY_STATUS,
-                    3, 29, 92, 12,   ES_AUTOHSCROLL | ES_READONLY
-
-    LTEXT           "from", IDC_VRY_ISSUER_T,
-                    98, 31, 14, 8
-
-    EDITTEXT        IDC_VRY_ISSUER,
-                    117, 29, 131, 13,  ES_AUTOHSCROLL | ES_READONLY
-
-    LTEXT           "aka", IDC_VRY_AKALIST_T,
-                    3, 47, 56, 8
-
-    LISTBOX         IDC_VRY_AKALIST,
-                    3, 56, 245, 25,  LBS_SORT | LBS_NOINTEGRALHEIGHT |
-                                     WS_VSCROLL | WS_TABSTOP
-
-    LTEXT           "", IDC_VRY_HINT,
-                    3, 83, 245, 10
-
-    DEFPUSHBUTTON   "&OK", IDOK,
-                    198, 96, 50, 14
-END
-
 IDD_ADDIN_OPTIONS DIALOGEX DISCARDABLE  300, 300, 286, 190
 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT | DS_SETFONT
 CAPTION "GpgOL"
 FONT 8, "MS Shell Dlg"
 BEGIN
     /* General options box.  */
-#ifdef MIME_SEND
     GROUPBOX        "general-options", IDC_G_GENERAL,
                     9, 9, 270, 25
-#else
-    GROUPBOX        "general-options", IDC_G_GENERAL,
-                    9, 9, 270, 35
-#endif
     CONTROL         "enable-smime", IDC_ENABLE_SMIME,
                     "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
                     24, 19, 235, 10
-#ifndef MIME_SEND
-    CONTROL         "enable-mime-ui", IDC_MIME_UI,
-                    "Button", BS_AUTOCHECKBOX | WS_TABSTOP,
-                    24, 29, 235, 10
-#endif
 
     /* Send options box.  */
     GROUPBOX        "send-options", IDC_G_SEND,
diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index c163647..0cadbc8 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -63,10 +63,6 @@ ULONG addinLocks = 0;
 
 bool can_unload = false;
 
-/* Invalidating the interface does not take a nice effect so we store
-   this option in a global variable. */
-bool use_mime_ui = false;
-
 static std::list<LPDISPATCH> g_ribbon_uis;
 
 static GpgolAddin * addin_instance = NULL;
@@ -179,7 +175,6 @@ GpgolAddin::GpgolAddin (void) : m_lRef(0),
   m_hook(nullptr)
 {
   read_options ();
-  use_mime_ui = opt.mime_ui;
   /* RibbonExtender is it's own object to avoid the pitfalls of
      multiple inheritance
   */
@@ -677,10 +672,6 @@ GpgolRibbonExtender::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
          and we give it one of our own dispIds's that are later handled in
          the invoke part */
       ID_MAPPER (L"attachmentDecryptCallback", ID_CMD_DECRYPT)
-      ID_MAPPER (L"encryptSelection", ID_CMD_ENCRYPT_SELECTION)
-      ID_MAPPER (L"decryptSelection", ID_CMD_DECRYPT_SELECTION)
-      ID_MAPPER (L"startCertManager", ID_CMD_CERT_MANAGER)
-      ID_MAPPER (L"btnCertManager", ID_BTN_CERTMANAGER)
       ID_MAPPER (L"btnDecrypt", ID_BTN_DECRYPT)
       ID_MAPPER (L"btnDecryptLarge", ID_BTN_DECRYPT_LARGE)
       ID_MAPPER (L"btnEncrypt", ID_BTN_ENCRYPT)
@@ -692,12 +683,6 @@ GpgolRibbonExtender::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
       ID_MAPPER (L"btnSignLarge", ID_BTN_SIGN_LARGE)
       ID_MAPPER (L"btnVerifyLarge", ID_BTN_VERIFY_LARGE)
       ID_MAPPER (L"btnSigstateLarge", ID_BTN_SIGSTATE_LARGE)
-      ID_MAPPER (L"encryptBody", ID_CMD_ENCRYPT_BODY)
-      ID_MAPPER (L"decryptBody", ID_CMD_DECRYPT_BODY)
-      ID_MAPPER (L"addEncSignedAttachment", ID_CMD_ATT_ENCSIGN_FILE)
-      ID_MAPPER (L"addEncAttachment", ID_CMD_ATT_ENC_FILE)
-      ID_MAPPER (L"signBody", ID_CMD_SIGN_BODY)
-      ID_MAPPER (L"verifyBody", ID_CMD_VERIFY_BODY)
 
       /* MIME support: */
       ID_MAPPER (L"encryptMime", ID_CMD_MIME_ENCRYPT)
@@ -753,24 +738,6 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
         /* We can assume that this points to an implementation of
            IRibbonControl as we know the callback dispid. */
         return decryptAttachments (parms->rgvarg[0].pdispVal);
-      case ID_CMD_ENCRYPT_SELECTION:
-        return encryptSelection (parms->rgvarg[0].pdispVal);
-      case ID_CMD_DECRYPT_SELECTION:
-        return decryptSelection (parms->rgvarg[0].pdispVal);
-      case ID_CMD_CERT_MANAGER:
-        return startCertManager (parms->rgvarg[0].pdispVal);
-      case ID_CMD_ENCRYPT_BODY:
-        return encryptBody (parms->rgvarg[0].pdispVal);
-      case ID_CMD_DECRYPT_BODY:
-        return decryptBody (parms->rgvarg[0].pdispVal);
-      case ID_CMD_ATT_ENCSIGN_FILE:
-        return addEncSignedAttachment (parms->rgvarg[0].pdispVal);
-      case ID_CMD_ATT_ENC_FILE:
-        return addEncAttachment (parms->rgvarg[0].pdispVal);
-      case ID_CMD_SIGN_BODY:
-        return signBody (parms->rgvarg[0].pdispVal);
-      case ID_CMD_VERIFY_BODY:
-        return verifyBody (parms->rgvarg[0].pdispVal);
       case ID_CMD_SIGN_ENCRYPT_MIME:
         return mark_mime_action (parms->rgvarg[1].pdispVal,
                                  OP_SIGN|OP_ENCRYPT, false);
@@ -832,7 +799,6 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
         return print_decrypted (parms->rgvarg[0].pdispVal);
       case ID_GET_IS_CRYPTO_MAIL:
         return get_is_crypto_mail (parms->rgvarg[0].pdispVal, result);
-      case ID_BTN_CERTMANAGER:
       case ID_BTN_ENCRYPT:
       case ID_BTN_DECRYPT:
       case ID_BTN_DECRYPT_LARGE:
@@ -1122,336 +1088,10 @@ GetCustomUI_MIME (BSTR RibbonID, BSTR * RibbonXml)
   return S_OK;
 }
 
-/* This is the old pre-mime adding UI code. It will be removed once we have a
-   stable version that can also send mime messages.
-*/
-static STDMETHODIMP
-GetCustomUI_old (BSTR RibbonID, BSTR * RibbonXml)
-{
-  char *buffer = NULL;
-  const char *certManagerTTip =
-    _("Start the Certificate Management Software");
-  const char *certManagerSTip =
-    _("Open GPA or Kleopatra to manage your certificates. "
-      "You can use this you to generate your "
-      "own certificates. ");
-  const char *encryptTextTTip =
-    _("Encrypt the text of the message");
-  const char *encryptTextSTip =
-    _("Choose the certificates for which the message "
-      "should be encrypted and replace the text "
-      "with the encrypted message.");
-  const char *encryptFileTTip =
-    _("Add a file as an encrypted attachment");
-  const char *encryptFileSTip =
-    _("Encrypts a file and adds it as an attachment to the "
-      "message. ");
-  const char *encryptSignFileTTip =
-    _("Add a file as an encrypted attachment with a signature");
-  const char *encryptSignFileSTip =
-    _("Encrypts a file, signs it and adds both the encrypted file "
-      "and the signature as attachments to the message. ");
-  const char *decryptTextTTip=
-    _("Decrypt the message");
-  const char *decryptTextSTip =
-    _("Look for PGP or S/MIME encrypted data in the message text "
-      "and decrypt it.");
-  const char *signTextTTip =
-    _("Add a signature of the message");
-  const char *signTextSTip =
-    _("Appends a signed copy of the message text in an opaque signature. "
-      "An opaque signature ensures that the signed text is not modified by "
-      "embedding it in the signature itself. "
-      "The combination of the signed message text and your signature is "
-      "added below the plain text. "
-      "The message will not be encrypted!");
-  const char *optsSTip =
-    _("Open the settings dialog for GpgOL.");
-
-  log_debug ("%s:%s: GetCustomUI for id: %ls", SRCNAME, __func__, RibbonID);
-
-  if (!RibbonXml)
-    return E_POINTER;
-
-  if (!wcscmp (RibbonID, L"Microsoft.Outlook.Mail.Compose"))
-    {
-      gpgrt_asprintf (&buffer,
-        "<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\""
-        " onLoad=\"ribbonLoaded\">"
-        " <ribbon>"
-        "   <tabs>"
-        "    <tab id=\"gpgolTab\""
-        "         label=\"%s\">"
-        "     <group id=\"general\""
-        "            label=\"%s\">"
-        "       <button id=\"CustomButton\""
-        "               getImage=\"btnCertManager\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"startCertManager\"/>"
-        "       <dialogBoxLauncher>"
-        "         <button id=\"optsBtn\""
-        "                 onAction=\"openOptions\""
-        "                 screentip=\"%s\"/>"
-        "       </dialogBoxLauncher>"
-        "     </group>"
-        "     <group id=\"textGroup\""
-        "            label=\"%s\">"
-        "       <button id=\"fullTextEncrypt\""
-        "               getImage=\"btnEncryptLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"encryptBody\"/>"
-        "       <button id=\"fullTextDecrypt\""
-        "               getImage=\"btnDecryptLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"decryptBody\"/>"
-        "       <button id=\"fullTextSign\""
-        "               getImage=\"btnSignLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"signBody\"/>"
-        "       <button id=\"fullTextVerify\""
-        "               getImage=\"btnVerifyLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               onAction=\"verifyBody\"/>"
-        "     </group>"
-        "     <group id=\"attachmentGroup\""
-        "            label=\"%s\">"
-        "       <button id=\"encryptedFile\""
-        "               getImage=\"btnEncryptLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"addEncAttachment\"/>"
-        "       <button id=\"encryptSignFile\""
-        "               getImage=\"btnEncryptFileLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"addEncSignedAttachment\"/>"
-        "     </group>"
-        "    </tab>"
-        "   </tabs>"
-        " </ribbon>"
-        " <contextMenus>"
-        "  <contextMenu idMso=\"ContextMenuText\">"
-        "    <button id=\"encryptButton\""
-        "            label=\"%s\""
-        "            getImage=\"btnEncrypt\""
-        "            onAction=\"encryptSelection\"/>"
-        "    <button id=\"decryptButton\""
-        "            label=\"%s\""
-        "            getImage=\"btnDecrypt\""
-        "            onAction=\"decryptSelection\"/>"
-        " </contextMenu>"
-        "</contextMenus>"
-        "</customUI>", _("GpgOL"), _("General"),
-        _("Start Certificate Manager"), certManagerTTip, certManagerSTip,
-        optsSTip,
-        _("Textbody"),
-        _("Encrypt"), encryptTextTTip, encryptTextSTip,
-        _("Decrypt"), decryptTextTTip, decryptTextSTip,
-        _("Sign"), signTextTTip, signTextSTip,
-        _("Verify"),
-        _("Attachments"),
-        _("Encrypted file"), encryptFileTTip, encryptFileSTip,
-        _("Encrypted file and Signature"), encryptSignFileTTip, encryptSignFileSTip,
-        _("Encrypt"), _("Decrypt")
-        );
-    }
-  else if (!wcscmp (RibbonID, L"Microsoft.Outlook.Mail.Read"))
-    {
-      gpgrt_asprintf (&buffer,
-        "<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
-        " <ribbon>"
-        "   <tabs>"
-        "    <tab id=\"gpgolTab\""
-        "         label=\"%s\">"
-        "     <group id=\"general\""
-        "            label=\"%s\">"
-        "       <button id=\"CustomButton\""
-        "               getImage=\"btnCertManager\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"startCertManager\"/>"
-        "       <dialogBoxLauncher>"
-        "         <button id=\"optsBtn\""
-        "                 onAction=\"openOptions\""
-        "                 screentip=\"%s\"/>"
-        "       </dialogBoxLauncher>"
-        "     </group>"
-        "     <group id=\"textGroup\""
-        "            label=\"%s\">"
-        "       <button id=\"fullTextDecrypt\""
-        "               getImage=\"btnDecryptLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"decryptBody\"/>"
-        "       <button id=\"fullTextVerify\""
-        "               getImage=\"btnVerifyLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               onAction=\"verifyBody\"/>"
-        "     </group>"
-        "    </tab>"
-        "   </tabs>"
-        "  <contextualTabs>"
-        "    <tabSet idMso=\"TabSetAttachments\">"
-        "        <tab idMso=\"TabAttachments\">"
-        "            <group label=\"%s\" id=\"gnupgLabel\">"
-        "                <button id=\"gpgol_contextual_decrypt\""
-        "                    size=\"large\""
-        "                    label=\"%s\""
-        "                    getImage=\"btnDecryptLarge\""
-        "                    onAction=\"attachmentDecryptCallback\" />"
-        "            </group>"
-        "        </tab>"
-        "    </tabSet>"
-        "  </contextualTabs>"
-        " </ribbon>"
-        "<contextMenus>"
-        "<contextMenu idMso=\"ContextMenuReadOnlyMailText\">"
-        "   <button id=\"decryptReadButton\""
-        "           label=\"%s\""
-        "           getImage=\"btnDecrypt\""
-        "           onAction=\"decryptSelection\"/>"
-        " </contextMenu>"
-        " <contextMenu idMso=\"ContextMenuAttachments\">"
-        "   <button id=\"gpgol_decrypt\""
-        "           label=\"%s\""
-        "           getImage=\"btnDecrypt\""
-        "           onAction=\"attachmentDecryptCallback\"/>"
-        " </contextMenu>"
-        "</contextMenus>"
-        "</customUI>",
-        _("GpgOL"), _("General"),
-        _("Start Certificate Manager"), certManagerTTip, certManagerSTip,
-        optsSTip,
-        _("Textbody"),
-        _("Decrypt"), decryptTextTTip, decryptTextSTip,
-        _("Verify"),
-        _("GpgOL"), _("Save and decrypt"),
-        _("Decrypt"),
-        _("Decrypt"));
-    }
-  else if (!wcscmp (RibbonID, L"Microsoft.Outlook.Explorer"))
-    {
-      gpgrt_asprintf (&buffer,
-        "<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
-        " <ribbon>"
-        "   <tabs>"
-        "    <tab id=\"gpgolTab\""
-        "         label=\"%s\">"
-        "     <group id=\"general\""
-        "            label=\"%s\">"
-        "       <button id=\"CustomButton\""
-        "               getImage=\"btnCertManager\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               screentip=\"%s\""
-        "               supertip=\"%s\""
-        "               onAction=\"startCertManager\"/>"
-        "       <dialogBoxLauncher>"
-        "         <button id=\"optsBtn\""
-        "                 onAction=\"openOptions\""
-        "                 screentip=\"%s\"/>"
-        "       </dialogBoxLauncher>"
-        "     </group>"
-        /* This would be totally nice but Outlook
-           saves the decrypted text aftewards automatically.
-           Yay,..
-        "     <group id=\"textGroup\""
-        "            label=\"%s\">"
-        "       <button id=\"fullTextDecrypt\""
-        "               getImage=\"btnDecryptLarge\""
-        "               size=\"large\""
-        "               label=\"%s\""
-        "               onAction=\"decryptBody\"/>"
-        "     </group>"
-        */
-        "    </tab>"
-        "   </tabs>"
-        "  <contextualTabs>"
-        "    <tabSet idMso=\"TabSetAttachments\">"
-        "        <tab idMso=\"TabAttachments\">"
-        "            <group label=\"%s\" id=\"gnupgLabel\">"
-        "                <button id=\"gpgol_contextual_decrypt\""
-        "                    size=\"large\""
-        "                    label=\"%s\""
-        "                    getImage=\"btnDecryptLarge\""
-        "                    onAction=\"attachmentDecryptCallback\" />"
-        "            </group>"
-        "        </tab>"
-        "    </tabSet>"
-        "  </contextualTabs>"
-        " </ribbon>"
-        " <contextMenus>"
-        /*
-           There appears to be no way to access the word editor
-           / get the selected text from that Context.
-        " <contextMenu idMso=\"ContextMenuReadOnlyMailText\">"
-        " <button id=\"decryptReadButton1\""
-        "         label=\"%s\""
-        "         onAction=\"decryptSelection\"/>"
-        " </contextMenu>"
-        */
-        " <contextMenu idMso=\"ContextMenuAttachments\">"
-        "   <button id=\"gpgol_decrypt\""
-        "           label=\"%s\""
-        "           getImage=\"btnDecrypt\""
-        "           onAction=\"attachmentDecryptCallback\"/>"
-        " </contextMenu>"
-        " </contextMenus>"
-        "</customUI>",
-        _("GpgOL"), _("General"),
-        _("Start Certificate Manager"), certManagerTTip, certManagerSTip,
-        optsSTip,
-        /*_("Mail Body"), _("Decrypt"),*/
-        _("GpgOL"), _("Save and decrypt"),/*_("Decrypt"), */
-        _("Save and decrypt"));
-    }
-
-  if (buffer)
-    {
-      wchar_t *wbuf = utf8_to_wchar2 (buffer, strlen(buffer));
-      xfree (buffer);
-      *RibbonXml = SysAllocString (wbuf);
-      xfree (wbuf);
-    }
-  else
-    *RibbonXml = NULL;
-
-  return S_OK;
-}
-
 STDMETHODIMP
 GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
 {
-  if (use_mime_ui)
-    {
-      return GetCustomUI_MIME (RibbonID, RibbonXml);
-    }
-  else
-    {
-      return GetCustomUI_old (RibbonID, RibbonXml);
-    }
+  return GetCustomUI_MIME (RibbonID, RibbonXml);
 }
 
 /* RibbonUi elements are created on demand but they are reused
diff --git a/src/main.c b/src/main.c
index ddb54eb..186620e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -357,14 +357,6 @@ read_options (void)
   opt.body_as_attachment = val == NULL || *val != '1'? 0 : 1;
   xfree (val); val = NULL;
 
-#ifdef MIME_SEND
-  opt.mime_ui = 1;
-#else
-  load_extension_value ("mimeUI", &val);
-  opt.mime_ui = val == NULL || *val != '1'? 0 : 1;
-  xfree (val); val = NULL;
-#endif
-
   load_extension_value ("inlinePGP", &val);
   opt.inline_pgp = val == NULL || *val != '1'? 0 : 1;
   xfree (val); val = NULL;
@@ -446,7 +438,6 @@ write_options (void)
     {"formsRevision",            1, opt.forms_revision, NULL},
     {"announceNumber",           1, opt.announce_number, NULL},
     {"bodyAsAttachment",         0, opt.body_as_attachment, NULL},
-    {"mimeUI", MIME_UI_DEFAULT, opt.mime_ui, NULL},
     {"inlinePGP",                0, opt.inline_pgp, NULL},
     {"autoresolve",              0, opt.autoresolve, NULL},
     {"replyCrypt",               0, opt.reply_crypt, NULL},
diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 1acae9e..2cb451d 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -646,11 +646,6 @@ get_msgcls_from_pgp_lines (LPMESSAGE message, bool *r_nobody = nullptr)
   char *msgcls = NULL;
   int is_wchar = 0;
 
-  if (!opt.mime_ui)
-    {
-      return NULL;
-    }
-
   if (r_nobody)
     {
       *r_nobody = false;
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index db0042f..f1184d4 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -43,7 +43,6 @@
 #include "mapihelp.h"
 #include "mimemaker.h"
 #include "filetype.h"
-#include "gpgolstr.h"
 #include "mail.h"
 
 #include <gpgme++/context.h>
@@ -51,8 +50,6 @@
 
 using namespace GpgME;
 
-#define OPAQUE_SIGNED_MARKER "-----BEGIN PGP MESSAGE-----"
-
 /* Gets the context of a ribbon control. And prints some
    useful debug output */
 HRESULT getContext (LPDISPATCH ctrl, LPDISPATCH *context)
@@ -76,419 +73,6 @@ HRESULT getContext (LPDISPATCH ctrl, LPDISPATCH *context)
 #define DATA_BODY      4 /* Use text body as data */
 #define DATA_SELECTION 8 /* Use selection as data */
 
-/* Read hfile in chunks of 4KB and writes them to the sink */
-static int
-copyFileToSink (HANDLE hFile, sink_t sink)
-{
-  char buf[4096];
-  DWORD bytesRead = 0;
-  do
-    {
-      if (!ReadFile (hFile, buf, sizeof buf, &bytesRead, NULL))
-        {
-          log_error ("%s:%s: Could not read source file.",
-                     SRCNAME, __func__);
-          return -1;
-        }
-      if (write_buffer (sink, bytesRead ? buf : NULL, bytesRead))
-        {
-          log_error ("%s:%s: Could not write out buffer",
-                     SRCNAME, __func__);
-          return -1;
-        }
-    }
-  while (bytesRead);
-  return 0;
-}
-
-static int
-attachSignature (LPDISPATCH mailItem, char *subject, HANDLE hFileToSign,
-                 protocol_t protocol, unsigned int session_number,
-                 HWND curWindow, wchar_t *fileNameToSign, char *sender)
-{
-  wchar_t *sigName = NULL;
-  wchar_t *sigFileName = NULL;
-  HANDLE hSigFile = NULL;
-  int rc = 0;
-  struct sink_s encsinkmem;
-  sink_t encsink = &encsinkmem;
-  struct sink_s sinkmem;
-  sink_t sink = &sinkmem;
-  engine_filter_t filter = NULL;
-
-  memset (encsink, 0, sizeof *encsink);
-  memset (sink, 0, sizeof *sink);
-
-  /* Prepare a fresh filter */
-  if ((rc = engine_create_filter (&filter, write_buffer_for_cb, sink)))
-    {
-      goto failure;
-    }
-  encsink->cb_data = filter;
-  encsink->writefnc = sink_encryption_write;
-  engine_set_session_number (filter, session_number);
-  engine_set_session_title (filter, subject ? subject :_("GpgOL"));
-
-  if (engine_sign_start (filter, curWindow, protocol, sender, &protocol))
-    goto failure;
-
-  sigName = get_pretty_attachment_name (fileNameToSign, protocol, 1);
-
-  /* If we are unlucky the number of temporary file artifacts might
-     differ for the signature and the encrypted file but we have
-     to live with that. */
-  sigFileName = get_tmp_outfile (sigName, &hSigFile);
-  sink->cb_data = hSigFile;
-  sink->writefnc = sink_file_write;
-
-  if (!sigFileName)
-    {
-      log_error ("%s:%s: Could not get a decent attachment name",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Reset the file to sign handle to the beginning of the file and
-     copy it to the signature buffer */
-  SetFilePointer (hFileToSign, 0, NULL, 0);
-  if ((rc=copyFileToSink (hFileToSign, encsink)))
-    goto failure;
-
-  /* Lets hope the user did not select a huge file. We are hanging
-     here until encryption is completed.. */
-  if ((rc = engine_wait (filter)))
-    goto failure;
-
-  filter = NULL; /* Not valid anymore.  */
-  encsink->cb_data = NULL; /* Not needed anymore.  */
-
-  if (!sink->enc_counter)
-    {
-      log_error ("%s:%s: nothing received from engine", SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Now we have an encrypted file behind encryptedFile. Let's add it */
-  add_oom_attachment (mailItem, sigFileName, nullptr);
-
-failure:
-  xfree (sigFileName);
-  xfree (sigName);
-  if (hSigFile)
-    {
-      CloseHandle (hSigFile);
-      DeleteFileW (sigFileName);
-    }
-  return rc;
-}
-
-/* do_composer_action
-   Encrypts / Signs text in an IInspector context.
-   Depending on the flags either the
-   active selection or the full body is encrypted.
-   Combine OP_ENCRYPT and OP_SIGN if you want both.
-*/
-
-HRESULT
-do_composer_action (LPDISPATCH ctrl, int flags)
-{
-  LPDISPATCH context = NULL;
-  LPDISPATCH selection = NULL;
-  LPDISPATCH wordEditor = NULL;
-  LPDISPATCH application = NULL;
-  LPDISPATCH mailItem = NULL;
-  LPDISPATCH sender = NULL;
-  LPDISPATCH recipients = NULL;
-
-  struct sink_s encsinkmem;
-  sink_t encsink = &encsinkmem;
-  struct sink_s sinkmem;
-  sink_t sink = &sinkmem;
-  char* senderAddr = NULL;
-  char** recipientAddrs = NULL;
-  LPSTREAM tmpstream = NULL;
-  engine_filter_t filter = NULL;
-  char* plaintext = NULL;
-  int rc = 0;
-  HRESULT hr;
-  HWND curWindow;
-  protocol_t protocol;
-  unsigned int session_number;
-  int i;
-  STATSTG tmpStat;
-
-  log_debug ("%s:%s: enter", SRCNAME, __func__);
-
-  hr = getContext (ctrl, &context);
-  if (FAILED(hr))
-      return hr;
-
-  memset (encsink, 0, sizeof *encsink);
-  memset (sink, 0, sizeof *sink);
-
-  curWindow = get_oom_context_window (context);
-
-  wordEditor = get_oom_object (context, "WordEditor");
-  application = get_oom_object (wordEditor, "get_Application");
-  selection = get_oom_object (application, "get_Selection");
-  mailItem = get_oom_object (context, "CurrentItem");
-  sender = get_oom_object (mailItem, "Session.CurrentUser");
-  recipients = get_oom_object (mailItem, "Recipients");
-
-  if (!wordEditor || !application || !selection || !mailItem ||
-      !sender || !recipients)
-    {
-      MessageBox (NULL,
-                  "Internal error in GpgOL.\n"
-                  "Could not find all objects.",
-                  _("GpgOL"),
-                  MB_ICONINFORMATION|MB_OK);
-      log_error ("%s:%s: Could not find all objects.",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  if (flags & DATA_SELECTION)
-    {
-      plaintext = get_oom_string (selection, "Text");
-
-      if (!plaintext || strlen (plaintext) <= 1)
-        {
-          MessageBox (NULL,
-                      _("Please select text to encrypt."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-    }
-  else if (flags & DATA_BODY)
-    {
-      plaintext = get_oom_string (mailItem, "Body");
-      if (!plaintext || strlen (plaintext) <= 1)
-        {
-          MessageBox (NULL,
-                      _("Textbody empty."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-    }
-
-  /* Create a temporary sink to construct the encrypted data.  */
-  hr = OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffer,
-                         (SOF_UNIQUEFILENAME | STGM_DELETEONRELEASE
-                          | STGM_CREATE | STGM_READWRITE),
-                         NULL, GpgOLStr("GPG"), &tmpstream);
-
-  if (FAILED (hr))
-    {
-      log_error ("%s:%s: can't create temp file: hr=%#lx\n",
-                 SRCNAME, __func__, hr);
-      rc = -1;
-      goto failure;
-    }
-
-  sink->cb_data = tmpstream;
-  sink->writefnc = sink_std_write;
-
-  /* Now lets prepare our encryption */
-  session_number = engine_new_session_number ();
-
-  /* Prepare the encryption sink */
-
-  if (engine_create_filter (&filter, write_buffer_for_cb, sink))
-    {
-      goto failure;
-    }
-
-  encsink->cb_data = filter;
-  encsink->writefnc = sink_encryption_write;
-
-  engine_set_session_number (filter, session_number);
-  engine_set_session_title (filter, _("GpgOL"));
-
-  senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
-
-  if (flags & OP_ENCRYPT)
-    {
-      recipientAddrs = get_oom_recipients (recipients);
-
-      if (!recipientAddrs || !(*recipientAddrs))
-        {
-          MessageBox (NULL,
-                      _("Please add at least one recipent."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-
-      if ((rc=engine_encrypt_prepare (filter, curWindow,
-                                      PROTOCOL_UNKNOWN,
-                                      (flags & OP_SIGN) ?
-                                      ENGINE_FLAG_SIGN_FOLLOWS : 0,
-                                      senderAddr, recipientAddrs,
-                                      &protocol)))
-        {
-          log_error ("%s:%s: engine encrypt prepare failed : %s",
-                     SRCNAME, __func__, gpg_strerror (rc));
-          goto failure;
-        }
-
-      if ((rc=engine_encrypt_start (filter, 0)))
-        {
-          log_error ("%s:%s: engine encrypt start failed: %s",
-                     SRCNAME, __func__, gpg_strerror (rc));
-          goto failure;
-        }
-    }
-  else
-    {
-      /* We could do some kind of clearsign / sign text as attachment here
-      but it is error prone */
-      if ((rc=engine_sign_opaque_start (filter, curWindow, PROTOCOL_UNKNOWN,
-                                        senderAddr, &protocol)))
-        {
-          log_error ("%s:%s: engine sign start failed: %s",
-                     SRCNAME, __func__, gpg_strerror (rc));
-          goto failure;
-        }
-    }
-
-  /* Write the text in the encryption sink. */
-  rc = write_buffer (encsink, plaintext, strlen (plaintext));
-
-  if (rc)
-    {
-      log_error ("%s:%s: writing tmpstream to encsink failed: %s",
-                 SRCNAME, __func__, gpg_strerror (rc));
-      goto failure;
-    }
-  /* Flush the encryption sink and wait for the encryption to get
-     ready.  */
-  if ((rc = write_buffer (encsink, NULL, 0)))
-    goto failure;
-  if ((rc = engine_wait (filter)))
-    goto failure;
-  filter = NULL; /* Not valid anymore.  */
-  encsink->cb_data = NULL; /* Not needed anymore.  */
-
-  if (!sink->enc_counter)
-    {
-      log_debug ("%s:%s: nothing received from engine", SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Check the size of the encrypted data */
-  tmpstream->Stat (&tmpStat, 0);
-
-  if (tmpStat.cbSize.QuadPart > UINT_MAX)
-    {
-      log_error ("%s:%s: No one should write so large mails.",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Copy the encrypted stream to the message editor.  */
-  {
-    LARGE_INTEGER off;
-    ULONG nread;
-
-    char buffer[(unsigned int)tmpStat.cbSize.QuadPart + 1];
-
-    memset (buffer, 0, sizeof buffer);
-
-    off.QuadPart = 0;
-    hr = tmpstream->Seek (off, STREAM_SEEK_SET, NULL);
-    if (hr)
-      {
-        log_error ("%s:%s: seeking back to the begin failed: hr=%#lx",
-                   SRCNAME, __func__, hr);
-        rc = gpg_error (GPG_ERR_EIO);
-        goto failure;
-      }
-    hr = tmpstream->Read (buffer, sizeof (buffer) - 1, &nread);
-    if (hr)
-      {
-        log_error ("%s:%s: IStream::Read failed: hr=%#lx",
-                   SRCNAME, __func__, hr);
-        rc = gpg_error (GPG_ERR_EIO);
-        goto failure;
-      }
-    if (strlen (buffer) > 1)
-      {
-        if (flags & OP_SIGN)
-          {
-            /* When signing we append the signature after the body */
-            unsigned int combinedSize = strlen (buffer) +
-              strlen (plaintext) + 5;
-            char combinedBody[combinedSize];
-            memset (combinedBody, 0, combinedSize);
-            snprintf (combinedBody, combinedSize, "%s\r\n\r\n%s", plaintext,
-                      buffer);
-            if (flags & DATA_SELECTION)
-              put_oom_string (selection, "Text", combinedBody);
-            else if (flags & DATA_BODY)
-              put_oom_string (mailItem, "Body", combinedBody);
-
-          }
-        else if (protocol == PROTOCOL_SMIME)
-          {
-            unsigned int enclosedSize = strlen (buffer) + 34 + 31 + 1;
-            char enclosedData[enclosedSize];
-            snprintf (enclosedData, sizeof enclosedData,
-                      "-----BEGIN ENCRYPTED MESSAGE-----\r\n"
-                      "%s"
-                      "-----END ENCRYPTED MESSAGE-----\r\n", buffer);
-            if (flags & DATA_SELECTION)
-              put_oom_string (selection, "Text", enclosedData);
-            else if (flags & DATA_BODY)
-              put_oom_string (mailItem, "Body", enclosedData);
-
-          }
-        else
-          {
-            if (flags & DATA_SELECTION)
-              put_oom_string (selection, "Text", buffer);
-            else if (flags & DATA_BODY)
-              {
-                put_oom_string (mailItem, "Body", buffer);
-              }
-          }
-      }
-    else
-      {
-        /* Just to be save not to overwrite the selection with
-           an empty buffer */
-        log_error ("%s:%s: unexpected problem ", SRCNAME, __func__);
-        goto failure;
-      }
-  }
-
-failure:
-  if (rc)
-    log_debug ("%s:%s: failed rc=%d (%s) <%s>", SRCNAME, __func__, rc,
-               gpg_strerror (rc), gpg_strsource (rc));
-  engine_cancel (filter);
-  gpgol_release(wordEditor);
-  gpgol_release(application);
-  gpgol_release(selection);
-  gpgol_release(sender);
-  gpgol_release(recipients);
-  gpgol_release(mailItem);
-  gpgol_release(tmpstream);
-  xfree (plaintext);
-  xfree (senderAddr);
-  if (recipientAddrs)
-    {
-      for (i=0; recipientAddrs && recipientAddrs[i]; i++)
-        xfree (recipientAddrs[i]);
-      xfree (recipientAddrs);
-    }
-  log_debug ("%s:%s: leave", SRCNAME, __func__);
-
-  return S_OK;
-}
-
 HRESULT
 decryptAttachments (LPDISPATCH ctrl)
 {
@@ -586,338 +170,6 @@ decryptAttachments (LPDISPATCH ctrl)
                   callback function failed in an ugly window. */
 }
 
-/* MIME erify mail helper. Returns 0 if it
-  was not called with a MIME crypto message or on error. */
-static int
-verify_mime (LPDISPATCH mailitem)
-{
-  int ret = 0;
-
-  LPMESSAGE message = get_oom_base_message (mailitem);
-  if (!message)
-    {
-      log_error ("%s:%s: Failed to get the base message",
-                 SRCNAME, __func__);
-      return 0;
-    }
-  ret = -1;
-//  ret = message_incoming_handler (message, NULL, true /*force */);
-  gpgol_release (message);
-
-  return ret;
-}
-
-/* do_reader_action
-   decrypts the content of an inspector. Controled by flags
-   similary to the do_composer_action.
-*/
-
-HRESULT
-do_reader_action (LPDISPATCH ctrl, int flags)
-{
-  LPDISPATCH context = NULL;
-  LPDISPATCH selection = NULL;
-  LPDISPATCH wordEditor = NULL;
-  LPDISPATCH mailItem = NULL;
-  LPDISPATCH wordApplication = NULL;
-
-  struct sink_s decsinkmem;
-  sink_t decsink = &decsinkmem;
-  struct sink_s sinkmem;
-  sink_t sink = &sinkmem;
-
-  LPSTREAM tmpstream = NULL;
-  engine_filter_t filter = NULL;
-  HWND curWindow;
-  char* encData = NULL;
-  char* senderAddr = NULL;
-  char* subject = NULL;
-  int encDataLen = 0;
-  int rc = 0;
-  unsigned int session_number;
-  HRESULT hr;
-  STATSTG tmpStat;
-
-  protocol_t protocol;
-
-  hr = getContext (ctrl, &context);
-  if (FAILED(hr))
-      return hr;
-
-  memset (decsink, 0, sizeof *decsink);
-  memset (sink, 0, sizeof *sink);
-
-  curWindow = get_oom_context_window (context);
-
-  if (!(flags & DATA_BODY))
-    {
-      wordEditor = get_oom_object (context, "WordEditor");
-      wordApplication = get_oom_object (wordEditor, "get_Application");
-      selection = get_oom_object (wordApplication, "get_Selection");
-    }
-  mailItem = get_oom_object (context, "CurrentItem");
-
-  if ((!wordEditor || !wordApplication || !selection || !mailItem) &&
-      !(flags & DATA_BODY))
-    {
-      MessageBox (NULL,
-                  "Internal error in GpgOL.\n"
-                    "Could not find all objects.",
-                  _("GpgOL"),
-                  MB_ICONINFORMATION|MB_OK);
-      log_error ("%s:%s: Could not find all objects.",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  if (!mailItem)
-    {
-      /* This happens when we try to decrypt the body of a mail in the
-         explorer context. */
-      mailItem = get_oom_object (context, "Selection.Item(1)");
-
-      if (!mailItem)
-        {
-          MessageBox (NULL,
-                      _("Please select a Mail."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-    }
-
-  if (flags & DATA_SELECTION)
-    {
-      encData = get_oom_string (selection, "Text");
-
-      if (!encData || (encDataLen = strlen (encData)) <= 1)
-        {
-          MessageBox (NULL,
-                      _("Please select the data you wish to decrypt."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-    }
-  else if (flags & DATA_BODY)
-    {
-      encData = get_oom_string (mailItem, "Body");
-
-      if (!encData || (encDataLen = strlen (encData)) <= 1)
-        {
-          MessageBox (NULL,
-                      _("Nothing to decrypt."),
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-          goto failure;
-        }
-    }
-
-  fix_linebreaks (encData, &encDataLen);
-
-  /* We check if the data we work on was opaque signed. This is
-     true for signed stuff created by ribbon-callbacks and not a
-     decent MIME implementation. So in that case we don't use
-     verify_mime */
-  if (!strstr (encData, OPAQUE_SIGNED_MARKER) && verify_mime (mailItem))
-    {
-      log_debug ("%s:%s: This was a mime message.",
-                 SRCNAME, __func__);
-
-      if (flags & OP_DECRYPT)
-        {
-          MessageBox (NULL,
-                      "This message is in MIME format. Due to technical restrictions "
-                      "it can only be decrypted once per session. To decrypt it again "
-                      "please restart Outlook and open the message.",
-                      _("GpgOL"),
-                      MB_ICONINFORMATION|MB_OK);
-        }
-      goto failure;
-    }
-
-  subject = get_oom_string (mailItem, "Subject");
-  if (get_oom_bool (mailItem, "Sent"))
-    {
-      char *addrType = get_oom_string (mailItem, "SenderEmailType");
-      if (addrType && strcmp("SMTP", addrType) == 0)
-        {
-          senderAddr = get_oom_string (mailItem, "SenderEmailAddress");
-        }
-      else
-        {
-          /* Not SMTP, fall back to try getting the property. */
-          LPDISPATCH sender = get_oom_object (mailItem, "Sender");
-          senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
-          gpgol_release (sender);
-        }
-      xfree (addrType);
-    }
-  else
-    {
-      /* If the message has not been sent we might be composing
-         in this case use the current address */
-      LPDISPATCH sender = get_oom_object (mailItem, "Session.CurrentUser");
-      senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
-      gpgol_release (sender);
-    }
-
-  /* Determine the protocol based on the content */
-  protocol = is_cms_data (encData, encDataLen) ? PROTOCOL_SMIME :
-    PROTOCOL_OPENPGP;
-
-  hr = OpenStreamOnFile (MAPIAllocateBuffer, MAPIFreeBuffer,
-                         (SOF_UNIQUEFILENAME | STGM_DELETEONRELEASE
-                          | STGM_CREATE | STGM_READWRITE),
-                         NULL, GpgOLStr("GPG"), &tmpstream);
-
-  if (FAILED (hr))
-    {
-      log_error ("%s:%s: can't create temp file: hr=%#lx\n",
-                 SRCNAME, __func__, hr);
-      rc = -1;
-      goto failure;
-    }
-
-  sink->cb_data = tmpstream;
-  sink->writefnc = sink_std_write;
-
-  session_number = engine_new_session_number ();
-  if (engine_create_filter (&filter, write_buffer_for_cb, sink))
-    goto failure;
-
-  decsink->cb_data = filter;
-  decsink->writefnc = sink_encryption_write;
-
-  engine_set_session_number (filter, session_number);
-  engine_set_session_title (filter, subject ? subject : _("GpgOL"));
-
-  if (flags & OP_DECRYPT)
-    {
-      if ((rc=engine_decrypt_start (filter, curWindow,
-                                    protocol,
-                                    1, NULL)))
-        {
-          log_error ("%s:%s: engine decrypt start failed: %s",
-                     SRCNAME, __func__, gpg_strerror (rc));
-          goto failure;
-        }
-    }
-  else if (flags & OP_VERIFY)
-    {
-      log_debug ("Starting verify");
-      if ((rc=engine_verify_start (filter, curWindow,
-                                   NULL, 0, protocol, senderAddr)))
-        {
-          log_error ("%s:%s: engine verify start failed: %s",
-                     SRCNAME, __func__, gpg_strerror (rc));
-          goto failure;
-        }
-    }
-
-  /* Write the text in the decryption sink. */
-  rc = write_buffer (decsink, encData, encDataLen);
-
-  /* Flush the decryption sink and wait for the decryption to get
-     ready.  */
-  if ((rc = write_buffer (decsink, NULL, 0)))
-    goto failure;
-  if ((rc = engine_wait (filter)))
-    goto failure;
-  filter = NULL; /* Not valid anymore.  */
-  decsink->cb_data = NULL; /* Not needed anymore.  */
-
-  if (!sink->enc_counter)
-    {
-      log_debug ("%s:%s: nothing received from engine", SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Check the size of the decrypted data */
-  tmpstream->Stat (&tmpStat, 0);
-
-  if (tmpStat.cbSize.QuadPart > UINT_MAX)
-    {
-      log_error ("%s:%s: No one should write so large mails.",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Copy the decrypted stream to the message editor.  */
-  {
-    LARGE_INTEGER off;
-    ULONG nread;
-    char buffer[(unsigned int)tmpStat.cbSize.QuadPart + 1];
-
-    memset (buffer, 0, sizeof buffer);
-
-    off.QuadPart = 0;
-    hr = tmpstream->Seek (off, STREAM_SEEK_SET, NULL);
-    if (hr)
-      {
-        log_error ("%s:%s: seeking back to the begin failed: hr=%#lx",
-                   SRCNAME, __func__, hr);
-        rc = gpg_error (GPG_ERR_EIO);
-        goto failure;
-      }
-    hr = tmpstream->Read (buffer, sizeof (buffer) - 1, &nread);
-    if (hr)
-      {
-        log_error ("%s:%s: IStream::Read failed: hr=%#lx",
-                   SRCNAME, __func__, hr);
-        rc = gpg_error (GPG_ERR_EIO);
-        goto failure;
-      }
-    if (strlen (buffer) > 1)
-      {
-        /* Now replace the crypto data with the decrypted data or show it
-        somehow.*/
-        int err = 0;
-        if (flags & DATA_SELECTION)
-          {
-            err = put_oom_string (selection, "Text", buffer);
-          }
-        else if (flags & DATA_BODY)
-          {
-            err = put_oom_string (mailItem, "Body", buffer);
-          }
-
-        if (err)
-          {
-            MessageBox (NULL, buffer,
-                        flags & OP_DECRYPT ? _("Plain text") :
-                        _("Signed text"),
-                        MB_ICONINFORMATION|MB_OK);
-          }
-      }
-    else
-      {
-        /* Just to be save not to overwrite the selection with
-           an empty buffer */
-        log_error ("%s:%s: unexpected problem ", SRCNAME, __func__);
-        goto failure;
-      }
-  }
-
- failure:
-  if (rc)
-    log_debug ("%s:%s: failed rc=%d (%s) <%s>", SRCNAME, __func__, rc,
-               gpg_strerror (rc), gpg_strsource (rc));
-  engine_cancel (filter);
-  gpgol_release (mailItem);
-  gpgol_release (selection);
-  gpgol_release (wordEditor);
-  gpgol_release (wordApplication);
-  xfree (encData);
-  xfree (senderAddr);
-  xfree (subject);
-  if (tmpstream)
-    gpgol_release (tmpstream);
-
-  return S_OK;
-}
-
-
 /* getIcon
    Loads a PNG image from the resurce converts it into a Bitmap
    and Wraps it in an PictureDispatcher that is returned as result.
@@ -1022,277 +274,6 @@ getIcon (int id, VARIANT* result)
   return S_OK;
 }
 
-/* Adds an encrypted attachment if the flag OP_SIGN is set
-   a detached signature of the encrypted file is also added. */
-static HRESULT
-attachEncryptedFile (LPDISPATCH ctrl, int flags)
-{
-  LPDISPATCH context = NULL;
-  LPDISPATCH mailItem = NULL;
-  LPDISPATCH sender = NULL;
-  LPDISPATCH recipients = NULL;
-  HRESULT hr;
-  char* senderAddr = NULL;
-  char** recipientAddrs = NULL;
-  char* subject = NULL;
-
-  HWND curWindow;
-  char *fileToEncrypt = NULL;
-  wchar_t *fileToEncryptW = NULL;
-  wchar_t *encryptedFile = NULL;
-  wchar_t *attachName = NULL;
-  HANDLE hFile = NULL;
-  HANDLE hEncFile = NULL;
-
-  unsigned int session_number;
-  struct sink_s encsinkmem;
-  sink_t encsink = &encsinkmem;
-  struct sink_s sinkmem;
-  sink_t sink = &sinkmem;
-  engine_filter_t filter = NULL;
-  protocol_t protocol;
-  int rc = 0;
-  int i = 0;
-
-  memset (encsink, 0, sizeof *encsink);
-  memset (sink, 0, sizeof *sink);
-
-  hr = getContext (ctrl, &context);
-  if (FAILED(hr))
-      return hr;
-
-  /* First do the check for recipients as this is likely
-     to fail */
-  mailItem = get_oom_object (context, "CurrentItem");
-  sender = get_oom_object (mailItem, "Session.CurrentUser");
-  recipients = get_oom_object (mailItem, "Recipients");
-  recipientAddrs = get_oom_recipients (recipients);
-
-  if (!recipientAddrs || !(*recipientAddrs))
-    {
-      MessageBox (NULL,
-                  _("Please add at least one recipent."),
-                  _("GpgOL"),
-                  MB_ICONINFORMATION|MB_OK);
-      goto failure;
-    }
-
-  /* Get a file handle to read from */
-  fileToEncrypt = get_open_filename (NULL, _("Select file to encrypt"));
-
-  if (!fileToEncrypt)
-    {
-      log_debug ("No file selected");
-      goto failure;
-    }
-
-  fileToEncryptW = utf8_to_wchar2 (fileToEncrypt, strlen(fileToEncrypt));
-  xfree (fileToEncrypt);
-
-  hFile = CreateFileW (fileToEncryptW,
-                       GENERIC_READ,
-                       FILE_SHARE_READ,
-                       NULL,
-                       OPEN_EXISTING,
-                       FILE_ATTRIBUTE_NORMAL,
-                       NULL);
-  if (hFile == INVALID_HANDLE_VALUE)
-    {
-      /* Should not happen as the Open File dialog
-         should have prevented this.
-         Maybe this also happens when a file is
-         not readable. In that case we might want
-         to switch to a localized error naming the file. */
-      MessageBox (NULL,
-                  "Internal error in GpgOL.\n"
-                  "Could not open File.",
-                  _("GpgOL"),
-                  MB_ICONERROR|MB_OK);
-      return S_OK;
-    }
-
-  /* Now do the encryption preperations */
-
-  if (!mailItem || !sender || !recipients)
-    {
-      MessageBox (NULL,
-                  "Internal error in GpgOL.\n"
-                  "Could not find all objects.",
-                  _("GpgOL"),
-                  MB_ICONERROR|MB_OK);
-      log_error ("%s:%s: Could not find all objects.",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  senderAddr = get_pa_string (sender, PR_SMTP_ADDRESS_DASL);
-
-  curWindow = get_oom_context_window (context);
-
-  session_number = engine_new_session_number ();
-
-  subject = get_oom_string (mailItem, "Subject");
-
-  /* Prepare the encryption sink */
-  if ((rc = engine_create_filter (&filter, write_buffer_for_cb, sink)))
-    {
-      goto failure;
-    }
-
-  encsink->cb_data = filter;
-  encsink->writefnc = sink_encryption_write;
-
-  engine_set_session_number (filter, session_number);
-  engine_set_session_title (filter, subject ? subject :_("GpgOL"));
-  if ((rc=engine_encrypt_prepare (filter, curWindow,
-                                  PROTOCOL_UNKNOWN,
-                                  ENGINE_FLAG_BINARY_OUTPUT,
-                                  senderAddr, recipientAddrs, &protocol)))
-    {
-      log_error ("%s:%s: engine encrypt prepare failed : %s",
-                 SRCNAME, __func__, gpg_strerror (rc));
-      goto failure;
-    }
-
-  attachName = get_pretty_attachment_name (fileToEncryptW, protocol, 0);
-
-  if (!attachName)
-    {
-      log_error ("%s:%s: Could not get a decent attachment name",
-                 SRCNAME, __func__);
-      goto failure;
-    }
-
-  encryptedFile = get_tmp_outfile (attachName, &hEncFile);
-  sink->cb_data = hEncFile;
-  sink->writefnc = sink_file_write;
-
-  if ((rc=engine_encrypt_start (filter, 0)))
-    {
-      log_error ("%s:%s: engine encrypt start failed: %s",
-                 SRCNAME, __func__, gpg_strerror (rc));
-      goto failure;
-    }
-
-  if ((rc=copyFileToSink (hFile, encsink)))
-    goto failure;
-
-  /* Lets hope the user did not select a huge file. We are hanging
-   here until encryption is completed.. */
-  if ((rc = engine_wait (filter)))
-    goto failure;
-
-  filter = NULL; /* Not valid anymore.  */
-  encsink->cb_data = NULL; /* Not needed anymore.  */
-
-  if (!sink->enc_counter)
-    {
-      log_error ("%s:%s: nothing received from engine", SRCNAME, __func__);
-      goto failure;
-    }
-
-  /* Now we have an encrypted file behind encryptedFile. Let's add it */
-  add_oom_attachment (mailItem, encryptedFile, nullptr);
-
-  if (flags & OP_SIGN)
-    {
-      attachSignature (mailItem, subject, hEncFile, protocol, session_number,
-                       curWindow, encryptedFile, senderAddr);
-    }
-
-failure:
-  if (filter)
-    engine_cancel (filter);
-
-  if (hEncFile)
-    {
-      CloseHandle (hEncFile);
-      DeleteFileW (encryptedFile);
-    }
-  xfree (senderAddr);
-  xfree (encryptedFile);
-  xfree (fileToEncryptW);
-  xfree (attachName);
-  xfree (subject);
-  gpgol_release (mailItem);
-  gpgol_release (sender);
-  gpgol_release (recipients);
-
-  if (hFile)
-    CloseHandle (hFile);
-  if (recipientAddrs)
-    {
-      for (i=0; recipientAddrs && recipientAddrs[i]; i++)
-        xfree (recipientAddrs[i]);
-      xfree (recipientAddrs);
-    }
-
-  return S_OK;
-}
-
-HRESULT
-startCertManager (LPDISPATCH ctrl)
-{
-  HRESULT hr;
-  LPDISPATCH context;
-  HWND curWindow;
-
-  hr = getContext (ctrl, &context);
-  if (FAILED(hr))
-      return hr;
-
-  curWindow = get_oom_context_window (context);
-
-  engine_start_keymanager (curWindow);
-  return S_OK;
-}
-
-HRESULT
-decryptBody (LPDISPATCH ctrl)
-{
-  return do_reader_action (ctrl, OP_DECRYPT | DATA_BODY);
-}
-
-HRESULT
-decryptSelection (LPDISPATCH ctrl)
-{
-  return do_reader_action (ctrl, OP_DECRYPT | DATA_SELECTION);
-}
-
-HRESULT
-encryptBody (LPDISPATCH ctrl)
-{
-  return do_composer_action (ctrl, OP_ENCRYPT | DATA_BODY);
-}
-
-HRESULT
-encryptSelection (LPDISPATCH ctrl)
-{
-  return do_composer_action (ctrl, OP_ENCRYPT | DATA_SELECTION);
-}
-
-HRESULT
-addEncSignedAttachment (LPDISPATCH ctrl)
-{
-  return attachEncryptedFile (ctrl, OP_SIGN);
-}
-
-HRESULT
-addEncAttachment (LPDISPATCH ctrl)
-{
-  return attachEncryptedFile (ctrl, 0);
-}
-
-HRESULT signBody (LPDISPATCH ctrl)
-{
-  return do_composer_action (ctrl, DATA_BODY | OP_SIGN);
-}
-
-HRESULT verifyBody (LPDISPATCH ctrl)
-{
-  return do_reader_action (ctrl, DATA_BODY | OP_VERIFY);
-}
-
 HRESULT
 mark_mime_action (LPDISPATCH ctrl, int flags, bool is_explorer)
 {
diff --git a/src/ribbon-callbacks.h b/src/ribbon-callbacks.h
index 6fe63df..54369d6 100644
--- a/src/ribbon-callbacks.h
+++ b/src/ribbon-callbacks.h
@@ -28,15 +28,6 @@
 
 /* Id's of our callbacks */
 #define ID_CMD_DECRYPT           2
-#define ID_CMD_ENCRYPT_SELECTION 3
-#define ID_CMD_DECRYPT_SELECTION 4
-#define ID_CMD_CERT_MANAGER      5
-#define ID_CMD_ENCRYPT_BODY      6
-#define ID_CMD_DECRYPT_BODY      8
-#define ID_CMD_ATT_ENCSIGN_FILE  9
-#define ID_CMD_SIGN_BODY        10
-#define ID_CMD_ATT_ENC_FILE     11
-#define ID_CMD_VERIFY_BODY      12
 #define ID_CMD_MIME_SIGN        13
 #define ID_CMD_MIME_ENCRYPT     14
 #define ID_GET_SIGN_PRESSED     15
@@ -60,7 +51,6 @@
 #define ID_CMD_PRINT_DECRYPTED 34
 #define ID_GET_IS_CRYPTO_MAIL 35
 
-#define ID_BTN_CERTMANAGER       IDI_KEY_MANAGER_64_PNG
 #define ID_BTN_DECRYPT           IDI_DECRYPT_16_PNG
 #define ID_BTN_DECRYPT_LARGE     IDI_DECRYPT_48_PNG
 #define ID_BTN_ENCRYPT           IDI_ENCRYPT_16_PNG
@@ -73,16 +63,7 @@
 #define OP_SIGN        2 /* Sign the data */
 
 HRESULT decryptAttachments (LPDISPATCH ctrl);
-HRESULT encryptSelection (LPDISPATCH ctrl);
-HRESULT decryptSelection (LPDISPATCH ctrl);
-HRESULT decryptBody (LPDISPATCH ctrl);
-HRESULT encryptBody (LPDISPATCH ctrl);
-HRESULT addEncSignedAttachment (LPDISPATCH ctrl);
-HRESULT addEncAttachment (LPDISPATCH ctrl);
 HRESULT getIcon (int id, VARIANT* result);
-HRESULT startCertManager (LPDISPATCH ctrl);
-HRESULT signBody (LPDISPATCH ctrl);
-HRESULT verifyBody (LPDISPATCH ctrl);
 
 /* Get the toggle state of a crypt button. Flag value 1: encrypt, 2: sign */
 HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result, bool is_explorer);

commit af65c5d0f46db05a948bc4ff6d3478354b7dd9f9
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 09:08:56 2018 +0200

    Remove unused bitmap icons
    
    * dialogs.h, dialogs.rc: Update accordingly.

diff --git a/src/dialogs.h b/src/dialogs.h
index ff6466c..be662ca 100644
--- a/src/dialogs.h
+++ b/src/dialogs.h
@@ -113,7 +113,6 @@
 #define IDI_ENCRYPT_48_PNG              0x6010
 #define IDI_DECRYPT_16_PNG              0x6020
 #define IDI_DECRYPT_48_PNG              0x6030
-#define IDI_KEY_MANAGER_64_PNG          0x6040
 #define IDI_ENCSIGN_FILE_48_PNG         0x6050
 #define IDI_SIGN_48_PNG                 0x6060
 #define IDI_VERIFY_48_PNG               0x6070
diff --git a/src/dialogs.rc b/src/dialogs.rc
index aab9831..4ee8f3b 100644
--- a/src/dialogs.rc
+++ b/src/dialogs.rc
@@ -25,31 +25,16 @@
 #include "afxres.h"
 
 
-IDB_ENCRYPT_16            BITMAP  DISCARDABLE  "icons/encrypt-16.bmp"
-IDB_ENCRYPT_16M           BITMAP  DISCARDABLE  "icons/encrypt-16m.bmp"
 IDI_ENCRYPT_16_PNG        RCDATA               "icons/encrypt-16.png"
 IDI_ENCRYPT_48_PNG        RCDATA               "icons/encrypt-48.png"
 
-IDB_SIGN_16               BITMAP  DISCARDABLE  "icons/sign-16.bmp"
-IDB_SIGN_16M              BITMAP  DISCARDABLE  "icons/sign-16m.bmp"
 IDI_SIGN_48_PNG           RCDATA               "icons/sign-48.png"
 
-IDB_KEY_MANAGER_16        BITMAP  DISCARDABLE  "icons/key-manager-16.bmp"
-IDB_KEY_MANAGER_16M       BITMAP  DISCARDABLE  "icons/key-manager-16m.bmp"
-IDI_KEY_MANAGER_64_PNG    RCDATA               "icons/key-manager-64.png"
-
-IDB_DECRYPT_16            BITMAP  DISCARDABLE  "icons/decrypt-16.bmp"
-IDB_DECRYPT_16M           BITMAP  DISCARDABLE  "icons/decrypt-16m.bmp"
 IDI_DECRYPT_16_PNG        RCDATA               "icons/decrypt-16.png"
 IDI_DECRYPT_48_PNG        RCDATA               "icons/decrypt-48.png"
 
-IDB_VERIFY_16             BITMAP  DISCARDABLE  "icons/verify-16.bmp"
-IDB_VERIFY_16M            BITMAP  DISCARDABLE  "icons/verify-16m.bmp"
 IDI_VERIFY_48_PNG         RCDATA               "icons/verify-48.png"
 
-IDB_DECRYPT_VERIFY_16     BITMAP  DISCARDABLE  "icons/decrypt-verify-16.bmp"
-IDB_DECRYPT_VERIFY_16M    BITMAP  DISCARDABLE  "icons/decrypt-verify-16m.bmp"
-
 IDI_ENCSIGN_FILE_48_PNG   RCDATA               "icons/encrypt-sign-file-48.png"
 
 IDI_LEVEL_0_ENC             RCDATA             "icons/level-0-enc.png"
diff --git a/src/icons/decrypt-16.bmp b/src/icons/decrypt-16.bmp
deleted file mode 100644
index 5bb0f10..0000000
Binary files a/src/icons/decrypt-16.bmp and /dev/null differ
diff --git a/src/icons/decrypt-16m.bmp b/src/icons/decrypt-16m.bmp
deleted file mode 100644
index f6c1fab..0000000
Binary files a/src/icons/decrypt-16m.bmp and /dev/null differ
diff --git a/src/icons/decrypt-verify-16.bmp b/src/icons/decrypt-verify-16.bmp
deleted file mode 100644
index 0b7181b..0000000
Binary files a/src/icons/decrypt-verify-16.bmp and /dev/null differ
diff --git a/src/icons/decrypt-verify-16m.bmp b/src/icons/decrypt-verify-16m.bmp
deleted file mode 100644
index 03dfd21..0000000
Binary files a/src/icons/decrypt-verify-16m.bmp and /dev/null differ
diff --git a/src/icons/encrypt-16.bmp b/src/icons/encrypt-16.bmp
deleted file mode 100644
index dedb0cb..0000000
Binary files a/src/icons/encrypt-16.bmp and /dev/null differ
diff --git a/src/icons/encrypt-16m.bmp b/src/icons/encrypt-16m.bmp
deleted file mode 100644
index cf0d3c9..0000000
Binary files a/src/icons/encrypt-16m.bmp and /dev/null differ
diff --git a/src/icons/key-manager-16.bmp b/src/icons/key-manager-16.bmp
deleted file mode 100644
index 2916624..0000000
Binary files a/src/icons/key-manager-16.bmp and /dev/null differ
diff --git a/src/icons/key-manager-16m.bmp b/src/icons/key-manager-16m.bmp
deleted file mode 100644
index 1c0af6a..0000000
Binary files a/src/icons/key-manager-16m.bmp and /dev/null differ
diff --git a/src/icons/key-manager-64.png b/src/icons/key-manager-64.png
deleted file mode 100644
index 38b7ed0..0000000
Binary files a/src/icons/key-manager-64.png and /dev/null differ
diff --git a/src/icons/kleopatra.bmp b/src/icons/kleopatra.bmp
deleted file mode 100644
index 33c075b..0000000
Binary files a/src/icons/kleopatra.bmp and /dev/null differ
diff --git a/src/icons/sign-16.bmp b/src/icons/sign-16.bmp
deleted file mode 100644
index 472be5a..0000000
Binary files a/src/icons/sign-16.bmp and /dev/null differ
diff --git a/src/icons/sign-16m.bmp b/src/icons/sign-16m.bmp
deleted file mode 100644
index e4e99e4..0000000
Binary files a/src/icons/sign-16m.bmp and /dev/null differ
diff --git a/src/icons/verify-16.bmp b/src/icons/verify-16.bmp
deleted file mode 100644
index 61f2189..0000000
Binary files a/src/icons/verify-16.bmp and /dev/null differ
diff --git a/src/icons/verify-16m.bmp b/src/icons/verify-16m.bmp
deleted file mode 100644
index 42c242d..0000000
Binary files a/src/icons/verify-16m.bmp and /dev/null differ

commit 7f07af8575c35583c5dea06696d9cdd6261e2971
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 08:59:19 2018 +0200

    Cleanup gpgol_Sources
    
    * src/Makefile.am (gpgol_SOURCES): Cleanup / sort.

diff --git a/src/Makefile.am b/src/Makefile.am
index bec04bf..2305df2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,48 +27,52 @@ AM_CXXFLAGS = $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -shared -std=c++11
 AM_CXXFLAGS += $(GPGMEPP_CXXFLAGS) -D_FILE_OFFSET_BITS=64
 
 gpgol_SOURCES = \
-	main.c  gpgol.def           \
-	resource.rc	            \
-        gpgol-ids.h                 \
-	olflange.cpp olflange.h     \
-	dialogs.h                   \
-	revert.cpp revert.h         \
-	parsetlv.h parsetlv.c \
-	mimemaker.cpp mimemaker.h     \
-	engine.c engine.h           \
-        engine-assuan.c engine-assuan.h \
-	rfc822parse.c rfc822parse.h \
+    addin-options.cpp addin-options.h \
+    application-events.cpp \
+    attachment.h attachment.cpp \
     common.h common.c \
     common_indep.h common_indep.c \
-	xmalloc.h		    \
-        config-dialog.c	            \
-	mapihelp.cpp mapihelp.h     \
-	mymapi.h  mymapitags.h      \
-	oomhelp.cpp oomhelp.h eventsink.h \
-	w32-gettext.c w32-gettext.h \
-	gpgoladdin.cpp gpgoladdin.h \
-	ribbon-callbacks.cpp ribbon-callbacks.h \
-	filetype.c filetype.h \
-	eventsinks.h application-events.cpp \
-	mailitem-events.cpp \
-	attachment.h attachment.cpp \
-	windowmessages.h windowmessages.cpp \
-	gpgolstr.h gpgolstr.cpp \
-	mail.h mail.cpp \
-	rfc2047parse.h rfc2047parse.c \
-	mlang-charset.cpp mlang-charset.h \
-	gmime-table-private.h \
-	exechelp.c exechelp.h \
-	addin-options.cpp addin-options.h \
-	parsecontroller.cpp parsecontroller.h \
-	mimedataprovider.cpp mimedataprovider.h \
-	explorer-events.cpp explorers-events.cpp \
-	cryptcontroller.cpp cryptcontroller.h \
-	cpphelp.cpp cpphelp.h \
-	wks-helper.cpp wks-helper.h \
-	overlay.cpp overlay.h \
-	keycache.cpp keycache.h
-
+    config-dialog.c \
+    cpphelp.cpp cpphelp.h \
+    cryptcontroller.cpp cryptcontroller.h \
+    dialogs.h \
+    engine-assuan.c engine-assuan.h \
+    engine.c engine.h \
+    eventsink.h \
+    eventsinks.h \
+    exechelp.c exechelp.h \
+    explorer-events.cpp \
+    explorers-events.cpp \
+    filetype.c filetype.h \
+    gmime-table-private.h \
+    gpgoladdin.cpp gpgoladdin.h \
+    gpgol.def \
+    gpgol-ids.h \
+    gpgolstr.h gpgolstr.cpp \
+    keycache.cpp keycache.h \
+    mail.h mail.cpp \
+    mailitem-events.cpp \
+    main.c \
+    mapihelp.cpp mapihelp.h \
+    mimedataprovider.cpp mimedataprovider.h \
+    mimemaker.cpp mimemaker.h \
+    mlang-charset.cpp mlang-charset.h \
+    mymapi.h \
+    mymapitags.h \
+    olflange.cpp olflange.h \
+    oomhelp.cpp oomhelp.h \
+    overlay.cpp overlay.h \
+    parsecontroller.cpp parsecontroller.h \
+    parsetlv.h parsetlv.c \
+    resource.rc \
+    revert.cpp revert.h \
+    rfc2047parse.h rfc2047parse.c \
+    rfc822parse.c rfc822parse.h \
+    ribbon-callbacks.cpp ribbon-callbacks.h \
+    w32-gettext.c w32-gettext.h \
+    windowmessages.h windowmessages.cpp \
+    wks-helper.cpp wks-helper.h \
+    xmalloc.h
 
 #treeview_SOURCES = treeview.c
 

commit 7fb4479dca4b066cad2479b49decf70b388eadb6
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu May 17 08:58:59 2018 +0200

    Remove additional OL2007 files
    
    --

diff --git a/src/session-events.cpp b/src/session-events.cpp
deleted file mode 100644
index c760adf..0000000
--- a/src/session-events.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/* session-events.cpp - Subclass impl of IExchExtSessionEvents
- * Copyright (C) 2007 g10 Code GmbH
- * 
- * This file is part of GpgOL.
- * 
- * GpgOL is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * GpgOL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <windows.h>
-
-#include "mymapi.h"
-#include "mymapitags.h"
-#include "myexchext.h"
-#include "display.h"
-#include "common.h"
-#include "msgcache.h"
-#include "engine.h"
-#include "mapihelp.h"
-
-#include "olflange-def.h"
-#include "olflange.h"
-#include "session-events.h"
-
-
-/* Wrapper around UlRelease with error checking. */
-static void 
-ul_release (LPVOID punk, const char *func, int lnr)
-{
-  ULONG res;
-  
-  if (!punk)
-    return;
-  res = UlRelease (punk);
-  if (opt.enable_debug & DBG_MEMORY)
-    log_debug ("%s:%s:%d: UlRelease(%p) had %lu references\n", 
-               SRCNAME, func, lnr, punk, res);
-}
-
-
-
-/* Our constructor.  */
-GpgolSessionEvents::GpgolSessionEvents (GpgolExt *pParentInterface)
-{ 
-  m_pExchExt = pParentInterface;
-  m_lRef = 0; 
-}
-
-
-/* The QueryInterface which does the actual subclassing.  */
-STDMETHODIMP 
-GpgolSessionEvents::QueryInterface (REFIID riid, LPVOID FAR *ppvObj)
-{   
-  *ppvObj = NULL;
-  if (riid == IID_IExchExtSessionEvents)
-    {
-      *ppvObj = (LPVOID)this;
-      AddRef();
-      return S_OK;
-    }
-  if (riid == IID_IUnknown)
-    {
-      *ppvObj = (LPVOID)m_pExchExt;  
-      m_pExchExt->AddRef();
-      return S_OK;
-    }
-  return E_NOINTERFACE;
-}
-
-
-
-/* Called from Exchange when a new message arrives.  Returns: S_FALSE
-   to signal Exchange to continue calling extensions.  PEECB is a
-   pointer to the IExchExtCallback interface. */
-STDMETHODIMP 
-GpgolSessionEvents::OnDelivery (LPEXCHEXTCALLBACK pEECB) 
-{
-  LPMDB pMDB = NULL;
-  LPMESSAGE pMessage = NULL;
-
-  log_debug ("%s:%s: received\n", SRCNAME, __func__);
-  if ( !opt.disable_gpgol )
-    {
-      pEECB->GetObject (&pMDB, (LPMAPIPROP *)&pMessage);
-      log_mapi_property (pMessage, PR_MESSAGE_CLASS,"PR_MESSAGE_CLASS");
-      /* Note, that at this point even an OpenPGP signed message has
-         the message class IPM.Note.SMIME.MultipartSigned.  If we
-         would not change the message class here, OL will change it
-         later (before an OnRead) to IPM.Note. */
-      mapi_change_message_class (pMessage, 0, NULL);
-      log_mapi_property (pMessage, PR_MESSAGE_CLASS,"PR_MESSAGE_CLASS");
-      ul_release (pMessage, __func__, __LINE__);
-      ul_release (pMDB, __func__, __LINE__);
-    }
-
-  return S_FALSE;
-}
-
diff --git a/src/session-events.h b/src/session-events.h
deleted file mode 100644
index bd68ab3..0000000
--- a/src/session-events.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* session-events.h - Definitions for out subclass of IExchExtSessionEvents
- * Copyright (C) 2007 g10 Code GmbH
- * 
- * This file is part of GpgOL.
- * 
- * GpgOL is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- * GpgOL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- * 
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef SESSION_EVENTS_H
-#define SESSION_EVENTS_H
-
-/*
-   GpgolSessionEvents 
- 
-   The GpgolSessionEvents class implements the reaction on the certain
-   session events.
- */
-class GpgolSessionEvents : public IExchExtSessionEvents
-{
-  /* Constructor. */
-public:
-  GpgolSessionEvents (GpgolExt *pParentInterface);
-  virtual ~GpgolSessionEvents () {}
-
-  /* Attributes. */
-private:
-  ULONG   m_lRef;
-  ULONG   m_lContext;
-  GpgolExt *m_pExchExt;
-  
-public:
-  STDMETHODIMP QueryInterface (REFIID riid, LPVOID *ppvObj);
-  inline STDMETHODIMP_(ULONG) AddRef (void)
-  {
-    ++m_lRef; 
-    return m_lRef; 
-  };
-  inline STDMETHODIMP_(ULONG) Release (void) 
-  {
-    ULONG lCount = --m_lRef;
-    if (!lCount) 
-      delete this;
-    return lCount;	
-  };
-
-  STDMETHODIMP OnDelivery (LPEXCHEXTCALLBACK pEECB);
-
-
-  inline void SetContext (ULONG lContext)
-  { 
-    m_lContext = lContext;
-  };
-};
-
-
-#endif /*SESSION_EVENTS_H*/

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                     |   12 -
 src/Makefile.am                  |   83 ++--
 src/addin-options.cpp            |   36 --
 src/common.h                     |    6 -
 src/common_indep.h               |    1 -
 src/dialogs.h                    |   63 ---
 src/dialogs.rc                   |  183 -------
 src/gpgoladdin.cpp               |  362 +-------------
 src/gpgolstr.cpp                 |   61 ---
 src/gpgolstr.h                   |   45 --
 src/icons/decrypt-16.bmp         |  Bin 562 -> 0 bytes
 src/icons/decrypt-16m.bmp        |  Bin 126 -> 0 bytes
 src/icons/decrypt-verify-16.bmp  |  Bin 830 -> 0 bytes
 src/icons/decrypt-verify-16m.bmp |  Bin 126 -> 0 bytes
 src/icons/encrypt-16.bmp         |  Bin 514 -> 0 bytes
 src/icons/encrypt-16m.bmp        |  Bin 126 -> 0 bytes
 src/icons/key-manager-16.bmp     |  Bin 562 -> 0 bytes
 src/icons/key-manager-16m.bmp    |  Bin 126 -> 0 bytes
 src/icons/key-manager-64.png     |  Bin 3361 -> 0 bytes
 src/icons/kleopatra.bmp          |  Bin 238 -> 0 bytes
 src/icons/sign-16.bmp            |  Bin 486 -> 0 bytes
 src/icons/sign-16m.bmp           |  Bin 126 -> 0 bytes
 src/icons/verify-16.bmp          |  Bin 790 -> 0 bytes
 src/icons/verify-16m.bmp         |  Bin 126 -> 0 bytes
 src/mail.cpp                     |    1 -
 src/main.c                       |    9 -
 src/mapihelp.cpp                 |   13 +-
 src/mimemaker.cpp                |    5 +-
 src/ribbon-callbacks.cpp         | 1019 --------------------------------------
 src/ribbon-callbacks.h           |   19 -
 src/session-events.cpp           |  112 -----
 src/session-events.h             |   67 ---
 32 files changed, 50 insertions(+), 2047 deletions(-)
 delete mode 100644 src/gpgolstr.cpp
 delete mode 100644 src/gpgolstr.h
 delete mode 100644 src/icons/decrypt-16.bmp
 delete mode 100644 src/icons/decrypt-16m.bmp
 delete mode 100644 src/icons/decrypt-verify-16.bmp
 delete mode 100644 src/icons/decrypt-verify-16m.bmp
 delete mode 100644 src/icons/encrypt-16.bmp
 delete mode 100644 src/icons/encrypt-16m.bmp
 delete mode 100644 src/icons/key-manager-16.bmp
 delete mode 100644 src/icons/key-manager-16m.bmp
 delete mode 100644 src/icons/key-manager-64.png
 delete mode 100644 src/icons/kleopatra.bmp
 delete mode 100644 src/icons/sign-16.bmp
 delete mode 100644 src/icons/sign-16m.bmp
 delete mode 100644 src/icons/verify-16.bmp
 delete mode 100644 src/icons/verify-16m.bmp
 delete mode 100644 src/session-events.cpp
 delete mode 100644 src/session-events.h


hooks/post-receive
-- 
GnuPG extension for MS Outlook
http://git.gnupg.org




More information about the Gnupg-commits mailing list