[git] GpgOL - branch, master, updated. gpgol-2.3.0-72-gd04de20

by Andre Heinecke cvs at cvs.gnupg.org
Mon Oct 8 15:30:49 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  d04de205a89ef617b31c45f6cf144393f6e9ee36 (commit)
      from  8c61617886882ce720b884aca9d6fc3e2e1128c4 (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 d04de205a89ef617b31c45f6cf144393f6e9ee36
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Oct 8 15:28:38 2018 +0200

    Revert "Show signer KeyID and UserID for valid mails"
    
    This reverts commit c186f2832294737ada9de6d23e466c106537676f.
    
    --
    This only worked with contacts from the Address book for
    other contacts outlook shows:
    
    To help protect your security, the Follow Up flag text has
    been hidden. Follow up. Click here to see hidden text.

diff --git a/src/mail.cpp b/src/mail.cpp
index b50cf3d..f30804ed 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -104,8 +104,7 @@ Mail::Mail (LPDISPATCH mailitem) :
     m_first_autosecure_check(true),
     m_locate_count(0),
     m_is_about_to_be_moved(false),
-    m_locate_in_progress(false),
-    m_flag_change_triggered(false)
+    m_locate_in_progress(false)
 {
   TSTART;
   if (getMailForItem (mailitem))
@@ -1461,10 +1460,6 @@ Mail::parsing_done()
   updateCategories_o ();
 
   TRACEPOINT;
-  /* Show the signers uid as a flag */
-  updateSigFlag_o ();
-  TRACEPOINT;
-
   m_block_html = m_parser->shouldBlockHtml ();
 
   if (m_block_html)
@@ -2297,84 +2292,6 @@ Mail::updateCategories_o ()
   TRETURN;
 }
 
-static std::string
-pretty_id (const char *keyId)
-{
-  /* Three spaces, four quads and a NULL */
-  char buf[20];
-  buf[19] = '\0';
-  if (!keyId)
-    {
-      return std::string ("null");
-    }
-  size_t len = strlen (keyId);
-  if (!len)
-    {
-      return std::string ("empty");
-    }
-  if (len < 16)
-    {
-      return std::string (_("Invalid Key"));
-    }
-  const char *p = keyId + (len - 16);
-  int j = 0;
-  for (size_t i = 0; i < 16; i++)
-    {
-      if (i && i % 4 == 0)
-        {
-          buf[j++] = ' ';
-        }
-      buf[j++] = *(p + i);
-    }
-  return std::string (buf);
-}
-
-void
-Mail::updateSigFlag_o ()
-{
-  TSTART;
-  if (isValidSig ())
-    {
-      char *buf;
-      /* Resolve to the primary fingerprint */
-      const auto sigKey = KeyCache::instance ()->getByFpr (m_sig.fingerprint (),
-                                                           true);
-      const char *sigFpr;
-      if (sigKey.isNull())
-        {
-          sigFpr = m_sig.fingerprint ();
-        }
-      else
-        {
-          sigFpr = sigKey.primaryFingerprint ();
-        }
-
-      gpgrt_asprintf (&buf, "%s: %s (%s)", _("Signer"), m_uid.email(),
-                      pretty_id (sigFpr).c_str ());
-      memdbg_alloc (buf);
-      log_debug ("%s:%s: Setting signer flag %s",
-                 SRCNAME, __func__, anonstr (buf));
-      m_flag_change_triggered = true;
-      put_oom_string (m_mailitem, "FlagRequest", buf);
-      m_flag_change_triggered = false;
-      xfree (buf);
-    }
-  else
-    {
-      char *flag = get_oom_string (m_mailitem, "FlagRequest");
-      if (flag && (strstr (flag, _("Signer")) || strstr (flag, "Signer")))
-        {
-          m_flag_change_triggered = true;
-          log_debug ("%s:%s: Removing flag containting Signer.",
-                     SRCNAME, __func__);
-          put_oom_string (m_mailitem, "FlagRequest", "");
-          m_flag_change_triggered = false;
-        }
-      xfree (flag);
-    }
-  TRETURN;
-}
-
 bool
 Mail::isSigned () const
 {
diff --git a/src/mail.h b/src/mail.h
index d925dde..c4f2369 100644
--- a/src/mail.h
+++ b/src/mail.h
@@ -598,11 +598,7 @@ public:
   /* Gets an additional reference for GetInspector.CurrentItem */
   void refCurrentItem ();
 
-  /* Check if a flag change was triggered and can be ignored. */
-  bool flagChangeTriggered () const { return m_flag_change_triggered; }
-
 private:
-  void updateSigFlag_o ();
   void updateCategories_o ();
   void updateSigstate ();
 
@@ -653,6 +649,5 @@ private:
   int m_locate_count; /* The number of key locates pending for this mail. */
   bool m_is_about_to_be_moved;
   bool m_locate_in_progress; /* Simplified state variable for locate */
-  bool m_flag_change_triggered; /* We trigger a flagrequest change */
 };
 #endif // MAIL_H
diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp
index 7a741c0..84bd887 100644
--- a/src/mailitem-events.cpp
+++ b/src/mailitem-events.cpp
@@ -270,14 +270,6 @@ EVENT_SINK_INVOKE(MailItemEvents)
                   TRETURN S_OK;
                 }
             }
-          if (m_mail->flagChangeTriggered () &&
-              (!wcscmp (prop_name, L"FlagStatus") || !wcscmp (prop_name, L"FlagRequest") ||
-               !wcscmp (prop_name, L"FlagIcon") || !wcscmp (prop_name, L"FlagDueBy")))
-            {
-              log_oom ("%s:%s: Message %p propchange: %ls was requested.",
-                       SRCNAME, __func__, m_object, prop_name);
-              TRETURN S_OK;
-            }
           log_oom ("%s:%s: Message %p propchange: %ls.",
                    SRCNAME, __func__, m_object, prop_name);
 

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

Summary of changes:
 src/mail.cpp            | 85 +------------------------------------------------
 src/mail.h              |  5 ---
 src/mailitem-events.cpp |  8 -----
 3 files changed, 1 insertion(+), 97 deletions(-)


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




More information about the Gnupg-commits mailing list