[git] GpgOL - branch, master, updated. gpgol-1.4.0-251-ge200928

by Andre Heinecke cvs at cvs.gnupg.org
Fri Jan 13 17:24:42 CET 2017


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  e20092844ccc46b4074d01d235f4a55788002d35 (commit)
       via  52716f463c859f1197dc413f56c187771bf05b14 (commit)
       via  0fde2c349d6e914b3fec96fa61ec9ec607f67f31 (commit)
       via  573f6407bc050495f3b75ecb3e5c78e7e732bc35 (commit)
      from  0ce0b67505ca0a7bd1338244c7133680d6a00e69 (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 e20092844ccc46b4074d01d235f4a55788002d35
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 13 17:23:38 2017 +0100

    Improve decryption failed errors
    
    * src/parsecontroller.cpp (format_recipients): Add names to
    known recipients and add the GPGME Error.
    
    --
    This would be much nicer if gnupg would return decent errors
    e.g. if a user canceled the pinentry. Now we mostly have
    "Decryption Failed: Decryption Failed" Super!

diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp
index 60e03a7..3342371 100644
--- a/src/parsecontroller.cpp
+++ b/src/parsecontroller.cpp
@@ -140,12 +140,25 @@ is_smime (Data &data)
 }
 
 static std::string
-format_recipients(GpgME::DecryptionResult result)
+format_recipients(GpgME::DecryptionResult result, Protocol protocol)
 {
   std::string msg;
   for (const auto recipient: result.recipients())
     {
-      msg += std::string("<br/>0x") + recipient.keyID() + "</a>";
+      auto ctx = Context::createForProtocol(protocol);
+      Error e;
+      if (!ctx) {
+          /* Can't happen */
+          TRACEPOINT;
+          continue;
+      }
+      const auto key = ctx->key(recipient.keyID(), e, false);
+      delete ctx;
+      if (!key.isNull() && key.numUserIDs() && !e) {
+        msg += std::string("<br/>") + key.userIDs()[0].id() + " (0x" + recipient.keyID() + ")";
+        continue;
+      }
+      msg += std::string("<br/>") + _("Unknown Key:") + " 0x" + recipient.keyID();
     }
   return msg;
 }
@@ -174,12 +187,13 @@ format_error(GpgME::DecryptionResult result, Protocol protocol)
   if (no_sec)
     {
       msg = _("No secret key found to decrypt the message. "
-              "It is encrypted for following keys:");
-      msg += format_recipients (result);
+              "It is encrypted to the following keys:");
+      msg += format_recipients (result, protocol);
     }
   else
     {
-      msg = _("Could not decrypt the data.");
+      msg = _("Could not decrypt the data: ");
+      msg += result.error().asString();
     }
 
   if (gpgrt_asprintf (&buf, opt.prefer_html ? decrypt_template_html :

commit 52716f463c859f1197dc413f56c187771bf05b14
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 13 17:22:25 2017 +0100

    Disable explorer sigstatus icon if preview off
    
    * src/ribbon-callbacks.cpp (get_mail_from_control): Don't show
    wrong sigstatus when preview pane is disabled.

diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 34a964d..0a5ab5a 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -1462,6 +1462,32 @@ get_mail_from_control (LPDISPATCH ctrl, bool *none_selected)
         {
           *none_selected = true;
         }
+      else
+        {
+          // Avoid showing wrong crypto state if we don't have a reading
+          // pane. In that case the parser will finish for a mail which is gone
+          // and the crypto state will not get updated.
+          LPDISPATCH tableView = get_oom_object (context, "CurrentView");
+          if (!tableView)
+            {
+              // Woops, should not happen.
+              TRACEPOINT;
+              *none_selected = true;
+              gpgol_release (mailitem);
+              mailitem = nullptr;
+            }
+          else
+            {
+              int hasReadingPane = get_oom_bool (tableView, "ShowReadingPane");
+              gpgol_release (tableView);
+              if (!hasReadingPane)
+                {
+                  *none_selected = true;
+                  gpgol_release (mailitem);
+                  mailitem = nullptr;
+                }
+            }
+        }
     }
 
   gpgol_release (context);

commit 0fde2c349d6e914b3fec96fa61ec9ec607f67f31
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 13 17:01:04 2017 +0100

    Only invalidate UI when mail is not crypto mail
    
    * src/application-events.cpp (EVENT_SINK_INVOKE): Don't
    invalidate on every load.
    * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Invalidate on
    Read.
    
    --
    For crypto mails the invalidation will be done after the
    mail has been processed. This further reduces uneccesary invalidations.

diff --git a/src/application-events.cpp b/src/application-events.cpp
index 8f089d4..7835733 100644
--- a/src/application-events.cpp
+++ b/src/application-events.cpp
@@ -90,8 +90,6 @@ EVENT_SINK_INVOKE(ApplicationEvents)
           log_debug ("%s:%s: Creating mail object for item: %p",
                      SRCNAME, __func__, mailItem);
           new Mail (mailItem);
-          /* Ensure that all UI's are nicely updated for the new mail */
-          gpgoladdin_invalidate_ui ();
           break;
         }
       case Quit:
diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp
index b6ad311..1ec0ec3 100644
--- a/src/mailitem-events.cpp
+++ b/src/mailitem-events.cpp
@@ -27,6 +27,7 @@
 #include "windowmessages.h"
 #include "mail.h"
 #include "mapihelp.h"
+#include "gpgoladdin.h"
 
 #undef _
 #define _(a) utf8_gettext (a)
@@ -193,7 +194,8 @@ EVENT_SINK_INVOKE(MailItemEvents)
                          SRCNAME, __func__, m_mail);
           if (!m_mail->is_crypto_mail())
             {
-              /* Not for us. */
+              /* Ensure that no wrong sigstatus is shown */
+              gpgoladdin_invalidate_ui ();
               break;
             }
           if (m_mail->set_uuid ())

commit 573f6407bc050495f3b75ecb3e5c78e7e732bc35
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jan 13 17:00:10 2017 +0100

    Reduce UI invalidations
    
    * src/explorer-events.cpp (EVENT_SINK_INVOKE): Only invalidate
    if the current explorer has a reading pane.

diff --git a/src/explorer-events.cpp b/src/explorer-events.cpp
index 4b8a7ab..4f14ef4 100644
--- a/src/explorer-events.cpp
+++ b/src/explorer-events.cpp
@@ -81,6 +81,18 @@ EVENT_SINK_INVOKE(ExplorerEvents)
         {
           log_oom_extra ("%s:%s: Selection change in explorer: %p",
                          SRCNAME, __func__, this);
+          LPDISPATCH tableView = get_oom_object (m_object, "CurrentView");
+          if (!tableView)
+            {
+              TRACEPOINT;
+              break;
+            }
+          int hasReadingPane = get_oom_bool (tableView, "ShowReadingPane");
+          gpgol_release (tableView);
+          if (!hasReadingPane)
+            {
+              break;
+            }
           HANDLE thread = CreateThread (NULL, 0, invalidate_ui, (LPVOID) this, 0,
                                         NULL);
 

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

Summary of changes:
 src/application-events.cpp |  2 --
 src/explorer-events.cpp    | 12 ++++++++++++
 src/mailitem-events.cpp    |  4 +++-
 src/parsecontroller.cpp    | 24 +++++++++++++++++++-----
 src/ribbon-callbacks.cpp   | 26 ++++++++++++++++++++++++++
 5 files changed, 60 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list