[git] GpgOL - branch, master, updated. gpgol-1.4.0-217-g51e10a7

by Andre Heinecke cvs at cvs.gnupg.org
Wed Dec 14 17:07:32 CET 2016


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  51e10a77dcb393f80b89945d8425595cfcc4f5f8 (commit)
       via  ed101ddff74fd6f77073944e8fd0cfea408abab2 (commit)
       via  3de7888d0512c08617fe98f4427324e33efeb815 (commit)
      from  fff2ff17e509ba9e73c13b4059d27f5c9f4be0f4 (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 51e10a77dcb393f80b89945d8425595cfcc4f5f8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Dec 14 17:04:08 2016 +0100

    Fix / improve inline PGP decryption
    
    * src/mapihelp.cpp (change_message_class_ipm_note): Look for
    PGP Lines even without content type.
    * src/mimedataprovider.cpp (MimeDataProvider::write): Respect
    m_collect_everything.
    * src/parsecontroller.cpp (ParseController::ParseController): Don't
    expect MIME headers for inline pgp data.
    (expect_no_mime): New.

diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp
index 92def26..eb23503 100644
--- a/src/mapihelp.cpp
+++ b/src/mapihelp.cpp
@@ -959,41 +959,37 @@ change_message_class_ipm_note (LPMESSAGE message)
   char *ct, *proto;
 
   ct = mapi_get_message_content_type (message, &proto, NULL);
-  if (ct)
+  log_debug ("%s:%s: content type is '%s'", SRCNAME, __func__,
+             ct ? ct : "null");
+  if (ct && proto)
     {
-      log_debug ("%s:%s: content type is '%s'", SRCNAME, __func__, ct);
-      if (proto)
+      log_debug ("%s:%s:     protocol is '%s'", SRCNAME, __func__, proto);
+
+      if (!strcmp (ct, "multipart/encrypted")
+          && !strcmp (proto, "application/pgp-encrypted"))
         {
-          log_debug ("%s:%s:     protocol is '%s'", SRCNAME, __func__, proto);
-          
-          if (!strcmp (ct, "multipart/encrypted")
-              && !strcmp (proto, "application/pgp-encrypted"))
-            {
-              newvalue = xstrdup ("IPM.Note.GpgOL.MultipartEncrypted");
-            }
-          else if (!strcmp (ct, "multipart/signed")
-                   && !strcmp (proto, "application/pgp-signature"))
-            {
-              /* Sometimes we receive a PGP/MIME signed message with a
-                 class IPM.Note.  */
-              newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
-            }
-          xfree (proto);
+          newvalue = xstrdup ("IPM.Note.GpgOL.MultipartEncrypted");
         }
-      else if (!strcmp (ct, "text/plain") ||
-               !strcmp (ct, "multipart/mixed") ||
-               !strcmp (ct, "multipart/alternative"))
+      else if (!strcmp (ct, "multipart/signed")
+               && !strcmp (proto, "application/pgp-signature"))
         {
-          /* It is quite common to have a multipart/mixed or alternative
-             mail with separate encrypted PGP parts.  Look at the body to
-             decide.  */
-          newvalue = get_msgcls_from_pgp_lines (message);
+          /* Sometimes we receive a PGP/MIME signed message with a
+             class IPM.Note.  */
+          newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned");
         }
-
-      xfree (ct);
+      xfree (proto);
     }
-  else
-    log_debug ("%s:%s: message has no content type", SRCNAME, __func__);
+  else if (!ct || !strcmp (ct, "text/plain") ||
+           !strcmp (ct, "multipart/mixed") ||
+           !strcmp (ct, "multipart/alternative"))
+    {
+      /* It is quite common to have a multipart/mixed or alternative
+         mail with separate encrypted PGP parts.  Look at the body to
+         decide.  */
+      newvalue = get_msgcls_from_pgp_lines (message);
+    }
+
+  xfree (ct);
 
   return newvalue;
 }
diff --git a/src/mimedataprovider.cpp b/src/mimedataprovider.cpp
index f0273cf..9ae3e2d 100644
--- a/src/mimedataprovider.cpp
+++ b/src/mimedataprovider.cpp
@@ -833,21 +833,30 @@ MimeDataProvider::collect_data(FILE *stream)
 
 ssize_t MimeDataProvider::write(const void *buffer, size_t bufSize)
 {
-    m_rawbuf += std::string ((const char*)buffer, bufSize);
-    size_t not_taken = collect_input_lines (m_rawbuf.c_str(),
-                                            m_rawbuf.size());
-
-    if (not_taken == m_rawbuf.size())
-      {
-        log_error ("%s:%s: Write failed to consume anything.\n"
-                   "Buffer too small? or no newlines in text?",
-                   SRCNAME, __func__);
-        return bufSize;
-      }
-    log_mime_parser ("%s:%s: Write Consumed: " SIZE_T_FORMAT " bytes",
-                     SRCNAME, __func__, m_rawbuf.size() - not_taken);
-    m_rawbuf.erase (0, m_rawbuf.size() - not_taken);
-    return bufSize;
+  if (m_collect_everything)
+    {
+      /* Writing with collect everything one means that we are outputprovider.
+         In this case for inline messages we want to collect everything. */
+      log_mime_parser ("%s:%s: Using complete input as body " SIZE_T_FORMAT " bytes.",
+                       SRCNAME, __func__, bufSize);
+      m_body += std::string ((const char *) buffer, bufSize);
+      return bufSize;
+    }
+  m_rawbuf += std::string ((const char*)buffer, bufSize);
+  size_t not_taken = collect_input_lines (m_rawbuf.c_str(),
+                                          m_rawbuf.size());
+
+  if (not_taken == m_rawbuf.size())
+    {
+      log_error ("%s:%s: Write failed to consume anything.\n"
+                 "Buffer too small? or no newlines in text?",
+                 SRCNAME, __func__);
+      return bufSize;
+    }
+  log_mime_parser ("%s:%s: Write Consumed: " SIZE_T_FORMAT " bytes",
+                   SRCNAME, __func__, m_rawbuf.size() - not_taken);
+  m_rawbuf.erase (0, m_rawbuf.size() - not_taken);
+  return bufSize;
 }
 
 off_t
diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp
index f0ddfaa..f053d87 100644
--- a/src/parsecontroller.cpp
+++ b/src/parsecontroller.cpp
@@ -64,22 +64,31 @@ expect_no_headers (msgtype_t type)
   return type != MSGTYPE_GPGOL_MULTIPART_SIGNED;
 }
 
+static bool
+expect_no_mime (msgtype_t type)
+{
+  return type == MSGTYPE_GPGOL_PGP_MESSAGE ||
+         type == MSGTYPE_GPGOL_CLEAR_SIGNED;
+}
+
 #ifdef HAVE_W32_SYSTEM
 ParseController::ParseController(LPSTREAM instream, msgtype_t type):
     m_inputprovider  (new MimeDataProvider(instream,
                           expect_no_headers(type))),
-    m_outputprovider (new MimeDataProvider()),
+    m_outputprovider (new MimeDataProvider(expect_no_mime(type))),
     m_type (type)
 {
-  log_mime_parser ("%s:%s: Creating parser for stream: %p of type %i",
-                   SRCNAME, __func__, instream, type);
+  log_mime_parser ("%s:%s: Creating parser for stream: %p of type %i"
+                   " expect headers: %i expect no mime: %i",
+                   SRCNAME, __func__, instream, type,
+                   expect_no_headers (type), expect_no_mime (type));
 }
 #endif
 
 ParseController::ParseController(FILE *instream, msgtype_t type):
     m_inputprovider  (new MimeDataProvider(instream,
                           expect_no_headers(type))),
-    m_outputprovider (new MimeDataProvider()),
+    m_outputprovider (new MimeDataProvider(expect_no_mime(type))),
     m_type (type)
 {
   log_mime_parser ("%s:%s: Creating parser for stream: %p of type %i",

commit ed101ddff74fd6f77073944e8fd0cfea408abab2
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Dec 14 17:03:20 2016 +0100

    Update copyright year
    
    --

diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in
index bc0da84..7d03c5f 100644
--- a/src/versioninfo.rc.in
+++ b/src/versioninfo.rc.in
@@ -39,7 +39,7 @@ BEGIN
             VALUE "FileDescription", "GpgOL - GnuPG plugin for Outlook\0"
             VALUE "FileVersion", "@VERSION@\0"
             VALUE "InternalName", "gpgol\0"
-            VALUE "LegalCopyright", "Copyright © 2013 g10 Code GmbH\0"
+            VALUE "LegalCopyright", "Copyright © 2016 g10 Code GmbH\0"
             VALUE "LegalTrademarks", "\0"
             VALUE "OriginalFilename", "gpgol.dll\0"
             VALUE "PrivateBuild", "\0"

commit 3de7888d0512c08617fe98f4427324e33efeb815
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Wed Dec 14 16:51:17 2016 +0100

    Update signature status display
    
    * src/icons: Add new Icons, remove old icons.
    * src/icons/Makefile.am (EXTRA_DIST): Update accordingly.
    * src/dialogs.h: Define ids
    * src/dialogs.rc: Include new icons.
    * src/gpgoladdin.cpp: Update some function names.
    * src/mail.cpp (Mail::update_sigstate): Use tofu validity
    from gnupg.
    (Mail::get_valid_sig): Removed. Too confusing.
    (Mail::is_signed): Constify.
    (Mail::is_encrypted): New, similar to is_signed.
    (level_4_check): Helper to figure out the correct message
    for level 4.
    (Mail::get_crypto_summary): New. More differntiated title.
    (Mail::get_signature_level): New. defines levels.
    (Mail::get_crypto_details): New. Replacement for get_signature_status
    (Mail::get_crypto_icon_id): Use levels and new icons.
    * src/mail.h: Update accordingly.
    * src/ribbon-callbacks.cpp (get_is_crypto): Renamed from
    get_is_signed.
    (get_sig_label): Use get_crypto_summary.
    (get_sig_ttip): Use get_crypto_summary.
    (get_sig_stip): Use get_crypto_details.
    (get_crypto_icon): Use renamed function.
    * src/ribbon-callbacks.h: Update accordingly.
    
    --
    This commits starts implementing signature / crypto status
    display as discussed on:
    https://wiki.gnupg.org/EasyGpg2016/AutomatedEncryption
    
    Apologies for the large commits that mushes the string
    and icon changes.
    
    There are still bugs but I needed to commit some changes so
    that I won't get lost completely.

diff --git a/src/dialogs.h b/src/dialogs.h
index 54bbede..0574444 100644
--- a/src/dialogs.h
+++ b/src/dialogs.h
@@ -115,12 +115,23 @@
 #define IDI_SIGN_48_PNG                 0x6060
 #define IDI_VERIFY_48_PNG               0x6070
 #define IDI_EMBLEM_WARNING_64_PNG       0x6071
-#define IDI_EMBLEM_SUCCESS_64_PNG       0x6072
-#define IDI_EMBLEM_INFORMATION_64_PNG   0x6073
 #define IDI_EMBLEM_QUESTION_64_PNG      0x6074
-#define IDI_EMBLEM_SUCCESS_YELLOW_64_PNG 0x6075
 #define IDI_SIGN_ENCRYPT_40_PNG         0x6075
 #define IDI_ENCRYPT_20_PNG              0x6076
 #define IDI_SIGN_20_PNG                 0x6077
 
+/* Status icons */
+#define ENCRYPT_ICON_OFFSET             0x10
+
+#define IDI_LEVEL_0                     0x6080
+#define IDI_LEVEL_1                     0x6081
+#define IDI_LEVEL_2                     0x6082
+#define IDI_LEVEL_3                     0x6083
+#define IDI_LEVEL_4                     0x6084
+#define IDI_LEVEL_0_ENC                 (IDI_LEVEL_0 + ENCRYPT_ICON_OFFSET)
+#define IDI_LEVEL_1_ENC                 (IDI_LEVEL_1 + ENCRYPT_ICON_OFFSET)
+#define IDI_LEVEL_2_ENC                 (IDI_LEVEL_2 + ENCRYPT_ICON_OFFSET)
+#define IDI_LEVEL_3_ENC                 (IDI_LEVEL_3 + ENCRYPT_ICON_OFFSET)
+#define IDI_LEVEL_4_ENC                 (IDI_LEVEL_4 + ENCRYPT_ICON_OFFSET)
+
 #endif /*DIALOGS_H*/
diff --git a/src/dialogs.rc b/src/dialogs.rc
index b51f556..a3ee628 100644
--- a/src/dialogs.rc
+++ b/src/dialogs.rc
@@ -52,13 +52,18 @@ IDB_DECRYPT_VERIFY_16M    BITMAP  DISCARDABLE  "icons/decrypt-verify-16m.bmp"
 
 IDI_ENCSIGN_FILE_48_PNG   RCDATA               "icons/encrypt-sign-file-48.png"
 
-IDI_EMBLEM_WARNING_64_PNG RCDATA               "icons/emblem-warning-64.png"
-IDI_EMBLEM_SUCCESS_64_PNG RCDATA               "icons/emblem-success-64.png"
-IDI_EMBLEM_SUCCESS_YELLOW_64_PNG RCDATA        "icons/emblem-success-yellow-64.png"
-IDI_EMBLEM_INFORMATION_64_PNG RCDATA           "icons/emblem-information-64.png"
-IDI_EMBLEM_QUESTION_64_PNG RCDATA              "icons/emblem-question-64.png"
-
-IDI_SIGN_ENCRYPT_40_PNG    RCDATA              "icons/sing-enc-40.png"
+IDI_LEVEL_0_ENC             RCDATA             "icons/level-0-enc.png"
+IDI_LEVEL_1_ENC             RCDATA             "icons/level-1-enc.png"
+IDI_LEVEL_2_ENC             RCDATA             "icons/level-2-enc.png"
+IDI_LEVEL_3_ENC             RCDATA             "icons/level-3-enc.png"
+IDI_LEVEL_4_ENC             RCDATA             "icons/level-4-enc.png"
+IDI_LEVEL_0                 RCDATA             "icons/level-0.png"
+IDI_LEVEL_1                 RCDATA             "icons/level-1.png"
+IDI_LEVEL_2                 RCDATA             "icons/level-2.png"
+IDI_LEVEL_3                 RCDATA             "icons/level-3.png"
+IDI_LEVEL_4                 RCDATA             "icons/level-4.png"
+
+IDI_SIGN_ENCRYPT_40_PNG    RCDATA              "icons/sign-enc-40.png"
 IDI_ENCRYPT_20_PNG         RCDATA              "icons/encrypt-20.png"
 IDI_SIGN_20_PNG            RCDATA              "icons/sign-20.png"
 
diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp
index a649ffe..eaafd18 100644
--- a/src/gpgoladdin.cpp
+++ b/src/gpgoladdin.cpp
@@ -646,7 +646,7 @@ GpgolRibbonExtender::GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames,
       ID_MAPPER (L"getSigSTip", ID_GET_SIG_STIP)
       ID_MAPPER (L"getSigTip", ID_GET_SIG_TTIP)
       ID_MAPPER (L"launchDetails", ID_LAUNCH_CERT_DETAILS)
-      ID_MAPPER (L"getIsSigned", ID_GET_IS_SIGNED)
+      ID_MAPPER (L"getIsCrypto", ID_GET_IS_CRYPTO)
     }
 
   if (cNames > 1)
@@ -741,8 +741,8 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
         return get_sig_label (parms->rgvarg[0].pdispVal, result);
       case ID_LAUNCH_CERT_DETAILS:
         return launch_cert_details (parms->rgvarg[0].pdispVal);
-      case ID_GET_IS_SIGNED:
-        return get_is_signed (parms->rgvarg[0].pdispVal, result);
+      case ID_GET_IS_CRYPTO:
+        return get_is_crypto (parms->rgvarg[0].pdispVal, result);
 
       case ID_ON_LOAD:
           {
@@ -767,7 +767,7 @@ GpgolRibbonExtender::Invoke (DISPID dispid, REFIID riid, LCID lcid,
       case IDI_SIGN_20_PNG:
         return getIcon (dispid, result);
       case ID_BTN_SIGSTATE_LARGE:
-        return get_sigstate_icon (parms->rgvarg[0].pdispVal, result);
+        return get_crypto_icon (parms->rgvarg[0].pdispVal, result);
     }
 
   log_debug ("%s:%s: leave", SRCNAME, __func__);
@@ -883,7 +883,7 @@ GetCustomUI_MIME (BSTR RibbonID, BSTR * RibbonXml)
         "               getScreentip=\"getSigTip\""
         "               getSupertip=\"getSigSTip\""
         "               onAction=\"launchDetails\""
-        "               getEnabled=\"getIsSigned\"/>"
+        "               getEnabled=\"getIsCrypto\"/>"
         "       <dialogBoxLauncher>"
         "         <button id=\"optsBtn\""
         "                 onAction=\"openOptions\""
@@ -926,7 +926,7 @@ GetCustomUI_MIME (BSTR RibbonID, BSTR * RibbonXml)
         "               getScreentip=\"getSigTip\""
         "               getSupertip=\"getSigSTip\""
         "               onAction=\"launchDetails\""
-        "               getEnabled=\"getIsSigned\"/>"
+        "               getEnabled=\"getIsCrypto\"/>"
         "       <dialogBoxLauncher>"
         "         <button id=\"optsBtn_read\""
         "                 onAction=\"openOptions\""
diff --git a/src/icons/Makefile.am b/src/icons/Makefile.am
index c65e707..914742a 100644
--- a/src/icons/Makefile.am
+++ b/src/icons/Makefile.am
@@ -23,14 +23,10 @@ EXTRA_DIST= \
     encrypt-sign-file-48.png \
     sign-48.png verify-48.png \
     README.icons\
-    emblem-question-64.png \
-    emblem-warning-64.png \
-    emblem-success-64.png \
-    emblem-information-64.png \
-    emblem-success-yellow-64.png \
-    emblem-question.svg \
-    emblem-warning.svg \
-    emblem-information.svg \
-    emblem-success-yellow.svg \
     sign.svg sign-enc.svg enc.svg \
-    sign-enc-40.png sign-20.png encrypt-20.png
+    sign-enc-40.png sign-20.png encrypt-20.png \
+    level-0.svg level-0-enc.svg level-0.png level-0-enc.png \
+    level-1.svg level-1-enc.svg level-1.png level-1-enc.png \
+    level-2.svg level-2-enc.svg level-2.png level-2-enc.png \
+    level-3.svg level-3-enc.svg level-3.png level-3-enc.png \
+    level-4.svg level-4-enc.svg level-4.png level-4-enc.png
diff --git a/src/icons/emblem-information-64.png b/src/icons/emblem-information-64.png
deleted file mode 100644
index cce8e5e..0000000
Binary files a/src/icons/emblem-information-64.png and /dev/null differ
diff --git a/src/icons/emblem-information.svg b/src/icons/emblem-information.svg
deleted file mode 100644
index 2deec9a..0000000
--- a/src/icons/emblem-information.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
-  <defs id="defs3051">
-    <style type="text/css" id="current-color-scheme">
-      .ColorScheme-Highlight {
-        color:#3daee9;
-      }
-      </style>
-  </defs>
-  <g
-     transform="translate(-7,-1037.3622)">
-    <path
-       style="fill:currentColor;fill-opacity:1;stroke:none"
-       d="m 15,1041.3622 a 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 4,4 0 0 1 4,4 z"
-       class="ColorScheme-Highlight" />
-    <path
-       style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none"
-       d="M 3.5 1 L 3.5 2 L 4.5 2 L 4.5 1 L 3.5 1 z M 3.5 3 L 3.5 7 L 4.5 7 L 4.5 3 L 3.5 3 z "
-       transform="translate(7,1037.3622)"
-       id="rect4241" />
-  </g>
-</svg>
diff --git a/src/icons/emblem-question-64.png b/src/icons/emblem-question-64.png
deleted file mode 100644
index 05c1312..0000000
Binary files a/src/icons/emblem-question-64.png and /dev/null differ
diff --git a/src/icons/emblem-question.svg b/src/icons/emblem-question.svg
deleted file mode 100644
index f015e64..0000000
--- a/src/icons/emblem-question.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
- <path
-     style="fill:#9b59b6;fill-opacity:1;stroke:none"
-     d="M 2 0 C 0.8919807 0 0 0.892 0 2 L 0 6 C 0 7.1081 0.8919807 8 2 8 L 6 8 C 7.108019 8 8 7.1081 8 6 L 8 2 C 8 0.892 7.108019 0 6 0 L 2 0 z "
-     />
- <path
-     style="fill:#ffffff;fill-opacity:1;stroke:none"
-     d="M 4 1 C 3.51389 1 3.0599989 1.1705344 2.7402344 1.4902344 C 2.4204694 1.8100344 2.25 2.2639 2.25 2.75 L 3.25 2.75 C 3.25 2.4861 3.3295286 2.3149656 3.4472656 2.1972656 C 3.5650006 2.0795656 3.736112 2 4 2 C 4.26389 2 4.4349984 2.0799656 4.5527344 2.1972656 C 4.6704694 2.3149656 4.75 2.4861 4.75 2.75 C 4.75 2.9792 4.7048303 3.0776625 4.6445312 3.1640625 C 4.5842412 3.2500625 4.4849756 3.3305938 4.3378906 3.4335938 C 4.1908036 3.5364937 3.9968862 3.6547344 3.8164062 3.8652344 C 3.6359262 4.0758344 3.5 4.3959 3.5 4.75 L 3.5 5 L 4.5 5 L 4.5 4.75 C 4.5 4.6042 4.5203088 4.578525 4.5742188 4.515625 C 4.6281087 4.452625 4.7466934 4.3697062 4.9121094 4.2539062 C 5.0775214 4.1381062 5.2907638 3.983975 5.4648438 3.734375 C 5.6389238 3.484875 5.75 3.1458 5.75 2.75 C 5.75 2.2639 5.5795326 1.8100344 5.2597656 1.4902344 C 4.9400006 1.1705344 4.486112 1 4 1 z M 3.5 6 L 3.5 7 L 4.5 7 L 4.5 6 L 3.5 6 z "
-     />
-</svg>
diff --git a/src/icons/emblem-success-64.png b/src/icons/emblem-success-64.png
deleted file mode 100644
index b955af1..0000000
Binary files a/src/icons/emblem-success-64.png and /dev/null differ
diff --git a/src/icons/emblem-success-yellow-64.png b/src/icons/emblem-success-yellow-64.png
deleted file mode 100644
index b81aed1..0000000
Binary files a/src/icons/emblem-success-yellow-64.png and /dev/null differ
diff --git a/src/icons/emblem-success-yellow.svg b/src/icons/emblem-success-yellow.svg
deleted file mode 100644
index 563d047..0000000
--- a/src/icons/emblem-success-yellow.svg
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   viewBox="0 0 8 8"
-   id="svg2"
-   version="1.1"
-   inkscape:version="0.48.5 r10040"
-   width="100%"
-   height="100%"
-   sodipodi:docname="emblem-success.svg">
-  <metadata
-     id="metadata12">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="1060"
-     id="namedview10"
-     showgrid="false"
-     inkscape:zoom="29.5"
-     inkscape:cx="4"
-     inkscape:cy="4.0169492"
-     inkscape:window-x="-2"
-     inkscape:window-y="-3"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg2" />
-  <defs
-     id="defs3051">
-    <style
-       type="text/css"
-       id="current-color-scheme">
-      .ColorScheme-PositiveText {
-        color:#27ae60;
-      }
-      </style>
-  </defs>
-  <path
-     style="fill:currentColor;fill-opacity:1;stroke:none"
-     class="ColorScheme-PositiveText"
-     d="M 4 0 C 1.784 0 0 1.784 0 4 C 0 6.216 1.784 8 4 8 C 6.216 8 8 6.216 8 4 C 8 1.784 6.216 0 4 0 z "
-     id="path6" />
-  <path
-     style="fill:#ffffff;fill-opacity:1;stroke:none"
-     d="M 6 2 L 3 5 L 2 4 L 1 5 L 2 6 L 3 7 L 7 3 L 6 2 z "
-     id="path8" />
-  <path
-     style="fill:#ffd42a;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0.03389831000000000;stroke-opacity:1"
-     d="M 3.3232154,7.9242607 C 1.7484941,7.6251271 0.55453708,6.5163227 0.13835987,4.9665485 0.05799792,4.6672939 0.04884008,4.5726417 0.0471396,4.0237288 0.0451555,3.3832678 0.08992259,3.0957175 0.26471592,2.6261812 0.89372244,0.93652085 2.5766492,-0.12563207 4.3576271,0.04300418 5.1376464,0.11686222 5.7769136,0.36446515 6.4033722,0.83536851 8.1559719,2.1527823 8.4949549,4.6703692 7.1555471,6.4216864 6.6061339,7.1400614 5.8250061,7.6445356 4.9084746,7.8729092 4.5347946,7.9660197 3.6875275,7.9934651 3.3232154,7.9242607 l 0,0 z M 6.5186969,2.4814089 6.0107349,1.9725985 4.5104525,3.4725966 3.0101703,4.9725949 2.5104404,4.4728651 2.0107105,3.9731349 1.4933899,4.4896481 0.97606936,5.006161 1.9845212,6.0150332 2.9929729,7.0239054 5.0098159,5.0070624 7.026659,2.9902192 6.5186969,2.4814089 z"
-     id="path2989"
-     inkscape:connector-curvature="0" />
-</svg>
diff --git a/src/icons/emblem-success.svg b/src/icons/emblem-success.svg
deleted file mode 100644
index faa74e3..0000000
--- a/src/icons/emblem-success.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
-  <defs id="defs3051">
-    <style type="text/css" id="current-color-scheme">
-      .ColorScheme-PositiveText {
-        color:#27ae60;
-      }
-      </style>
-  </defs>
-  <path
-      style="fill:currentColor;fill-opacity:1;stroke:none"
-     class="ColorScheme-PositiveText"
-    d="M 4 0 C 1.784 0 0 1.784 0 4 C 0 6.216 1.784 8 4 8 C 6.216 8 8 6.216 8 4 C 8 1.784 6.216 0 4 0 z "
-      />
-    <path
-       style="fill:#ffffff;fill-opacity:1;stroke:none"
-       d="M 6 2 L 3 5 L 2 4 L 1 5 L 2 6 L 3 7 L 7 3 L 6 2 z "
-        />
-</svg>
diff --git a/src/icons/emblem-warning-64.png b/src/icons/emblem-warning-64.png
deleted file mode 100644
index 31bbbb8..0000000
Binary files a/src/icons/emblem-warning-64.png and /dev/null differ
diff --git a/src/icons/emblem-warning.svg b/src/icons/emblem-warning.svg
deleted file mode 100644
index 1cad345..0000000
--- a/src/icons/emblem-warning.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
-  <defs id="defs3051">
-    <style type="text/css" id="current-color-scheme">
-      .ColorScheme-NeutralText {
-        color:#f67400;
-      }
-      </style>
-  </defs>
-  <path
-      style="fill:currentColor;fill-opacity:1;stroke:none"
-     class="ColorScheme-NeutralText"
-    d="M 4 0 C 3.7964835 0.00025315917 3.644678 0.09649124 3.5371094 0.3125 C 3.5371094 0.3125 0.077246535 7.200596 0.080078125 7.2285156 C 0.043417505 7.3055016 -1.2456632e-05 7.403681 0 7.5 C 0 7.7761424 0.22385763 8 0.5 8 L 7.5 8 C 7.7761424 8 8 7.7761424 8 7.5 C 8.0002021 7.3873383 7.9818808 7.3677538 7.8925781 7.1894531 L 4.4550781 0.29101562 C 4.346001 0.097741395 4.1955491 -0.00033128801 4 0 z "
-      />
-    <path
-       style="fill:#ffffff;fill-opacity:1;stroke:none"
-       d="M 3.5 2 L 3.5 5 L 4.5 5 L 4.5 2 L 3.5 2 z M 3.5 6 L 3.5 7 L 4.5 7 L 4.5 6 L 3.5 6 z "
-        />
-</svg>
diff --git a/src/icons/level-0-enc.png b/src/icons/level-0-enc.png
new file mode 100644
index 0000000..8b00eff
Binary files /dev/null and b/src/icons/level-0-enc.png differ
diff --git a/src/icons/level-0-enc.svg b/src/icons/level-0-enc.svg
new file mode 100644
index 0000000..990493f
--- /dev/null
+++ b/src/icons/level-0-enc.svg
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-0-enc.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-0-enc.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313708"
+     inkscape:cx="-11.284963"
+     inkscape:cy="25.539672"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       id="path4195-5"
+       d="M 4.235958,11.38487 4.0179328,22.175169 9.170461,22.10315 9.1051629,11.384873 C 9.0837653,7.8717472 12.045973,5.0105893 15.64795,5.0105893 c 3.601974,0 6.542783,2.8579736 6.542783,6.3742837 l 0.04141,10.7335 4.827804,0.203709 0,-10.937209 c 0,-6.0279569 -5.12059,-10.92021124 -11.422323,-10.92021124 l 0,0 c -6.2982915,0 -11.4223248,4.90473444 -11.4223248,10.92021124"
+       class="cls-3"
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:nodetypes="cccsssccsccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4451"
+       width="29.070675"
+       height="21.932192"
+       x="0.46466279"
+       y="22.103146" />
+    <g
+       id="g5274"
+       transform="matrix(3.9839401,0,0,3.9837562,16.06424,16.064971)"
+       style="stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <path
+         id="path5264"
+         d="M 2,0 C 0.8919807,0 0,0.892 0,2 L 0,6 C 0,7.1081 0.8919807,8 2,8 L 6,8 C 7.108019,8 8,7.1081 8,6 L 8,2 C 8,0.892 7.108019,0 6,0 L 2,0 z"
+         style="fill:#9b59b6;fill-opacity:1;stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path5266"
+         d="M 4,1 C 3.51389,1 3.0599989,1.1705344 2.7402344,1.4902344 2.4204694,1.8100344 2.25,2.2639 2.25,2.75 l 1,0 C 3.25,2.4861 3.3295286,2.3149656 3.4472656,2.1972656 3.5650006,2.0795656 3.736112,2 4,2 4.26389,2 4.4349984,2.0799656 4.5527344,2.1972656 4.6704694,2.3149656 4.75,2.4861 4.75,2.75 4.75,2.9792 4.70483,3.0776625 4.6445312,3.1640625 4.5842412,3.2500625 4.4849756,3.3305938 4.3378906,3.4335938 4.1908036,3.5364937 3.9968862,3.6547344 3.8164062,3.8652344 3.6359262,4.0758344 3.5,4.3959 3.5,4.75 l 0,0.25 1,0 0,-0.25 C 4.5,4.6042 4.520309,4.578525 4.574219,4.515625 4.628109,4.452625 4.7466936,4.3697062 4.9121096,4.2539062 5.0775214,4.1381062 5.2907638,3.983975 5.4648438,3.734375 5.6389238,3.484875 5.75,3.1458 5.75,2.75 5.75,2.2639 5.5795326,1.8100344 5.2597656,1.4902344 4.9400006,1.1705344 4.486112,1 4,1 z m -0.5,5 0,1 1,0 0,-1 -1,0 z"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/icons/level-0.png b/src/icons/level-0.png
new file mode 100644
index 0000000..dac009d
Binary files /dev/null and b/src/icons/level-0.png differ
diff --git a/src/icons/level-0.svg b/src/icons/level-0.svg
new file mode 100644
index 0000000..063e228
--- /dev/null
+++ b/src/icons/level-0.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-0.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-0.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313708"
+     inkscape:cx="-11.284963"
+     inkscape:cy="25.539672"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g5274"
+       transform="matrix(5.9799555,0,0,5.9799555,0.08017817,0.0801784)"
+       style="stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <path
+         id="path5264"
+         d="M 2,0 C 0.8919807,0 0,0.892 0,2 L 0,6 C 0,7.1081 0.8919807,8 2,8 L 6,8 C 7.108019,8 8,7.1081 8,6 L 8,2 C 8,0.892 7.108019,0 6,0 L 2,0 z"
+         style="fill:#9b59b6;fill-opacity:1;stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path5266"
+         d="M 4,1 C 3.51389,1 3.0599989,1.1705344 2.7402344,1.4902344 2.4204694,1.8100344 2.25,2.2639 2.25,2.75 l 1,0 C 3.25,2.4861 3.3295286,2.3149656 3.4472656,2.1972656 3.5650006,2.0795656 3.736112,2 4,2 4.26389,2 4.4349984,2.0799656 4.5527344,2.1972656 4.6704694,2.3149656 4.75,2.4861 4.75,2.75 4.75,2.9792 4.70483,3.0776625 4.6445312,3.1640625 4.5842412,3.2500625 4.4849756,3.3305938 4.3378906,3.4335938 4.1908036,3.5364937 3.9968862,3.6547344 3.8164062,3.8652344 3.6359262,4.0758344 3.5,4.3959 3.5,4.75 l 0,0.25 1,0 0,-0.25 C 4.5,4.6042 4.520309,4.578525 4.574219,4.515625 4.628109,4.452625 4.7466936,4.3697062 4.9121096,4.2539062 5.0775214,4.1381062 5.2907638,3.983975 5.4648438,3.734375 5.6389238,3.484875 5.75,3.1458 5.75,2.75 5.75,2.2639 5.5795326,1.8100344 5.2597656,1.4902344 4.9400006,1.1705344 4.486112,1 4,1 z m -0.5,5 0,1 1,0 0,-1 -1,0 z"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.02681564;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/icons/level-1-enc.png b/src/icons/level-1-enc.png
new file mode 100644
index 0000000..961cbc4
Binary files /dev/null and b/src/icons/level-1-enc.png differ
diff --git a/src/icons/level-1-enc.svg b/src/icons/level-1-enc.svg
new file mode 100644
index 0000000..b18ab67
--- /dev/null
+++ b/src/icons/level-1-enc.svg
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-1-enc.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-1-enc.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+    <style
+       id="current-color-scheme-6"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="26.835933"
+     inkscape:cx="32.000001"
+     inkscape:cy="16.506905"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       id="path4195-5"
+       d="m 4.735958,11.384869 -0.2180253,10.7903 5.1525285,-0.07202 -0.065299,-10.718276 C 9.5837615,7.8717472 12.545973,5.0105892 16.147949,5.0105892 c 3.601974,0 6.542785,2.8579738 6.542785,6.3742838 l 0.04141,10.733498 4.827806,0.203711 0,-10.937209 c 0,-6.027957 -5.120591,-10.92021125 -11.422324,-10.92021125 l 0,0 c -6.2982911,0 -11.4223248,4.90473425 -11.4223248,10.92021125"
+       class="cls-3"
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:nodetypes="cccsssccsccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4451"
+       width="29.070675"
+       height="21.93219"
+       x="0.96466279"
+       y="22.103146" />
+    <g
+       id="g5434"
+       transform="matrix(3.9845616,0,0,3.9843743,-11.829435,-4117.1768)"
+       style="stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <path
+         id="path5436"
+         class="ColorScheme-Highlight"
+         d="m 15,1041.3622 a 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 4,4 0 0 1 4,4 z"
+         style="color:#3daee9;fill:currentColor;fill-opacity:1;stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="rect4241"
+         transform="translate(7,1037.3622)"
+         d="m 3.5,1 0,1 1,0 0,-1 -1,0 z m 0,2 0,4 1,0 0,-4 -1,0 z"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/icons/level-1.png b/src/icons/level-1.png
new file mode 100644
index 0000000..a8245c5
Binary files /dev/null and b/src/icons/level-1.png differ
diff --git a/src/icons/level-1.svg b/src/icons/level-1.svg
new file mode 100644
index 0000000..0cd2a08
--- /dev/null
+++ b/src/icons/level-1.svg
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-1.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-1.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+    <style
+       id="current-color-scheme-6"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313708"
+     inkscape:cx="-11.284963"
+     inkscape:cy="25.539672"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <g
+       id="g5434"
+       transform="matrix(5.9818121,0,0,5.9818121,-41.799933,-6205.233)"
+       style="stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">
+      <path
+         id="path5436"
+         class="ColorScheme-Highlight"
+         d="m 15,1041.3622 a 4,4 0 0 1 -4,4 4,4 0 0 1 -4,-4 4,4 0 0 1 4,-4 4,4 0 0 1 4,4 z"
+         style="color:#3daee9;fill:currentColor;fill-opacity:1;stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="rect4241"
+         transform="translate(7,1037.3622)"
+         d="m 3.5,1 0,1 1,0 0,-1 -1,0 z m 0,2 0,4 1,0 0,-4 -1,0 z"
+         style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.02432432;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/src/icons/level-2-enc.png b/src/icons/level-2-enc.png
new file mode 100644
index 0000000..88c8c5c
Binary files /dev/null and b/src/icons/level-2-enc.png differ
diff --git a/src/icons/level-2-enc.svg b/src/icons/level-2-enc.svg
new file mode 100644
index 0000000..2669bd6
--- /dev/null
+++ b/src/icons/level-2-enc.svg
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-2-enc.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-2-enc.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568543"
+     inkscape:cx="-39.439085"
+     inkscape:cy="39.861995"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+    <sodipodi:guide
+       position="0,0"
+       orientation="0,48"
+       id="guide4453" />
+    <sodipodi:guide
+       position="48,0"
+       orientation="-48,0"
+       id="guide4455" />
+    <sodipodi:guide
+       position="48,48"
+       orientation="0,-48"
+       id="guide4457" />
+    <sodipodi:guide
+       position="0,48"
+       orientation="48,0"
+       id="guide4459" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       id="path4195"
+       d="M 4.2359594,11.38487 4.0179339,22.175169 9.1704627,22.10315 9.1051672,11.384873 C 9.0837656,7.8717479 12.045977,5.0105895 15.647953,5.0105895 c 3.601975,0 6.542785,2.8579742 6.542785,6.3742835 l 0.04141,10.733499 4.827805,0.20371 0,-10.937209 c 0,-6.0279566 -5.120591,-10.92021125 -11.422324,-10.92021125 l 0,0 c -6.2982906,0 -11.4223243,4.90473485 -11.4223243,10.92021125"
+       class="cls-3"
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:nodetypes="cccsssccsccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4451"
+       width="29.070675"
+       height="21.93219"
+       x="0.46466279"
+       y="22.103146" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#141414;stroke-width:0.47197506;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 31.999994,16.235986 c -8.733266,0 -15.764006,7.030749 -15.764006,15.764013 0,8.733264 7.03074,15.764013 15.764006,15.764013 8.733265,0 15.764015,-7.030749 15.764015,-15.764013 0,-8.733264 -7.03075,-15.764013 -15.764015,-15.764013 z"
+       id="path4387"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       style="stroke:#ffffff;stroke-width:6.65334034;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0"
+       d="M 22.704998,31.346016 H 42.71243 M 32.708712,21.3423 v 20.007434"
+       id="path6" />
+  </g>
+</svg>
diff --git a/src/icons/level-2.png b/src/icons/level-2.png
new file mode 100644
index 0000000..505f9de
Binary files /dev/null and b/src/icons/level-2.png differ
diff --git a/src/icons/level-2.svg b/src/icons/level-2.svg
new file mode 100644
index 0000000..bca880e
--- /dev/null
+++ b/src/icons/level-2.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-2.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-2.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="21.252968"
+     inkscape:cy="41.031963"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1003"
+     inkscape:window-x="1918"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+    <sodipodi:guide
+       position="0,0"
+       orientation="0,48"
+       id="guide4453" />
+    <sodipodi:guide
+       position="48,0"
+       orientation="-48,0"
+       id="guide4455" />
+    <sodipodi:guide
+       position="48,48"
+       orientation="0,-48"
+       id="guide4457" />
+    <sodipodi:guide
+       position="0,48"
+       orientation="48,0"
+       id="guide4459" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#141414;stroke-width:0.70796257;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 23.999998,0.35398141 c -13.099895,0 -23.64601671,10.54612459 -23.64601671,23.64601959 0,13.099895 10.54612171,23.646018 23.64601671,23.646018 13.099896,0 23.646021,-10.546123 23.646021,-23.646018 0,-13.099895 -10.546125,-23.64601959 -23.646021,-23.64601959 z"
+       id="path4387"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       style="stroke:#ffffff;stroke-width:9.98001003;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       inkscape:connector-curvature="0"
+       d="M 10.0575,23.019027 H 40.06865 M 25.063075,8.0134522 V 38.024602"
+       id="path6" />
+  </g>
+</svg>
diff --git a/src/icons/level-3-enc.png b/src/icons/level-3-enc.png
new file mode 100644
index 0000000..fccbd9d
Binary files /dev/null and b/src/icons/level-3-enc.png differ
diff --git a/src/icons/level-3-enc.svg b/src/icons/level-3-enc.svg
new file mode 100644
index 0000000..9346cd1
--- /dev/null
+++ b/src/icons/level-3-enc.svg
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-3-enc.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-3-enc.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568543"
+     inkscape:cx="-39.439085"
+     inkscape:cy="37.210344"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+    <sodipodi:guide
+       position="0,0"
+       orientation="0,48"
+       id="guide4453" />
+    <sodipodi:guide
+       position="48,0"
+       orientation="-48,0"
+       id="guide4455" />
+    <sodipodi:guide
+       position="48,48"
+       orientation="0,-48"
+       id="guide4457" />
+    <sodipodi:guide
+       position="0,48"
+       orientation="48,0"
+       id="guide4459" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       id="path4195"
+       d="M 4.7359594,11.38487 4.5179339,22.175169 9.6704627,22.10315 9.6051672,11.384873 C 9.5837656,7.8717479 12.545977,5.0105895 16.147953,5.0105895 c 3.601975,0 6.542785,2.8579742 6.542785,6.3742835 l 0.04141,10.733499 4.827805,0.20371 0,-10.937209 c 0,-6.0279566 -5.120591,-10.92021125 -11.422324,-10.92021125 l 0,0 c -6.2982906,0 -11.4223243,4.90473485 -11.4223243,10.92021125"
+       class="cls-3"
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:nodetypes="cccsssccsccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4451"
+       width="29.070675"
+       height="21.93219"
+       x="0.96466279"
+       y="22.103146" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#141414;stroke-width:0.47290644;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 32,16.236454 c -8.733005,0 -15.763547,7.030541 -15.763547,15.763547 0,8.733005 7.030542,15.763546 15.763547,15.763546 8.733006,0 15.763547,-7.030541 15.763547,-15.763546 0,-8.733006 -7.030541,-15.763547 -15.763547,-15.763547 z"
+       id="path4387"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       d="m 40.334027,23.533934 -11.9037,11.9037 -3.9679,-3.967899 -3.967901,3.967899 3.967901,3.967901 3.9679,3.9679 15.8716,-15.8716 -3.9679,-3.967901 z"
+       id="path4389" />
+  </g>
+</svg>
diff --git a/src/icons/level-3.png b/src/icons/level-3.png
new file mode 100644
index 0000000..e62ba2f
Binary files /dev/null and b/src/icons/level-3.png differ
diff --git a/src/icons/level-3.svg b/src/icons/level-3.svg
new file mode 100644
index 0000000..d0867e0
--- /dev/null
+++ b/src/icons/level-3.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-3.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-2.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568543"
+     inkscape:cx="-39.439085"
+     inkscape:cy="39.950383"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1"
+     inkscape:snap-global="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+    <sodipodi:guide
+       position="0,0"
+       orientation="0,48"
+       id="guide4453" />
+    <sodipodi:guide
+       position="48,0"
+       orientation="-48,0"
+       id="guide4455" />
+    <sodipodi:guide
+       position="48,48"
+       orientation="0,-48"
+       id="guide4457" />
+    <sodipodi:guide
+       position="0,48"
+       orientation="48,0"
+       id="guide4459" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#141414;stroke-width:0.70935965;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 23.999999,0.35468014 c -13.099507,0 -23.64531919,10.54581186 -23.64531919,23.64532086 0,13.099507 10.54581219,23.645319 23.64531919,23.645319 13.099509,0 23.645321,-10.545812 23.645321,-23.645319 0,-13.099509 -10.545812,-23.64532086 -23.645321,-23.64532086 z"
+       id="path4387"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:none"
+       d="m 36.50104,11.300901 -17.85555,17.85555 -5.95185,-5.951849 -5.9518507,5.951849 5.9518507,5.951851 5.95185,5.95185 23.8074,-23.8074 -5.95185,-5.951851 z"
+       id="path4389" />
+  </g>
+</svg>
diff --git a/src/icons/level-4-enc.png b/src/icons/level-4-enc.png
new file mode 100644
index 0000000..da1d2ff
Binary files /dev/null and b/src/icons/level-4-enc.png differ
diff --git a/src/icons/level-4-enc.svg b/src/icons/level-4-enc.svg
new file mode 100644
index 0000000..5bda835
--- /dev/null
+++ b/src/icons/level-4-enc.svg
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-4-enc.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-4-enc.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="8"
+     inkscape:cx="-31.305587"
+     inkscape:cy="30.034712"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1060"
+     inkscape:window-x="3838"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       id="path4195-5"
+       d="m 4.235958,11.384869 -0.2180253,10.7903 5.1525285,-0.07202 -0.065299,-10.718276 C 9.0837615,7.8717472 12.045973,5.0105892 15.647949,5.0105892 c 3.601974,0 6.542785,2.8579738 6.542785,6.3742838 l 0.04141,10.733498 4.827806,0.203711 0,-10.937209 c 0,-6.027957 -5.120591,-10.92021125 -11.422324,-10.92021125 l 0,0 c -6.2982911,0 -11.4223248,4.90473425 -11.4223248,10.92021125"
+       class="cls-3"
+       inkscape:connector-curvature="0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       sodipodi:nodetypes="cccsssccsccc" />
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#141414;stroke-width:0.92932558;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect4451"
+       width="29.070675"
+       height="21.93219"
+       x="0.46466279"
+       y="22.103146" />
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#000000;stroke-width:0.33065793;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 32,16.16533 c -8.772408,0 -15.834671,7.062262 -15.834671,15.834672 0,8.772406 7.062263,15.83467 15.834671,15.83467 8.772408,0 15.834672,-7.062264 15.834672,-15.83467 C 47.834672,23.227592 40.772408,16.16533 32,16.16533 z"
+       id="path4387-2"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       class="ColorScheme-Text"
+       id="rect4161-9"
+       d="m 32.42467,17.908178 -3.92122,8.337264 -8.745447,1.335889 6.333333,6.494136 -1.496756,9.166044 7.83009,-4.329403 7.83009,4.329403 -1.496757,-9.166044 6.333334,-6.494136 -8.745446,-1.335889 -3.921221,-8.337264 z"
+       style="color:#4d4d4d;fill:#ffffff;fill-opacity:1;stroke:none"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/src/icons/level-4.png b/src/icons/level-4.png
new file mode 100644
index 0000000..90773ce
Binary files /dev/null and b/src/icons/level-4.png differ
diff --git a/src/icons/level-4.svg b/src/icons/level-4.svg
new file mode 100644
index 0000000..f79fe94
--- /dev/null
+++ b/src/icons/level-4.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48px"
+   height="48px"
+   id="svg3020"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   inkscape:export-filename="/home/aheinecke/arbeit/kf5/src/gpgol/src/icons/level-4.png"
+   inkscape:export-xdpi="75"
+   inkscape:export-ydpi="75"
+   sodipodi:docname="level-4.svg">
+  <defs
+     id="defs3022">
+    <style
+       id="current-color-scheme"
+       type="text/css">
+      .ColorScheme-Highlight {
+        color:#3daee9;
+      }
+      </style>
+    <style
+       id="current-color-scheme-7"
+       type="text/css">
+      .ColorScheme-Text {
+        color:#4d4d4d;
+      }
+      </style>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16"
+     inkscape:cx="18.719905"
+     inkscape:cy="24.701895"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:grid-bbox="true"
+     inkscape:document-units="px"
+     inkscape:window-width="1920"
+     inkscape:window-height="1003"
+     inkscape:window-x="1918"
+     inkscape:window-y="27"
+     inkscape:window-maximized="1">
+    <inkscape:grid
+       type="xygrid"
+       id="grid5432" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata3025">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#27ae60;fill-opacity:1;stroke:#000000;stroke-width:0.49598691;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       class="ColorScheme-PositiveText"
+       d="m 24.362995,0.32944437 c -13.158611,0 -23.75200602,10.59339463 -23.75200602,23.75200763 0,13.15861 10.59339502,23.752005 23.75200602,23.752005 13.158612,0 23.752007,-10.593395 23.752007,-23.752005 0,-13.158613 -10.593395,-23.75200763 -23.752007,-23.75200763 z"
+       id="path4387"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <path
+       class="ColorScheme-Text"
+       id="rect4161"
+       d="M 25,2.943716 19.11817,15.449612 6,17.453446 15.499999,27.19465 13.254865,40.943716 25,34.449611 36.745135,40.943716 34.499999,27.19465 44,17.453446 30.881831,15.449612 25,2.943716 z"
+       style="color:#4d4d4d;fill:#ffffff;fill-opacity:1;stroke:none"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
diff --git a/src/mail.cpp b/src/mail.cpp
index 395c75a..a872095 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -60,11 +60,6 @@ static std::set<std::string> uids_searched;
 
 #define COPYBUFSIZE (8 * 1024)
 
-/* Our own basic trust level for tofu.
-   GnuPG's can't be trusted. See comment
-   in get_valid_sig why.*/
-#define GPGOL_BASIC_TOFU_TRUST 10
-
 Mail::Mail (LPDISPATCH mailitem) :
     m_mailitem(mailitem),
     m_processed(false),
@@ -1238,44 +1233,33 @@ Mail::update_sigstate ()
   for (const auto sig: m_verify_result.signatures())
     {
       m_is_signed = true;
-      if (sig.validity() != Signature::Validity::Marginal &&
+      m_uid = get_uid_for_sender (sig.key(), sender.c_str());
+      if (!m_uid.isNull() && sig.validity() != Signature::Validity::Marginal &&
           sig.validity() != Signature::Validity::Full &&
           sig.validity() != Signature::Validity::Ultimate)
         {
-          /* For our category we only care about trusted sigs. */
+          /* For our category we only care about trusted sigs. And
+          the UID needs to match.*/
           continue;
         }
-      const auto uid = get_uid_for_sender (sig.key(), sender.c_str());
       if (sig.validity() == Signature::Validity::Marginal)
         {
-          const auto tofu = uid.tofuInfo();
+          const auto tofu = m_uid.tofuInfo();
           if (tofu.isNull() ||
-              (tofu.validity() != TofuInfo::Validity::LittleHistory &&
-               tofu.validity() != TofuInfo::Validity::BasicHistory &&
+              (tofu.validity() != TofuInfo::Validity::BasicHistory &&
                tofu.validity() != TofuInfo::Validity::LargeHistory))
             {
               /* Marginal is not good enough without tofu.
                  We also wait for basic trust. */
-              log_debug ("%s:%s: Discarding marginal signature.",
+              log_debug ("%s:%s: Discarding marginal signature."
+                         "With too little history.",
                          SRCNAME, __func__);
               continue;
             }
-          /* GnuPG uses the encrypt count to determine validity.
-             This does not make sense for us. E.g. Drafts may have
-             been encrypted and encryption is no communication so
-             it does not track communication history or consistency.
-             So basically "our" tofu validity is that more then 10 messages
-             have been exchanged. Which was the original code in GnuPG */
-          if (!tofu.isNull() && tofu.signCount() <= GPGOL_BASIC_TOFU_TRUST) {
-              log_debug ("%s:%s: Tofu signcount too small.",
-                         SRCNAME, __func__);
-              continue;
-          }
         }
       log_debug ("%s:%s: Classified sender as verified",
                  SRCNAME, __func__);
       m_sig = sig;
-      m_uid = uid;
       m_is_valid = true;
       return;
     }
@@ -1286,17 +1270,6 @@ Mail::update_sigstate ()
   return;
 }
 
-const std::pair <Signature, UserID>
-Mail::get_valid_sig ()
-{
-  std::pair <Signature, UserID> ret;
-  if (!m_is_valid)
-    {
-      return ret;
-    }
-  return std::pair<Signature, UserID> (m_sig, m_uid);
-}
-
 bool
 Mail::is_valid_sig ()
 {
@@ -1342,11 +1315,17 @@ Mail::update_categories ()
 }
 
 bool
-Mail::is_signed()
+Mail::is_signed() const
 {
   return m_verify_result.numSignatures() > 0;
 }
 
+bool
+Mail::is_encrypted() const
+{
+  return m_decrypt_result.numRecipients() > 0;
+}
+
 int
 Mail::set_uuid()
 {
@@ -1409,100 +1388,204 @@ Mail::set_uuid()
   return 0;
 }
 
+/* Returns -1 if the mail was signed by a uid with ownertrust
+   ultimate and to which we have the secret key.
+   This basically means "mail was signed by yourself"
+
+   Returns the number of the signature fromt the uid that belongs
+   made it ultimately or fully trusted if the mail was signed by some
+   ultimate key for which we don't have the secret key.
+   This is direct trust or CA Style PGP.
+
+   0 otherwise */
+static int
+level_4_check (const UserID &uid)
+{
+  if (uid.validity() == UserID::Validity::Ultimate)
+    {
+      /* TODO look for the signature that caused this
+         to be ultimate. And check if it is our own. */
+      return -1;
+    }
+  else if (uid.validity() == UserID::Validity::Full)
+    {
+      return 1;
+    }
+  return 0;
+}
+
 std::string
-Mail::get_signature_status()
+Mail::get_crypto_summary ()
 {
-  std::string message;
-  if (!is_signed())
+  const int level = get_signature_level ();
+
+  bool enc = is_encrypted ();
+  if (level > 3 && enc)
+    {
+      return _("Highly Secure");
+    }
+  if (level > 3)
     {
-      message =_("This message is not signed.\n");
-      message += _("You cannot be sure who wrote the message.");
-      return message;
+      return _("Highly Trustworthy");
     }
+  if (level >= 2 && enc)
+    {
+      return _("Secure");
+    }
+  if (level >= 2)
+    {
+      return _("Trustworthy");
+    }
+  if (enc)
+    {
+      return _("Encrypted");
+    }
+  if (is_signed ())
+    {
+      return _("Signed");
+    }
+  return _("Insecure");
+}
 
-  const auto pair = get_valid_sig ();
-  bool keyFound = false;
-  bool isOpenPGP = pair.first.key().protocol() == Protocol::OpenPGP;
+std::string
+Mail::get_crypto_details()
+{
+  /* Handle encrypt only */
+  if (!is_encrypted () && !is_signed ())
+    {
+      return _("You cannot be sure who sent, "
+               "modified and read the message in transit.");
+    }
+  else if (is_encrypted() && !is_signed ())
+    {
+      return _("You cannot be sure who sent the message as "
+               "it is not signed.");
+    }
+
+  std::string message;
+
+  bool keyFound = true;
+  bool isOpenPGP = m_sig.key().protocol() == Protocol::OpenPGP;
   char *buf;
   bool hasConflict = false;
-  if (!pair.first.isNull () && !pair.second.isNull ())
-    {
-      const auto sig = pair.first;
-      const auto uid = pair.second;
-      /* We are valid */
-      keyFound = true;
-      if (sig.validity() == Signature::Validity::Full ||
-          sig.validity() == Signature::Validity::Ultimate)
+  int level = get_signature_level ();
+
+  log_debug ("%s:%s: Formatting sig. Validity: %x Summary: %x Level: %i",
+             SRCNAME, __func__, m_sig.validity(), m_sig.summary(),
+             level);
+
+  if (level == 4)
+    {
+      /* level 4 check for direct trust */
+      int four_check = level_4_check (m_uid);
+
+      if (four_check == -1)
+        {
+          message = _("And you signed this message.");
+        }
+      else if (four_check >= 0)
         {
-          message += _("The sender address is fully trusted because:");
+          /* TODO
+            And you certified the identity of the sender.
+            And <uid with ultimate trust> certified the identity
+            of the sender.
+          */
         }
       else
         {
-          message += _("The sender address is trusted because:");
+          log_error ("%s:%s:%i BUG: Invalid sigstate.",
+                     SRCNAME, __func__, __LINE__);
+          return message;
         }
-      message += "\n\n";
-      message += isOpenPGP ? _("The used key") : _("The used certificate");
-      message += " ";
-      message += sig.validity() == Signature::Validity::Ultimate ?
-                      _("is marked as your own.") :
-                      sig.validity() == Signature::Validity::Full && isOpenPGP &&
-                      uid.tofuInfo().policy() == TofuInfo::PolicyGood ?
-                      _("was marked to be the right key for this address") :
-                      sig.validity() == Signature::Validity::Full && isOpenPGP ?
-                      _("was certified by enough trusted keys or yourself.") :
-                      "";
-      if (sig.validity() == Signature::Validity::Full && !isOpenPGP)
+    }
+  else if (level == 3 && isOpenPGP)
+    {
+      /* Level three is only reachable through web of trust and no
+         direct signature. */
+      message = _("And the senders identity was certified by several trusted people.");
+    }
+  else if (level == 3 && !isOpenPGP)
+    {
+      /* Level three is the only level for trusted S/MIME keys. */
+      gpgrt_asprintf (&buf, _("And the senders identity is cerified by the trusted issuer:\n'%s'\n"),
+                      m_sig.key().issuerName());
+      message = buf;
+      xfree (buf);
+    }
+  else if (level == 2)
+    {
+      /* Only reachable through TOFU Trust. */
+      if (m_uid.tofuInfo ().isNull ())
         {
-          gpgrt_asprintf (&buf, _("is cerified by the trusted issuer:\n'%s'\n"),
-                          sig.key().issuerName());
-          message += buf;
-          xfree (buf);
+          log_error ("%s:%s:%i BUG: Invalid sigstate.",
+                     SRCNAME, __func__, __LINE__);
+          return message;
         }
-      else if (sig.validity() == Signature::Validity::Marginal)
+
+      unsigned long first_contact = std::max (m_uid.tofuInfo().signFirst(),
+                                              m_uid.tofuInfo().encrFirst());
+      char *time = format_date_from_gpgme (first_contact);
+      /* i18n note signcount is always pulral because with signcount 1 we
+       * would not be in this branch. */
+      gpgrt_asprintf (&buf, _("And the senders address is trustworthy, because "
+                              "you have established a communication history "
+                              "with this address starting on %s.\n"
+                              "You encrypted %i times to this address and verified %i since."),
+                              time, m_uid.tofuInfo().signCount (),
+                              m_uid.tofuInfo().encrCount());
+      xfree (time);
+      message = buf;
+      xfree (buf);
+    }
+  else if (level == 1)
+    {
+      /* This could be marginal trust through pgp, or tofu with little
+         history. */
+      if (m_uid.tofuInfo ().validity() == TofuInfo::Validity::LittleHistory)
         {
-          char *time = format_date_from_gpgme (uid.tofuInfo().signFirst());
-          /* i18n note signcount is always pulral because with signcount 1 we
-           * would not be in this branch. */
-          gpgrt_asprintf (&buf, _("was used for %i messages since %s."),
-                          uid.tofuInfo().signCount (), time);
+          unsigned long first_contact = std::max (m_uid.tofuInfo().signFirst(),
+                                                  m_uid.tofuInfo().encrFirst());
+          char *time = format_date_from_gpgme (first_contact);
+          gpgrt_asprintf (&buf, _("But the senders address is not trustworthy yet because "
+                                  "you only verified %i messages and encrypted %i messages to "
+                                  "it since %s."),
+                                  m_uid.tofuInfo().signCount (),
+                                  m_uid.tofuInfo().encrCount (), time);
           xfree (time);
-          message += buf;
+          message = buf;
           xfree (buf);
         }
+      else if (m_uid.tofuInfo ().signCount() == 1)
+        {
+          message += _("But the senders signature was verified for the first time.");
+        }
+      else
+        {
+          /* Marginal trust through pgp */
+          message = _("Not enough trusted people or yourself "
+                      "have certified the senders identity.");
+        }
     }
   else
     {
-      if (m_verify_result.numSignatures() > 1)
-        {
-          log_debug ("%s:%s: More then one signature found on %p",
-                     SRCNAME, __func__, m_mailitem);
-        }
-      /* We only handle the first signature. */
-      const auto sig = m_verify_result.signature (0);
-      isOpenPGP = !is_smime();
-      keyFound = !(sig.summary() & Signature::Summary::KeyMissing);
-
-      log_debug ("%s:%s: Formatting sig. Validity: %x Summary: %x",
-                 SRCNAME, __func__, sig.validity(), sig.summary());
-
-      /* There is a signature but we don't accepted it as fully valid. */
-      message += _("The sender address is not trusted because:");
+      /* Now we are in level 0, this could be a technical problem, no key
+         or just unkown. */
+      message = _("But the sender address is not trustworthy because:");
       message += "\n\n";
+      keyFound = !(m_sig.summary() & Signature::Summary::KeyMissing);
 
       bool general_problem = true;
       /* First the general stuff. */
-      if (sig.summary() & Signature::Summary::Red)
+      if (m_sig.summary() & Signature::Summary::Red)
         {
           message += _("The signature is invalid.\n");
-          message += _("You cannot be sure who wrote the message.");
         }
-      else if (sig.summary() & Signature::Summary::SysError ||
+      else if (m_sig.summary() & Signature::Summary::SysError ||
                m_verify_result.numSignatures() < 1)
         {
           message += _("There was an error verifying the signature.\n");
-          message += _("You cannot be sure who wrote the message.");
         }
-      else if (sig.summary() & Signature::Summary::SigExpired)
+      else if (m_sig.summary() & Signature::Summary::SigExpired)
         {
           message += _("The signature is expired.\n");
         }
@@ -1513,81 +1596,62 @@ Mail::get_signature_status()
           general_problem = false;
         }
 
-      const auto uid = get_uid_for_sender (sig.key(), get_sender().c_str());
       /* Now the key problems */
-      if ((sig.summary() & Signature::Summary::KeyMissing))
+      if ((m_sig.summary() & Signature::Summary::KeyMissing))
         {
-          message += _("is not available for verification.");
+          message += _("is not available.");
         }
-      else if ((sig.summary() & Signature::Summary::KeyRevoked))
+      else if ((m_sig.summary() & Signature::Summary::KeyRevoked))
         {
           message += _("is revoked.");
         }
-      else if ((sig.summary() & Signature::Summary::KeyExpired))
+      else if ((m_sig.summary() & Signature::Summary::KeyExpired))
         {
           message += _("is expired.");
         }
-      else if ((sig.summary() & Signature::Summary::BadPolicy))
+      else if ((m_sig.summary() & Signature::Summary::BadPolicy))
         {
           message += _("is not meant for signing.");
         }
-      else if ((sig.summary() & Signature::Summary::CrlMissing))
+      else if ((m_sig.summary() & Signature::Summary::CrlMissing))
         {
           message += _("could not be checked for revocation.");
         }
-      else if ((sig.summary() & Signature::Summary::CrlTooOld))
+      else if ((m_sig.summary() & Signature::Summary::CrlTooOld))
         {
           message += _("could not be checked for revocation.");
         }
-      else if ((sig.summary() & Signature::Summary::TofuConflict) ||
-               uid.tofuInfo().validity() == TofuInfo::Conflict)
+      else if ((m_sig.summary() & Signature::Summary::TofuConflict) ||
+               m_uid.tofuInfo().validity() == TofuInfo::Conflict)
         {
           message += _("conflicts with another key that was used in the past by the sender.");
           hasConflict = true;
         }
-      else if (uid.isNull())
+      else if (m_uid.isNull())
         {
           gpgrt_asprintf (&buf, _("does not claim the address: \"%s\"."),
                           get_sender().c_str());
           message += buf;
           xfree (buf);
         }
-      else if ((sig.validity() & Signature::Validity::Marginal))
-        {
-          const auto tofuInfo = uid.tofuInfo();
-          if (tofuInfo.isNull() || !tofuInfo.signCount())
-            {
-              message += _("is not certified by enough trusted keys.");
-            }
-          else if (tofuInfo.signCount() == 1)
-            {
-              message += _("is seen for the first time.");
-            }
-          else
-            {
-              gpgrt_asprintf (&buf, "was only used for %i messages.",
-                              tofuInfo.signCount());
-              message += buf;
-              xfree (buf);
-            }
-        }
-      else if (((sig.validity() & Signature::Validity::Undefined) ||
-               (sig.validity() & Signature::Validity::Unknown) ||
-               (sig.summary() == Signature::Summary::None) ||
-               (sig.validity() == 0))&& !general_problem)
+      else if (((m_sig.validity() & Signature::Validity::Undefined) ||
+               (m_sig.validity() & Signature::Validity::Unknown) ||
+               (m_sig.summary() == Signature::Summary::None) ||
+               (m_sig.validity() == 0))&& !general_problem)
         {
            /* Bit of a catch all for weird results. */
-          message += _("is not certified by any trusted key.");
+          message += _("is not certified by any trustworthy key.");
         }
-      else if ((sig.validity() & Signature::Validity::Never))
+      else if ((m_sig.validity() & Signature::Validity::Never))
         {
-          message += _("is explicitly marked as invalid.");
+          message += _("is marked as not trustworthy.");
         }
     }
+  message += _("You cannot be sure who wrote or modified the message.");
   message += "\n\n";
   if (hasConflict)
     {
-      message += _("Click here to resolve the conflict.");
+      message += _("Click here to change the key used for this address.");
     }
   else if (keyFound)
     {
@@ -1602,33 +1666,52 @@ Mail::get_signature_status()
   return message;
 }
 
+
 int
-Mail::get_signature_icon_id () const
+Mail::get_signature_level () const
 {
-  if (!m_is_signed)
+  if (!m_is_signed || !is_encrypted ())
     {
-      return IDI_EMBLEM_INFORMATION_64_PNG;
+      return 0;
     }
-  const auto sig = m_verify_result.signature (0);
-  if ((sig.summary() & Signature::Summary::KeyMissing))
+
+  if (m_uid.isNull ())
     {
-      return IDI_EMBLEM_QUESTION_64_PNG;
+      /* No m_uid matches our sender. */
+      return 0;
+    }
+  if (m_is_valid && (m_uid.validity () == UserID::Validity::Ultimate ||
+      (m_uid.validity () == UserID::Validity::Full &&
+      level_4_check (m_uid))))
+    {
+      return 4;
     }
-  if (m_is_valid && sig.validity() == Signature::Validity::Full)
+  if (m_is_valid && m_uid.validity () == UserID::Validity::Full)
     {
-      return IDI_EMBLEM_SUCCESS_64_PNG;
+      return 3;
     }
-  else if (m_is_valid)
+  if (m_is_valid)
     {
-      return IDI_EMBLEM_SUCCESS_YELLOW_64_PNG;
+      return 2;
+    }
+  if (m_sig.validity() == Signature::Validity::Marginal)
+    {
+      return 1;
     }
-  const auto uid = get_uid_for_sender (sig.key(), m_sender.c_str());
-  if (sig.summary() & Signature::Summary::TofuConflict ||
-      uid.tofuInfo().validity() == TofuInfo::Conflict)
+  if (m_sig.summary() & Signature::Summary::TofuConflict ||
+      m_uid.tofuInfo().validity() == TofuInfo::Conflict)
     {
-      return IDI_EMBLEM_WARNING_64_PNG;
+      return 1;
     }
-  return IDI_EMBLEM_INFORMATION_64_PNG;
+  return 0;
+}
+
+int
+Mail::get_crypto_icon_id () const
+{
+  int level = get_signature_level ();
+  int offset = is_encrypted () ? ENCRYPT_ICON_OFFSET : 0;
+  return IDI_LEVEL_0 + level + offset;
 }
 
 const char*
diff --git a/src/mail.h b/src/mail.h
index 340b7e3..0767df4 100644
--- a/src/mail.h
+++ b/src/mail.h
@@ -234,15 +234,13 @@ public:
 
   /** Returns true if the mail was verified and has at least one
     signature. Regardless of the validity of the mail */
-  bool is_signed ();
+  bool is_signed () const;
 
-  /** Returns a non null signature / uid if the mail was verified and the validity
-    was high enough that we treat it as "verified sender" in
-    the UI. The signature / uid pair returned is the signature that was used
-    to determine the verified sender in that case. */
-  const std::pair<GpgME::Signature, GpgME::UserID> get_valid_sig ();
+  /** Returns true if the mail is encrypted to at least one
+    recipient. Regardless if it could be decrypted. */
+  bool is_encrypted () const;
 
-  /** Small helper to check if get_valid_sig returns non null results. */
+  /** Are we "green" */
   bool is_valid_sig ();
 
   /** Get UID gets UniqueID property of this mail. Returns
@@ -254,12 +252,16 @@ public:
     accessible. Returns -1 on error. */
   int set_uuid ();
 
-  /** Returns a localized string describing the signature state
-    of this mail. */
-  std::string get_signature_status ();
+  /** Returns a localized string describing in one or two
+    words the crypto status of this mail. */
+  std::string get_crypto_summary ();
+
+  /** Returns a localized string describing the detailed
+    crypto state of this mail. */
+  std::string get_crypto_details ();
 
   /** Get the icon id of the appropiate icon for this mail */
-  int get_signature_icon_id () const;
+  int get_crypto_icon_id () const;
 
   /** Get the fingerprint of an associated signature or null
       if it is not signed. */
@@ -309,6 +311,11 @@ public:
       after write event. */
   bool needs_encrypt () const;
   void set_needs_encrypt (bool val);
+
+  /** Gets the level of the signature. See:
+    https://wiki.gnupg.org/EasyGpg2016/AutomatedEncryption for
+    a definition of the levels. */
+  int get_signature_level () const;
 private:
   void update_categories ();
   void update_body ();
diff --git a/src/ribbon-callbacks.cpp b/src/ribbon-callbacks.cpp
index 2dbe80e..ae15756 100644
--- a/src/ribbon-callbacks.cpp
+++ b/src/ribbon-callbacks.cpp
@@ -1511,14 +1511,16 @@ get_mail_from_control (LPDISPATCH ctrl)
                SRCNAME, __func__, __LINE__); \
     }
 
-HRESULT get_is_signed (LPDISPATCH ctrl, VARIANT *result)
+HRESULT get_is_crypto (LPDISPATCH ctrl, VARIANT *result)
 {
   MY_MAIL_GETTER
 
   result->vt = VT_BOOL | VT_BYREF;
   result->pboolVal = (VARIANT_BOOL*) xmalloc (sizeof (VARIANT_BOOL));
-  *(result->pboolVal) = !mail ? VARIANT_FALSE :
-                        mail->is_signed () ? VARIANT_TRUE : VARIANT_FALSE;
+  *(result->pboolVal) = !mail ?
+                        VARIANT_FALSE :
+                        (mail->is_signed () || mail->is_encrypted ()) ?
+                        VARIANT_TRUE : VARIANT_FALSE;
 
   return S_OK;
 }
@@ -1533,27 +1535,12 @@ HRESULT get_sig_label (LPDISPATCH ctrl, VARIANT *result)
     {
       log_debug ("%s:%s: No mail.",
                  SRCNAME, __func__);
-      w_result = utf8_to_wchar (_("Not Trusted"));
+      w_result = utf8_to_wchar (_("Insecure"));
       result->bstrVal = SysAllocString (w_result);
       xfree (w_result);
       return S_OK;
     }
-  bool valid = mail->is_valid_sig ();
-  const auto pair = mail->get_valid_sig ();
-  bool fully = pair.first.validity() == GpgME::Signature::Validity::Full ||
-               pair.first.validity() == GpgME::Signature::Validity::Ultimate;
-  if (valid && fully)
-    {
-      w_result = utf8_to_wchar (_("Fully Trusted"));
-    }
-  else if (valid)
-    {
-      w_result = utf8_to_wchar (_("Trusted"));
-    }
-  else
-    {
-      w_result = utf8_to_wchar (_("Not Trusted"));
-    }
+  w_result = utf8_to_wchar (mail->get_crypto_summary ().c_str ());
   result->bstrVal = SysAllocString (w_result);
   xfree (w_result);
   return S_OK;
@@ -1565,17 +1552,16 @@ HRESULT get_sig_ttip (LPDISPATCH ctrl, VARIANT *result)
 
   result->vt = VT_BSTR;
   wchar_t *w_result;
-  if (mail && mail->is_signed ())
+  if (mail && (mail->is_signed () || mail->is_encrypted ()))
     {
       char *buf;
-      gpgrt_asprintf (&buf, _("This is a signed %s message."),
-                      mail->is_smime() ? _("S/MIME") : _("OpenPGP"));
+      gpgrt_asprintf (&buf, _("%s message."), mail->get_crypto_summary ().c_str());
       w_result = utf8_to_wchar (buf);
       xfree(buf);
     }
   else
     {
-      w_result = utf8_to_wchar (_("This message is not cryptographically signed."));
+      w_result = utf8_to_wchar (_("Insecure message."));
     }
   result->bstrVal = SysAllocString (w_result);
   xfree (w_result);
@@ -1587,17 +1573,16 @@ HRESULT get_sig_stip (LPDISPATCH ctrl, VARIANT *result)
   MY_MAIL_GETTER
 
   result->vt = VT_BSTR;
-  if (!mail)
+  if (!mail || (!mail->is_signed () && !mail->is_encrypted ()))
     {
-      log_debug ("%s:%s: No mail.",
-                 SRCNAME, __func__);
       wchar_t *w_result;
-      w_result = utf8_to_wchar (_("You cannot be sure who wrote the message."));
+      w_result = utf8_to_wchar (_("You cannot be sure who sent, "
+                                  "modified and read the message in transit."));
       result->bstrVal = SysAllocString (w_result);
       xfree (w_result);
       return S_OK;
     }
-  const auto message = mail->get_signature_status ();
+  const auto message = mail->get_crypto_details ();
   wchar_t *w_message = utf8_to_wchar (message.c_str());
   result->bstrVal = SysAllocString (w_message);
   xfree (w_message);
@@ -1665,13 +1650,13 @@ HRESULT launch_cert_details (LPDISPATCH ctrl)
   return S_OK;
 }
 
-HRESULT get_sigstate_icon (LPDISPATCH ctrl, VARIANT *result)
+HRESULT get_crypto_icon (LPDISPATCH ctrl, VARIANT *result)
 {
   MY_MAIL_GETTER
 
   if (mail)
     {
-      return getIcon (mail->get_signature_icon_id (), result);
+      return getIcon (mail->get_crypto_icon_id (), result);
     }
-  return getIcon (IDI_EMBLEM_INFORMATION_64_PNG, result);
+  return getIcon (IDI_LEVEL_0, result);
 }
diff --git a/src/ribbon-callbacks.h b/src/ribbon-callbacks.h
index f2a33f7..7b4bd37 100644
--- a/src/ribbon-callbacks.h
+++ b/src/ribbon-callbacks.h
@@ -42,7 +42,7 @@
 #define ID_GET_ENCRYPT_PRESSED  16
 #define ID_ON_LOAD              17
 #define ID_CMD_OPEN_OPTIONS     18
-#define ID_GET_IS_SIGNED        19
+#define ID_GET_IS_CRYPTO        19
 #define ID_CMD_MIME_SIGN_EX     21
 #define ID_CMD_MIME_ENCRYPT_EX  22
 #define ID_GET_SIGN_PRESSED_EX  23
@@ -86,7 +86,7 @@ HRESULT get_crypt_pressed (LPDISPATCH ctrl, int flags, VARIANT *result, bool is_
 /* Mark the mail to be mime encrypted on send. Flags as above */
 HRESULT mark_mime_action (LPDISPATCH ctrl, int flags, bool is_explorer);
 /* Check the if the mail was signed. Returns BOOL */
-HRESULT get_is_signed (LPDISPATCH ctrl, VARIANT *result);
+HRESULT get_is_crypto (LPDISPATCH ctrl, VARIANT *result);
 /* Get the label for the signature. Returns BSTR */
 HRESULT get_sig_label (LPDISPATCH ctrl, VARIANT *result);
 /* Get the tooltip for the signature. Returns BSTR */
@@ -96,7 +96,7 @@ HRESULT get_sig_stip (LPDISPATCH ctrl, VARIANT *result);
 /* Show a certificate details dialog. Returns nothing. */
 HRESULT launch_cert_details (LPDISPATCH ctrl);
 /* Callback to get the sigstate icon. */
-HRESULT get_sigstate_icon (LPDISPATCH ctrl, VARIANT *result);
+HRESULT get_crypto_icon (LPDISPATCH ctrl, VARIANT *result);
 /* Callback to get our own control reference */
 HRESULT ribbon_loaded (LPDISPATCH ctrl);
 #endif

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

Summary of changes:
 src/dialogs.h                          |  17 +-
 src/dialogs.rc                         |  19 +-
 src/gpgoladdin.cpp                     |  12 +-
 src/icons/Makefile.am                  |  16 +-
 src/icons/emblem-information-64.png    | Bin 1266 -> 0 bytes
 src/icons/emblem-information.svg       |  21 --
 src/icons/emblem-question-64.png       | Bin 1518 -> 0 bytes
 src/icons/emblem-question.svg          |  10 -
 src/icons/emblem-success-64.png        | Bin 1462 -> 0 bytes
 src/icons/emblem-success-yellow-64.png | Bin 2519 -> 0 bytes
 src/icons/emblem-success-yellow.svg    |  73 -------
 src/icons/emblem-success.svg           |  18 --
 src/icons/emblem-warning-64.png        | Bin 1117 -> 0 bytes
 src/icons/emblem-warning.svg           |  18 --
 src/icons/level-0-enc.png              | Bin 0 -> 1662 bytes
 src/icons/level-0-enc.svg              | 111 ++++++++++
 src/icons/level-0.png                  | Bin 0 -> 1257 bytes
 src/icons/level-0.svg                  |  97 +++++++++
 src/icons/level-1-enc.png              | Bin 0 -> 1648 bytes
 src/icons/level-1-enc.svg              | 116 ++++++++++
 src/icons/level-1.png                  | Bin 0 -> 1134 bytes
 src/icons/level-1.svg                  | 102 +++++++++
 src/icons/level-2-enc.png              | Bin 0 -> 1653 bytes
 src/icons/level-2-enc.svg              | 115 ++++++++++
 src/icons/level-2.png                  | Bin 0 -> 1182 bytes
 src/icons/level-2.svg                  | 101 +++++++++
 src/icons/level-3-enc.png              | Bin 0 -> 1928 bytes
 src/icons/level-3-enc.svg              | 115 ++++++++++
 src/icons/level-3.png                  | Bin 0 -> 1299 bytes
 src/icons/level-3.svg                  | 101 +++++++++
 src/icons/level-4-enc.png              | Bin 0 -> 1934 bytes
 src/icons/level-4-enc.svg              | 110 ++++++++++
 src/icons/level-4.png                  | Bin 0 -> 1989 bytes
 src/icons/level-4.svg                  |  92 ++++++++
 src/mail.cpp                           | 385 ++++++++++++++++++++-------------
 src/mail.h                             |  29 ++-
 src/mapihelp.cpp                       |  54 +++--
 src/mimedataprovider.cpp               |  39 ++--
 src/parsecontroller.cpp                |  17 +-
 src/ribbon-callbacks.cpp               |  49 ++---
 src/ribbon-callbacks.h                 |   6 +-
 src/versioninfo.rc.in                  |   2 +-
 42 files changed, 1433 insertions(+), 412 deletions(-)
 delete mode 100644 src/icons/emblem-information-64.png
 delete mode 100644 src/icons/emblem-information.svg
 delete mode 100644 src/icons/emblem-question-64.png
 delete mode 100644 src/icons/emblem-question.svg
 delete mode 100644 src/icons/emblem-success-64.png
 delete mode 100644 src/icons/emblem-success-yellow-64.png
 delete mode 100644 src/icons/emblem-success-yellow.svg
 delete mode 100644 src/icons/emblem-success.svg
 delete mode 100644 src/icons/emblem-warning-64.png
 delete mode 100644 src/icons/emblem-warning.svg
 create mode 100644 src/icons/level-0-enc.png
 create mode 100644 src/icons/level-0-enc.svg
 create mode 100644 src/icons/level-0.png
 create mode 100644 src/icons/level-0.svg
 create mode 100644 src/icons/level-1-enc.png
 create mode 100644 src/icons/level-1-enc.svg
 create mode 100644 src/icons/level-1.png
 create mode 100644 src/icons/level-1.svg
 create mode 100644 src/icons/level-2-enc.png
 create mode 100644 src/icons/level-2-enc.svg
 create mode 100644 src/icons/level-2.png
 create mode 100644 src/icons/level-2.svg
 create mode 100644 src/icons/level-3-enc.png
 create mode 100644 src/icons/level-3-enc.svg
 create mode 100644 src/icons/level-3.png
 create mode 100644 src/icons/level-3.svg
 create mode 100644 src/icons/level-4-enc.png
 create mode 100644 src/icons/level-4-enc.svg
 create mode 100644 src/icons/level-4.png
 create mode 100644 src/icons/level-4.svg


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




More information about the Gnupg-commits mailing list