[git] GpgOL - branch, master, updated. gpgol-1.2.0-66-gdb829bd

by Andre Heinecke cvs at cvs.gnupg.org
Thu Oct 15 17:40:26 CEST 2015


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  db829bd34a6372a734f7ebe669f410cf5b7c9f96 (commit)
       via  9d1b85f5be3ee56a3d89b26cb85cf75bbc4921d3 (commit)
       via  1bab2eba47249b258759ad7d897ef96e76bb9557 (commit)
       via  f8d0d2a70238f39f4bc7c07819bc1c864ba8352f (commit)
       via  5d674036b79dfe53bde846f60e6fa58359f96e1a (commit)
       via  6e5205941ce0bfa312454a9bb810ea88c69550ba (commit)
       via  0f0122066f7f76cb795596a028300906239e3b0b (commit)
      from  d298cda7e18a252ecb97837a779df129d885c263 (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 db829bd34a6372a734f7ebe669f410cf5b7c9f96
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 17:15:36 2015 +0200

    Add information to body of encrypted messages
    
    * src/mailitem-events.cpp (HTML_TEMPLATE): A message to be shown in
      the body of encrypted messages. Will become a template for l10n
      later.
    * src/mailitem-events.cpp (Invoke): Use the message to wipe the body.
      (handle_read): Use the message in case of failed decryption.
    
    --
    This message is whats shown for processed messages that are stored.
    E.g. If you access them with another client or if gpgol is uninstalled
    or deactivated.

diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp
index e4f6044..2c002b2 100644
--- a/src/mailitem-events.cpp
+++ b/src/mailitem-events.cpp
@@ -30,10 +30,34 @@
 #include "gpgoladdin.h"
 #include "windowmessages.h"
 
-/* TODO Add a proper / l10n encrypted thing message. */
-static const char * ENCRYPTED_MESSAGE_BODY = \
-"This message is encrypted. Please install or activate GpgOL"\
-" to decrypt this message.";
+
+/* TODO: Localize this once it is less bound to change.
+   TODO: Use a dedicated message for failed decryption. */
+#define HTML_TEMPLATE  \
+"<html><head></head><body>" \
+"<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"1\" bgcolor=\"#0069cc\">" \
+"<tr>" \
+"<td bgcolor=\"#0080ff\">" \
+"<p><span style=\"font-weight:600; background-color:#0080ff;\"><center>This message is encrypted</center><span></p></td></tr>" \
+"<tr>" \
+"<td bgcolor=\"#e0f0ff\">" \
+"<center>" \
+"<br/>You can decrypt this message with GnuPG" \
+"<br/>Open this message to decrypt it." \
+"<br/>Opening any attachments while this message is shown will only give you access to encrypted data. </center>" \
+"<br/><br/>If you have GpgOL (The GnuPG Outlook plugin installed) this message should have been automatically decrypted." \
+"<br/>Reasons that you still see this message can be: " \
+"<ul>" \
+"<li>Decryption failed: <ul><li> Refer to the Decrypt / Verify popup window for details.</li></ul></li>" \
+"<li>Outlook tried to save the decrypted content:" \
+" <ul> "\
+" <li>To protect your data GpgOL encrypts a message when it is saved by Outlook.</li>" \
+" <li>You will need to restart Outlook to allow GpgOL to decrypt this message again.</li>" \
+" </ul>" \
+"<li>GpgOL is not activated: <ul><li>Check under Options -> Add-Ins -> COM-Add-Ins to see if this is the case.</li></ul></li>" \
+"</ul>"\
+"</td></tr>" \
+"</table></body></html>"
 
 typedef enum
   {
@@ -124,6 +148,7 @@ MailItemEvents::handle_read()
     {
       log_error ("%s:%s: Failed to get body attachment of \n",
                  SRCNAME, __func__);
+      put_oom_string (m_object, "HTMLBody", HTML_TEMPLATE);
       goto done;
     }
   if (put_oom_string (m_object, is_html ? "HTMLBody" : "Body", body))
@@ -335,8 +360,7 @@ EVENT_SINK_INVOKE(MailItemEvents)
               log_debug ("%s:%s: Message %p removing plaintext from Message.",
                          SRCNAME, __func__, m_object);
               if (put_oom_string (m_object, "HTMLBody",
-                                  ENCRYPTED_MESSAGE_BODY) ||
-                  put_oom_string (m_object, "Body", ENCRYPTED_MESSAGE_BODY) ||
+                                  HTML_TEMPLATE) ||
                   protect_attachments (m_object))
                 {
                   /* An error cleaning the mail should not happen normally.

commit 9d1b85f5be3ee56a3d89b26cb85cf75bbc4921d3
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 15:14:13 2015 +0200

    Improve TRACEPOINT macro.
    
    * src/util.h (TRACEPOINT): Remove the while loop.
    
    --
    Now you can write TRACEPOINT or TRACEPOINT;
    I find this better.

diff --git a/src/util.h b/src/util.h
index d950163..88ff7bd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -100,9 +100,8 @@ void log_window_hierarchy (HWND window, const char *fmt,
 const char *log_srcname (const char *s);
 #define SRCNAME log_srcname (__FILE__)
 
-#define TRACEPOINT do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                      } while (0)
+#define TRACEPOINT log_debug ("%s:%s:%d: tracepoint\n", \
+                              SRCNAME, __func__, __LINE__);
 
 const char *get_log_file (void);
 void set_log_file (const char *name);

commit 1bab2eba47249b258759ad7d897ef96e76bb9557
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 15:08:04 2015 +0200

    Use UTF8 in addin localization.
    
    * src/w32-gettext.c, src/w32-gettext.h (utf8_gettext): New.
      gettext that returns UTF8.
    * src/w32-gettext.c (internal_gettext): Helper that can return
      either UTF8 or native encoding.
    * src/gpgoladdin.cpp: Use UTF8 gettext variants.
    
    --
    Using native encoding is always problematic on Windows and should
    be avoided. Native encoding can't represent Unicode and conversions
    to wchar are bound to lose data. This usually breaks in a lot of ways
    with Unicode filenames etc.
    
    I like to use UTF8 internally for all strings and convert them to
    UTF 16 (wchar) for Windows API use.
    
    For compatibility reasons (not to break the old Exchange Extension)
    the default gettext still returns native encoding and you have to
    redefine _ to get the utf8 gettext.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 6ea4c21..2b59f51 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -52,6 +52,10 @@
 #define ICON_SIZE_LARGE  32
 #define ICON_SIZE_NORMAL 16
 
+/* We use UTF-8 internally. */
+#undef _
+#define _(a) utf8_gettext (a)
+
 ULONG addinLocks = 0;
 
 /* This is the main entry point for the addin
diff --git a/src/w32-gettext.c b/src/w32-gettext.c
index f27f48b..a073bc4 100644
--- a/src/w32-gettext.c
+++ b/src/w32-gettext.c
@@ -1554,7 +1554,7 @@ native_to_utf8 (const char *string)
 
 
 static const char*
-get_string (struct loaded_domain *domain, u32 idx)
+get_string (struct loaded_domain *domain, u32 idx, int utf8)
 {
   struct overflow_space_s *os;
   char *p;
@@ -1568,7 +1568,7 @@ get_string (struct loaded_domain *domain, u32 idx)
       domain->mapped[idx] = 1;
 
       plen = strlen (p);
-      buf = utf8_to_native (p);
+      buf = utf8 ? strdup (p) : utf8_to_native (p);
       buflen = strlen (buf);
       if (buflen <= plen)
         strcpy (p, buf);
@@ -1690,14 +1690,13 @@ bindtextdomain (const char *domainname, const char *dirname)
   return (char*)dirname;
 }
 
-
-const char *
-gettext (const char *msgid)
+static const char *
+internal_gettext (const char *msgid, int utf8)
 {
   struct loaded_domain *domain;
   size_t act = 0;
   size_t top, bottom;
-  
+
   if (!(domain = the_domain))
     goto not_found;
 
@@ -1712,38 +1711,38 @@ gettext (const char *msgid)
       u32 nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]);
 
       if (!nstr)
-	/* Hash table entry is empty.  */
-	goto not_found;
+        /* Hash table entry is empty.  */
+        goto not_found;
 
       if (SWAPIT (domain->must_swap,
-		  domain->orig_tab[nstr - 1].length) == len
-	  && !strcmp (msgid,
-		      domain->data
-		      + SWAPIT (domain->must_swap,
-				domain->orig_tab[nstr - 1].offset)))
-	return get_string (domain, nstr - 1);
-      
-	for(;;)
-	  {
-	    if (idx >= domain->hash_size - incr)
-	      idx -= domain->hash_size - incr;
-	    else
-	      idx += incr;
-
-	    nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]);
-	    if (!nstr)
-	      /* Hash table entry is empty.  */
-	      goto not_found;
-
-	    if (SWAPIT (domain->must_swap,
-			domain->orig_tab[nstr - 1].length) == len
-		&& !strcmp (msgid,
-			    domain->data
-			    + SWAPIT (domain->must_swap,
-				      domain->orig_tab[nstr - 1].offset)))
-	      return get_string (domain, nstr-1);
-	  }
-	/* NOTREACHED */
+                  domain->orig_tab[nstr - 1].length) == len
+          && !strcmp (msgid,
+                      domain->data
+                      + SWAPIT (domain->must_swap,
+                                domain->orig_tab[nstr - 1].offset)))
+        return get_string (domain, nstr - 1, utf8);
+
+        for(;;)
+          {
+            if (idx >= domain->hash_size - incr)
+              idx -= domain->hash_size - incr;
+            else
+              idx += incr;
+
+            nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]);
+            if (!nstr)
+              /* Hash table entry is empty.  */
+              goto not_found;
+
+            if (SWAPIT (domain->must_swap,
+                        domain->orig_tab[nstr - 1].length) == len
+                && !strcmp (msgid,
+                            domain->data
+                            + SWAPIT (domain->must_swap,
+                                      domain->orig_tab[nstr - 1].offset)))
+              return get_string (domain, nstr-1, utf8);
+          }
+        /* NOTREACHED */
     }
 
   /* Now we try the default method: binary search in the sorted array
@@ -1756,19 +1755,33 @@ gettext (const char *msgid)
 
       act = (bottom + top) / 2;
       cmp_val = strcmp(msgid, domain->data
-		       + SWAPIT (domain->must_swap,
-				 domain->orig_tab[act].offset));
+                       + SWAPIT (domain->must_swap,
+                                 domain->orig_tab[act].offset));
       if (cmp_val < 0)
-	top = act;
+        top = act;
       else if (cmp_val > 0)
-	bottom = act + 1;
+        bottom = act + 1;
       else
-	return get_string (domain, act);
+        return get_string (domain, act, utf8);
     }
  not_found:
   return msgid;
 }
 
+/** Get the localized string for msgid in the native 8 bit codepage. */
+const char *
+gettext (const char *msgid)
+{
+  return internal_gettext (msgid, 0);
+}
+
+/** Get the localized string for msgid as utf8 encoded value. */
+const char *
+utf8_gettext (const char *msgid)
+{
+  return internal_gettext (msgid, 1);
+}
+
 
 char *
 textdomain (const char *domainname)
diff --git a/src/w32-gettext.h b/src/w32-gettext.h
index 2fbbb03..9ef5525 100644
--- a/src/w32-gettext.h
+++ b/src/w32-gettext.h
@@ -30,6 +30,7 @@
 char *bindtextdomain (const char *domainname, const char *dirname);
 
 const char *gettext (const char *msgid);
+const char *utf8_gettext (const char *msgid);
 
 char *textdomain (const char *domainname);
 

commit f8d0d2a70238f39f4bc7c07819bc1c864ba8352f
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 14:32:33 2015 +0200

    Only define TRACEPOINT macro once.
    
    * src/util.h (TRACEPOINT): Define here.
    * src/attached-file-events.cpp,
      src/engine-assuan.c,
      src/engine.c,
      src/ext-commands.cpp,
      src/item-events.cpp,
      src/mapihelp.cpp,
      src/message-events.cpp,
      src/message.cpp,
      src/mimemaker.c,
      src/mimeparser.c,
      src/olflange.cpp,
      src/passphrase-dialog.c,
      src/property-sheets.cpp,
      src/recipient-dialog.c,
      src/revert.cpp,
      src/session-events.cpp,
      src/user-events.cpp: Remove unused macro.
    * src/gpgoladdin.cpp: Switch to new macro without useless braces.

diff --git a/src/attached-file-events.cpp b/src/attached-file-events.cpp
index d7bbdd4..6ae4f0b 100644
--- a/src/attached-file-events.cpp
+++ b/src/attached-file-events.cpp
@@ -32,10 +32,6 @@
 #include "serpent.h"
 #include "attached-file-events.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 #define COPYBUFFERSIZE 4096
 
 /* Copy STREAM to a new file FILENAME while decrypting it using the
diff --git a/src/engine-assuan.c b/src/engine-assuan.c
index 2cf1837..86207c3 100644
--- a/src/engine-assuan.c
+++ b/src/engine-assuan.c
@@ -33,11 +33,6 @@
 #include "engine-assuan.h"
 #include "util.h"
 
-
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                       SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 /* Debug macros.  */
 #define debug_ioworker        (opt.enable_debug & DBG_IOWORKER)
 #define debug_ioworker_extra  (opt.enable_debug & DBG_IOWORKER_EXTRA)
diff --git a/src/engine.c b/src/engine.c
index c5b9088..73e20b6 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -36,10 +36,6 @@
 #define FILTER_BUFFER_SIZE (128*1024)
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                       SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 #define debug_filter        (opt.enable_debug & DBG_FILTER)
 #define debug_filter_extra  (opt.enable_debug & DBG_FILTER_EXTRA)
 
diff --git a/src/ext-commands.cpp b/src/ext-commands.cpp
index 85feb2d..0411cf0 100644
--- a/src/ext-commands.cpp
+++ b/src/ext-commands.cpp
@@ -45,11 +45,6 @@
 #include "explorers.h"
 #include "inspectors.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 /* Keep copies of some bitmaps.  */
 static int bitmaps_initialized;
 static HBITMAP my_check_bitmap, my_uncheck_bitmap;
diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 3b03bdf..6ea4c21 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -49,10 +49,6 @@
 #include "eventsink.h"
 #include "windowmessages.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 #define ICON_SIZE_LARGE  32
 #define ICON_SIZE_NORMAL 16
 
@@ -278,7 +274,7 @@ STDMETHODIMP
 GpgolAddin::OnStartupComplete (SAFEARRAY** custom)
 {
   (void)custom;
-  TRACEPOINT();
+  TRACEPOINT;
 
   install_forms ();
 
@@ -303,7 +299,7 @@ STDMETHODIMP
 GpgolAddin::OnBeginShutdown (SAFEARRAY * * custom)
 {
   (void)custom;
-  TRACEPOINT();
+  TRACEPOINT;
   return S_OK;
 }
 
@@ -311,7 +307,7 @@ STDMETHODIMP
 GpgolAddin::GetTypeInfoCount (UINT *r_count)
 {
   *r_count = 0;
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return S_OK;
 }
 
@@ -322,7 +318,7 @@ GpgolAddin::GetTypeInfo (UINT iTypeInfo, LCID lcid,
   (void)iTypeInfo;
   (void)lcid;
   (void)r_typeinfo;
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return S_OK;
 }
 
@@ -336,7 +332,7 @@ GpgolAddin::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
   (void)cNames;
   (void)lcid;
   (void)rgDispId;
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return E_NOINTERFACE;
 }
 
@@ -346,7 +342,7 @@ GpgolAddin::Invoke (DISPID dispid, REFIID riid, LCID lcid,
                     EXCEPINFO *exepinfo, UINT *argerr)
 {
   USE_INVOKE_ARGS
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return DISP_E_MEMBERNOTFOUND;
 }
 
@@ -395,7 +391,7 @@ STDMETHODIMP
 GpgolRibbonExtender::GetTypeInfoCount (UINT *r_count)
 {
   *r_count = 0;
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return S_OK;
 }
 
@@ -406,7 +402,7 @@ GpgolRibbonExtender::GetTypeInfo (UINT iTypeInfo, LCID lcid,
   (void)iTypeInfo;
   (void)lcid;
   (void)r_typeinfo;
-  TRACEPOINT(); /* Should not happen */
+  TRACEPOINT; /* Should not happen */
   return S_OK;
 }
 
diff --git a/src/item-events.cpp b/src/item-events.cpp
index 7ac0cae..36305f0 100644
--- a/src/item-events.cpp
+++ b/src/item-events.cpp
@@ -35,10 +35,6 @@
 #include "display.h"
 #include "item-events.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 
 /* Wrapper around UlRelease with error checking. */
 static void 
diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 361f24a..fed0848 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -41,11 +41,6 @@
 #endif
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 static int get_attach_method (LPATTACH obj);
 static int has_smime_filename (LPATTACH obj);
 static char *get_attach_mime_tag (LPATTACH obj);
diff --git a/src/message-events.cpp b/src/message-events.cpp
index 940b08f..fe6e72e 100644
--- a/src/message-events.cpp
+++ b/src/message-events.cpp
@@ -40,11 +40,6 @@
 #include "explorers.h"
 #include "inspectors.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 
 /* Wrapper around UlRelease with error checking. */
 static void 
diff --git a/src/message.cpp b/src/message.cpp
index c36e7fc..9344246 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -33,10 +33,6 @@
 #include "message.h"
 #include "gpgolstr.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 
 /* Wrapper around UlRelease with error checking. */
 static void 
diff --git a/src/mimemaker.c b/src/mimemaker.c
index 55e5782..6ddb19d 100644
--- a/src/mimemaker.c
+++ b/src/mimemaker.c
@@ -40,11 +40,6 @@
 #include "mapihelp.h"
 #include "mimemaker.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 static const char oid_mimetag[] =
     {0x2A, 0x86, 0x48, 0x86, 0xf7, 0x14, 0x03, 0x0a, 0x04};
 
diff --git a/src/mimeparser.c b/src/mimeparser.c
index e885729..af21ad5 100644
--- a/src/mimeparser.c
+++ b/src/mimeparser.c
@@ -45,10 +45,6 @@
 #include "parsetlv.h"
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 #define debug_mime_parser (opt.enable_debug & (DBG_MIME_PARSER|DBG_MIME_DATA))
 #define debug_mime_data (opt.enable_debug & DBG_MIME_DATA)
 
diff --git a/src/olflange.cpp b/src/olflange.cpp
index 10be051..f24b134 100644
--- a/src/olflange.cpp
+++ b/src/olflange.cpp
@@ -57,10 +57,6 @@
 #include "mailitem.h"
 #include "cmdbarcontrols.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 static bool g_initdll = FALSE;
 
 static char *olversion;
diff --git a/src/passphrase-dialog.c b/src/passphrase-dialog.c
index 4fa695d..54fdcea 100644
--- a/src/passphrase-dialog.c
+++ b/src/passphrase-dialog.c
@@ -33,10 +33,6 @@
 #include "dialogs.h"
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 /* Object to maintai8n state in the dialogs. */
 struct dialog_context_s
 {
diff --git a/src/property-sheets.cpp b/src/property-sheets.cpp
index ae48a8a..693e952 100644
--- a/src/property-sheets.cpp
+++ b/src/property-sheets.cpp
@@ -38,13 +38,6 @@
 #include "property-sheets.h"
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
-
-
 GpgolPropertySheets::GpgolPropertySheets (GpgolExt* pParentInterface)
 { 
     m_pExchExt = pParentInterface;
diff --git a/src/recipient-dialog.c b/src/recipient-dialog.c
index c4de8a9..a2684f8 100644
--- a/src/recipient-dialog.c
+++ b/src/recipient-dialog.c
@@ -36,12 +36,6 @@
 #include "gpgol-ids.h"
 #include "dialogs.h"
 
-
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 struct recipient_cb_s 
 {
   char **unknown_keys;  /* A string array with the names of the
diff --git a/src/revert.cpp b/src/revert.cpp
index e76f782..5e1d474 100644
--- a/src/revert.cpp
+++ b/src/revert.cpp
@@ -31,10 +31,6 @@
 #include "message.h"
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
 /* Wrapper around UlRelease with error checking. */
 static void 
 ul_release (LPVOID punk, const char *func, int lnr)
diff --git a/src/session-events.cpp b/src/session-events.cpp
index 0c6e9b6..1ee67b1 100644
--- a/src/session-events.cpp
+++ b/src/session-events.cpp
@@ -37,12 +37,6 @@
 #include "session-events.h"
 
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
-
 /* Wrapper around UlRelease with error checking. */
 static void 
 ul_release (LPVOID punk, const char *func, int lnr)
diff --git a/src/user-events.cpp b/src/user-events.cpp
index c56a9f5..66b8611 100644
--- a/src/user-events.cpp
+++ b/src/user-events.cpp
@@ -36,11 +36,6 @@
 #include "olflange.h"
 #include "user-events.h"
 
-#define TRACEPOINT() do { log_debug ("%s:%s:%d: tracepoint\n", \
-                                     SRCNAME, __func__, __LINE__); \
-                        } while (0)
-
-
 /* Wrapper around UlRelease with error checking. */
 static void 
 ul_release (LPVOID punk, const char *func, int lnr)
diff --git a/src/util.h b/src/util.h
index 38924f8..d950163 100644
--- a/src/util.h
+++ b/src/util.h
@@ -99,7 +99,11 @@ void log_window_hierarchy (HWND window, const char *fmt,
 
 const char *log_srcname (const char *s);
 #define SRCNAME log_srcname (__FILE__)
-     
+
+#define TRACEPOINT do { log_debug ("%s:%s:%d: tracepoint\n", \
+                                     SRCNAME, __func__, __LINE__); \
+                      } while (0)
+
 const char *get_log_file (void);
 void set_log_file (const char *name);
 void set_default_key (const char *name);

commit 5d674036b79dfe53bde846f60e6fa58359f96e1a
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 14:23:46 2015 +0200

    Check for result pointer in getIcon
    
    * src/ribbon-callbacks.cpp (getIcon): Check if result is NULL.
    
    --
    There are crashes reported to occur randomly in this function.
    Maybe someone passes us a NULL pointer as result ptr?
    Shouldn't happen but Let's guard against it.

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 7c8aa19..f08d168 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -890,6 +890,12 @@ getIcon (int id, VARIANT* result)
   pdesc.cbSizeofstruct = sizeof pdesc;
   pdesc.picType = PICTYPE_BITMAP;
 
+  if (!result)
+    {
+      log_error ("getIcon called without result variant.");
+      return E_POINTER;
+    }
+
   /* Initialize GDI */
   gdiplusStartupInput.DebugEventCallback = NULL;
   gdiplusStartupInput.SuppressBackgroundThread = FALSE;

commit 6e5205941ce0bfa312454a9bb810ea88c69550ba
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 14:12:46 2015 +0200

    Fix crash on unload.
    
    * src/gpgoladdin.cpp (GpgolAddin::~GpgolAddin): Release ribbonextender
      instead of deleting it.
    
    --
    Previously the ribbonextender was deleted twice on unload causing
    outlook to crash.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 404fcf0..3b03bdf 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -166,7 +166,7 @@ GpgolAddin::~GpgolAddin (void)
   log_debug ("%s:%s: cleaning up GpgolAddin object;",
              SRCNAME, __func__);
 
-  delete m_ribbonExtender;
+  m_ribbonExtender->Release ();
   m_applicationEventSink->Release ();
 
   if (!m_disabled)

commit 0f0122066f7f76cb795596a028300906239e3b0b
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Oct 15 14:05:13 2015 +0200

    Install forms for addin
    
    * src/gpgoladdin.cpp (GpgolAddin::OnStartupComplete): Call
      install_forms.
    
    --
    
    Installing the forms for Outlook 2010 and later does not appear
    to have any effect apart from providing the correct
    icons for the message list. So we can just use the old form
    configs for this.

diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index 8547fd5..404fcf0 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -280,6 +280,8 @@ GpgolAddin::OnStartupComplete (SAFEARRAY** custom)
   (void)custom;
   TRACEPOINT();
 
+  install_forms ();
+
   if (!create_responder_window())
     {
       log_error ("%s:%s: Failed to create the responder window;",

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

Summary of changes:
 src/attached-file-events.cpp |  4 --
 src/engine-assuan.c          |  5 ---
 src/engine.c                 |  4 --
 src/ext-commands.cpp         |  5 ---
 src/gpgoladdin.cpp           | 28 +++++++------
 src/item-events.cpp          |  4 --
 src/mailitem-events.cpp      | 36 ++++++++++++++---
 src/mapihelp.cpp             |  5 ---
 src/message-events.cpp       |  5 ---
 src/message.cpp              |  4 --
 src/mimemaker.c              |  5 ---
 src/mimeparser.c             |  4 --
 src/olflange.cpp             |  4 --
 src/passphrase-dialog.c      |  4 --
 src/property-sheets.cpp      |  7 ----
 src/recipient-dialog.c       |  6 ---
 src/revert.cpp               |  4 --
 src/ribbon-callbacks.cpp     |  6 +++
 src/session-events.cpp       |  6 ---
 src/user-events.cpp          |  5 ---
 src/util.h                   |  5 ++-
 src/w32-gettext.c            | 95 +++++++++++++++++++++++++-------------------
 src/w32-gettext.h            |  1 +
 23 files changed, 110 insertions(+), 142 deletions(-)


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




More information about the Gnupg-commits mailing list