[git] GpgOL - branch, outlook14, updated. gpgol-1.1.3-22-gd501119

by Andre Heinecke cvs at cvs.gnupg.org
Thu Jul 11 21:00:23 CEST 2013


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, outlook14 has been updated
       via  d501119f6d14899bf27dfeb8eb98f54c8fa17da3 (commit)
       via  40e13e006c87d47f001c9a0dfa42fa0a6cde5294 (commit)
       via  c7552e035bdf2cba949911fb6bb72f9a6c3d55e1 (commit)
       via  0c1d76ee531268dc21346012d6bef5d52bf09777 (commit)
       via  a8ec27515b34aeecbf00393db6a2f54f073b88c8 (commit)
       via  a0aee83e9a355b32b6a1c952a0391d08039f0256 (commit)
       via  984364ac4b150c39c4073f8dd70c238c2353aecf (commit)
      from  e928b6fee0ffa319e4c8d13faf1eda09a0aab302 (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 d501119f6d14899bf27dfeb8eb98f54c8fa17da3
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 18:11:49 2013 +0000

    Implement start certificate manager
    
        Simple wrapper for engine_start_keymanager using the callback
        interface.
    
        * src/gpgoladdin.cpp (GetIDsOfNames, Invoke): Handle
        startCertManager.
        * src/ribbon-callbacks.cpp, src/ribbon-callbacks.h
        (startCertManager): New.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 080fb48..77ec44c 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -433,6 +433,7 @@ GpgolRibbonExtender::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
       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)
@@ -472,6 +473,8 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
         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_BTN_CERTMANAGER:
         return getIcon (ID_BTN_CERTMANAGER, ICON_SIZE_LARGE, result);
       case ID_BTN_ENCRYPT:
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 62d0ab7..d1b6224 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -692,3 +692,29 @@ getIcon (int id, int size, VARIANT* result)
 
   return S_OK;
 }
+
+HRESULT
+startCertManager (LPDISPATCH ctrl)
+{
+  HRESULT hr;
+  LPDISPATCH context;
+  HWND curWindow;
+  LPOLEWINDOW actExplorer;
+
+  hr = getContext (ctrl, &context);
+  if (FAILED(hr))
+      return hr;
+
+  actExplorer = (LPOLEWINDOW) get_oom_object(context,
+                                             "Application.ActiveExplorer");
+  if (actExplorer)
+    actExplorer->GetWindow (&curWindow);
+  else
+    {
+      log_debug ("%s:%s: Could not find active window",
+                 SRCNAME, __func__);
+      curWindow = NULL;
+    }
+
+  engine_start_keymanager (curWindow);
+}
diff --git a/src/ribbon-callbacks.h b/src/ribbon-callbacks.h
index 3eed831..bf869a9 100644
--- a/src/ribbon-callbacks.h
+++ b/src/ribbon-callbacks.h
@@ -29,6 +29,7 @@
 #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_BTN_CERTMANAGER       IDB_KEY_MANAGER_32
 #define ID_BTN_DECRYPT           IDB_DECRYPT_16
 #define ID_BTN_DECRYPT_LARGE     IDB_DECRYPT_32
@@ -38,4 +39,5 @@ HRESULT decryptAttachments (LPDISPATCH ctrl);
 HRESULT encryptSelection (LPDISPATCH ctrl);
 HRESULT decryptSelection (LPDISPATCH ctrl);
 HRESULT getIcon (int id, int size, VARIANT* result);
+HRESULT startCertManager (LPDISPATCH ctrl);
 #endif

commit 40e13e006c87d47f001c9a0dfa42fa0a6cde5294
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 18:03:02 2013 +0000

    Add decrypt selection to reader context
    
        * src/gpgoladdin.cpp (GetCustomUI): Add context menu actions
        * src/ribbon-callbacks.cpp (decryptSelection): Show MessageBox
        with text in case the selected Text can not be set.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 26bd0db..080fb48 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -505,7 +505,6 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
 
   log_debug ("%s:%s: GetCustomUI for id: %S", SRCNAME, __func__, RibbonID);
 
-
   if (!RibbonXml)
     return E_POINTER;
 
@@ -532,17 +531,16 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
       swprintf (buffer,
         L"<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
         L"<contextMenus>"
-        L"<contextMenu idMso=\"ContextMenuText\">"
-        L" <button id=\"encryptButton\""
+        L"<contextMenu idMso=\"ContextMenuReadOnlyMailText\">"
+        L" <button id=\"decryptReadButton\""
         L"         label=\"%S\""
-        L"         onAction=\"encryptSelection\"/>"
+        L"         onAction=\"decryptSelection\"/>"
         L" </contextMenu>"
         L"</contextMenus>"
-        L"</customUI>", _("Encrypt"));
+        L"</customUI>", _("Decrypt"));
     }
-  else /*if (!wcscmp (RibbonID, L"Microsoft.Outlook.Explorer")) */
+  else if (!wcscmp (RibbonID, L"Microsoft.Outlook.Explorer"))
     {
-     // *RibbonXml = loadXMLResource (IDR_XML_EXPLORER);
       swprintf (buffer,
         L"<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
         L" <ribbon>"
@@ -574,6 +572,15 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
         L"  </contextualTabs>"
         L" </ribbon>"
         L" <contextMenus>"
+        /*
+           There appears to be no way to access the word editor
+           / get the selected text from that Context.
+        L" <contextMenu idMso=\"ContextMenuReadOnlyMailText\">"
+        L" <button id=\"decryptReadButton1\""
+        L"         label=\"%S\""
+        L"         onAction=\"decryptSelection\"/>"
+        L" </contextMenu>"
+        */
         L" <contextMenu idMso=\"ContextMenuAttachments\">"
         L"   <button id=\"gpgol_decrypt\""
         L"           label=\"%S\""
@@ -583,7 +590,8 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
         L" </contextMenus>"
         L"</customUI>",
         _("GpgOL"), _("General"), _("Start Certificate Manager"),
-        _("GpgOL"), _("Save and decrypt"), _("Save and decrypt"));
+        _("GpgOL"), _("Save and decrypt"),/*_("Decrypt"), */
+        _("Save and decrypt"));
     }
 
   if (wcslen (buffer))
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 5dbcd4c..62d0ab7 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -261,9 +261,6 @@ encryptSelection (LPDISPATCH ctrl)
 
   if (tmpStat.cbSize.QuadPart > UINT_MAX)
     {
-      MessageBox (curWindow, _("GpgOL"),
-                  "Selected text too long.",
-                  MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: No one should write so large mails.",
                  SRCNAME, __func__);
       goto failure;
@@ -569,9 +566,6 @@ decryptSelection (LPDISPATCH ctrl)
 
   if (tmpStat.cbSize.QuadPart > UINT_MAX)
     {
-      MessageBox (curWindow, _("GpgOL"),
-                  "Selected text too long.",
-                  MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: No one should write so large mails.",
                  SRCNAME, __func__);
       goto failure;
@@ -602,8 +596,14 @@ decryptSelection (LPDISPATCH ctrl)
       }
     if (strlen (buffer) > 1)
       {
-        /* Now replace the selection with the encrypted text */
-        put_oom_string (selection, "Text", buffer);
+        /* Now replace the selection with the encrypted or show it
+        somehow.*/
+        if (put_oom_string (selection, "Text", buffer))
+          {
+            MessageBox (NULL, buffer,
+                        _("Plain text"),
+                        MB_ICONINFORMATION|MB_OK);
+          }
       }
     else
       {

commit c7552e035bdf2cba949911fb6bb72f9a6c3d55e1
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 16:42:52 2013 +0000

    Encapsulate SMIME data in the message
    
        This adds the same BEGIN and END lines as gnupg adds
        when using the armor option.
    
        * src/ribbon-callbacks.cpp (encrypt_selection): Encapsulate
        encrypted data

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index aa55808..5dbcd4c 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -209,7 +209,7 @@ encryptSelection (LPDISPATCH ctrl)
       }
 
     if ((rc=engine_encrypt_prepare (filter, curWindow,
-                                    protocol,
+                                    PROTOCOL_UNKNOWN,
                                     0 /* ENGINE_FLAG_SIGN_FOLLOWS */,
                                     senderAddr, recipientAddrs, &protocol)))
       {
@@ -295,7 +295,18 @@ encryptSelection (LPDISPATCH ctrl)
     if (strlen (buffer) > 1)
       {
         /* Now replace the selection with the encrypted text */
-        put_oom_string (selection, "Text", buffer);
+        if (protocol == PROTOCOL_SMIME)
+          {
+            unsigned int enclosedSize = strlen (buffer) + 34 + 31 + 1;
+            char enclosedData[enclosedSize];
+            snprintf (enclosedData, sizeof enclosedData,
+                      "-----BEGIN ENCRYPTED MESSAGE-----\n"
+                      "%s"
+                      "-----END ENCRYPTED MESSAGE-----\n", buffer);
+            put_oom_string (selection, "Text", enclosedData);
+          }
+        else
+          put_oom_string (selection, "Text", buffer);
       }
     else
       {

commit 0c1d76ee531268dc21346012d6bef5d52bf09777
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 16:40:59 2013 +0000

    Fix crash in decryptAttachments
    
        If the save file dialog was aborted it crashed.
    
        * src/ribbon-callbacks.cpp (decryptAttachments): Continue
        if get_save_file_name returns NULL.

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 3d1ced0..aa55808 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -387,6 +387,9 @@ decryptAttachments (LPDISPATCH ctrl)
         filenames[i-1] = get_save_filename (NULL, filename);
         xfree (filename);
 
+        if (!filenames [i-1])
+          continue;
+
         wcsOutFilename = utf8_to_wchar2 (filenames[i-1],
                                          strlen(filenames[i-1]));
         saveParams.rgvarg[0].bstrVal = SysAllocString (wcsOutFilename);

commit a8ec27515b34aeecbf00393db6a2f54f073b88c8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 16:39:05 2013 +0000

    Change some user visible strings
    
        * src/ribbon-callbacks.cpp: Change wording in some Messages.
        Do not localize very unlikely errors.

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 666eb17..3d1ced0 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -114,8 +114,8 @@ encryptSelection (LPDISPATCH ctrl)
       !sender || !recipients)
     {
       MessageBox (NULL,
-                  _("Internal error in GpgOL.\n"
-                    "Could not find all objects."),
+                  "Internal error in GpgOL.\n"
+                  "Could not find all objects.",
                   _("GpgOL"),
                   MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: Could not find all objects.",
@@ -129,7 +129,7 @@ encryptSelection (LPDISPATCH ctrl)
     {
       /* TODO more usable if we just use all text in this case? */
       MessageBox (NULL,
-                  _("Please select some text for encryption."),
+                  _("Please select text to encrypt."),
                   _("GpgOL"),
                   MB_ICONINFORMATION|MB_OK);
       return S_OK;
@@ -159,7 +159,7 @@ encryptSelection (LPDISPATCH ctrl)
   if (!recipientsCnt)
     {
       MessageBox (NULL,
-                  _("Please enter the recipent of the encrypted text first."),
+                  _("Please add at least one recipent."),
                   _("GpgOL"),
                   MB_ICONINFORMATION|MB_OK);
       return S_OK;
@@ -262,7 +262,7 @@ encryptSelection (LPDISPATCH ctrl)
   if (tmpStat.cbSize.QuadPart > UINT_MAX)
     {
       MessageBox (curWindow, _("GpgOL"),
-                  _("Selected text too long."),
+                  "Selected text too long.",
                   MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: No one should write so large mails.",
                  SRCNAME, __func__);
@@ -470,8 +470,8 @@ decryptSelection (LPDISPATCH ctrl)
   if (!wordEditor || !wordApplication || !selection)
     {
       MessageBox (NULL,
-                  _("Internal error in GpgOL.\n"
-                    "Could not find all objects."),
+                  "Internal error in GpgOL.\n"
+                    "Could not find all objects.",
                   _("GpgOL"),
                   MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: Could not find all objects.",
@@ -521,7 +521,7 @@ decryptSelection (LPDISPATCH ctrl)
   decsink->writefnc = sink_encryption_write;
 
   engine_set_session_number (filter, session_number);
-  engine_set_session_title (filter, _("Decrypt Selection"));
+  engine_set_session_title (filter, _("Decrypt"));
 
   if ((rc=engine_decrypt_start (filter, curWindow,
                                 protocol,
@@ -556,7 +556,7 @@ decryptSelection (LPDISPATCH ctrl)
   if (tmpStat.cbSize.QuadPart > UINT_MAX)
     {
       MessageBox (curWindow, _("GpgOL"),
-                  _("Selected text too long."),
+                  "Selected text too long.",
                   MB_ICONINFORMATION|MB_OK);
       log_error ("%s:%s: No one should write so large mails.",
                  SRCNAME, __func__);

commit a0aee83e9a355b32b6a1c952a0391d08039f0256
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 16:32:03 2013 +0000

    Localize ribbon UI
    
        Using swprintf we can directly use gettext strings to include
        UTF-8 encoded strings in the CustomUI XML code.
    
        * src/gpgoladdin.cpp (getCustomUI): Add gettext usage.
        (loadXMLResource): Removed.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index bfe16d9..26bd0db 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -487,39 +487,6 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
   return DISP_E_MEMBERNOTFOUND;
 }
 
-BSTR
-loadXMLResource (int id)
-{
-  /* XXX I do not know how to get the handle of the currently
-     executed code as we never had a chance in DllMain to save
-     that handle. */
-
-  /* FIXME this does not work as intended */
-  HMODULE hModule = GetModuleHandle("gpgol.dll");
-
-  HRSRC hRsrc = FindResourceEx (hModule, MAKEINTRESOURCE(id), TEXT("XML"),
-                                MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
-
-  if (!hRsrc)
-    {
-      log_error_w32 (-1, "%s:%s: FindResource(%d) failed\n",
-                     SRCNAME, __func__, id);
-      return NULL;
-    }
-
-  HGLOBAL hGlobal = LoadResource(hModule, hRsrc);
-
-  if (!hGlobal)
-    {
-      log_error_w32 (-1, "%s:%s: LoadResource(%d) failed\n",
-                     SRCNAME, __func__, id);
-      return NULL;
-    }
-
-  LPVOID xmlData = LockResource (hGlobal);
-
-  return SysAllocString (reinterpret_cast<OLECHAR*>(xmlData));
-}
 
 /* Returns the XML markup for the various RibbonID's
 
@@ -532,62 +499,62 @@ loadXMLResource (int id)
 STDMETHODIMP
 GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
 {
-  /* TODO use callback for label's and Icons, load xml from resource */
+  wchar_t buffer[4096];
+
+  memset(buffer, 0, sizeof buffer);
+
   log_debug ("%s:%s: GetCustomUI for id: %S", SRCNAME, __func__, RibbonID);
 
+
   if (!RibbonXml)
     return E_POINTER;
 
   if (!wcscmp (RibbonID, L"Microsoft.Outlook.Mail.Compose"))
     {
-      *RibbonXml = SysAllocString (
+      swprintf (buffer,
         L"<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
         L"<contextMenus>"
         L"<contextMenu idMso=\"ContextMenuText\">"
         L" <button id=\"encryptButton\""
-        L"         label=\"Encrypt Text\""
+        L"         label=\"%S\""
         L"         getImage=\"btnEncrypt\""
         L"         onAction=\"encryptSelection\"/>"
         L" <button id=\"decryptButton\""
-        L"         label=\"Decrypt Selection\""
+        L"         label=\"%S\""
         L"         getImage=\"btnDecrypt\""
         L"         onAction=\"decryptSelection\"/>"
         L" </contextMenu>"
         L"</contextMenus>"
-        L"</customUI>"
-      );
+        L"</customUI>", _("Encrypt"), _("Decrypt"));
     }
   else if (!wcscmp (RibbonID, L"Microsoft.Outlook.Mail.Read"))
     {
-      *RibbonXml = SysAllocString (
+      swprintf (buffer,
         L"<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
         L"<contextMenus>"
         L"<contextMenu idMso=\"ContextMenuText\">"
         L" <button id=\"encryptButton\""
-        L"         label=\"Encrypt Text\""
+        L"         label=\"%S\""
         L"         onAction=\"encryptSelection\"/>"
         L" </contextMenu>"
         L"</contextMenus>"
-        L"</customUI>"
-      );
-
+        L"</customUI>", _("Encrypt"));
     }
-
   else /*if (!wcscmp (RibbonID, L"Microsoft.Outlook.Explorer")) */
     {
      // *RibbonXml = loadXMLResource (IDR_XML_EXPLORER);
-      *RibbonXml = SysAllocString (
+      swprintf (buffer,
         L"<customUI xmlns=\"http://schemas.microsoft.com/office/2009/07/customui\">"
         L" <ribbon>"
         L"   <tabs>"
         L"    <tab id=\"gpgolTab\""
-        L"         label=\"GnuPG\">"
+        L"         label=\"%S\">"
         L"     <group id=\"general\""
-        L"            label=\"Allgemein\">"
+        L"            label=\"%S\">"
         L"       <button id=\"CustomButton\""
         L"               getImage=\"btnCertManager\""
         L"               size=\"large\""
-        L"               label=\"Zertifikatsverwaltung\""
+        L"               label=\"%S\""
         L"               onAction=\"startCertManager\"/>"
         L"     </group>"
         L"    </tab>"
@@ -595,10 +562,10 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
         L"  <contextualTabs>"
         L"    <tabSet idMso=\"TabSetAttachments\">"
         L"        <tab idMso=\"TabAttachments\">"
-        L"            <group label=\"GnuPG\" id=\"gnupgLabel\">"
+        L"            <group label=\"%S\" id=\"gnupgLabel\">"
         L"                <button id=\"gpgol_contextual_decrypt\""
         L"                    size=\"large\""
-        L"                    label=\"Save and decrypt\""
+        L"                    label=\"%S\""
         L"                    getImage=\"btnDecryptLarge\""
         L"                    onAction=\"attachmentDecryptCallback\" />"
         L"            </group>"
@@ -609,14 +576,20 @@ GpgolRibbonExtender::GetCustomUI (BSTR RibbonID, BSTR * RibbonXml)
         L" <contextMenus>"
         L" <contextMenu idMso=\"ContextMenuAttachments\">"
         L"   <button id=\"gpgol_decrypt\""
-        L"           label=\"Save and decrypt\""
+        L"           label=\"%S\""
         L"           getImage=\"btnDecrypt\""
         L"           onAction=\"attachmentDecryptCallback\"/>"
         L" </contextMenu>"
         L" </contextMenus>"
-        L"</customUI>"
-        );
+        L"</customUI>",
+        _("GpgOL"), _("General"), _("Start Certificate Manager"),
+        _("GpgOL"), _("Save and decrypt"), _("Save and decrypt"));
     }
 
+  if (wcslen (buffer))
+    *RibbonXml = SysAllocString (buffer);
+  else
+    *RibbonXml = NULL;
+
   return S_OK;
 }

commit 984364ac4b150c39c4073f8dd70c238c2353aecf
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Jul 11 16:30:00 2013 +0000

    Handle OnDisconnect call
    
        * src/gpgoladdin.cpp (OnDisconnect): Delete gpgolext object
        * src/olflange.cpp (~GpgolExt): Shutdown also in case there
        is no context set.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 807e5a6..bfe16d9 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -243,6 +243,10 @@ GpgolAddin::OnDisconnection (ext_DisconnectMode RemoveMode,
                              SAFEARRAY** custom)
 {
   (void)custom;
+  (void)RemoveMode;
+  /* Deleting the extension causes everything to be cleaned up */
+  delete m_gpgolext;
+
   return S_OK;
 }
 
diff --git a/src/olflange.cpp b/src/olflange.cpp
index e51521e..109c6a7 100644
--- a/src/olflange.cpp
+++ b/src/olflange.cpp
@@ -577,7 +577,7 @@ GpgolExt::~GpgolExt (void)
 //   if (m_pOutlookExtItemEvents)
 //     m_pOutlookExtItemEvents->Release ();
 
-  if (m_lContext == EECONTEXT_SESSION)
+  if (m_lContext == EECONTEXT_SESSION || !m_lContext)
     {
       if (g_initdll)
         {

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

Summary of changes:
 src/gpgoladdin.cpp       |  106 ++++++++++++++++++++-------------------------
 src/olflange.cpp         |    2 +-
 src/ribbon-callbacks.cpp |   74 +++++++++++++++++++++++++-------
 src/ribbon-callbacks.h   |    2 +
 4 files changed, 107 insertions(+), 77 deletions(-)


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




More information about the Gnupg-commits mailing list