Status icon fix.
authorWerner Koch <wk@gnupg.org>
Wed, 26 Nov 2008 16:09:46 +0000 (16:09 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 26 Nov 2008 16:09:46 +0000 (16:09 +0000)
src/ChangeLog
src/ext-commands.cpp

index 1b4f942..5d1a49a 100644 (file)
@@ -1,5 +1,8 @@
 2008-11-26  Werner Koch  <wk@g10code.com>
 
+       * ext-commands.cpp (InstallCommands): Don't show status icon for
+       non-gpgol messages.
+
        * config-dialog.c (start_key_manager): Remove.
        * ext-commands.cpp (DoCommand): Do not use start_key_manager as a
        fallback.
index 117f89a..0ad1fae 100644 (file)
@@ -502,6 +502,8 @@ GpgolExtCommands::InstallCommands (
   if (m_lContext == EECONTEXT_READNOTEMESSAGE)
     {
       int is_encrypted = 0;
+      int not_a_gpgol_message = 0;
+      
       LPMDB mdb = NULL;
       LPMESSAGE message = NULL;
 
@@ -519,6 +521,11 @@ GpgolExtCommands::InstallCommands (
               if ( mapi_test_sig_status (message) )
                 is_encrypted++;
               break;
+            case MSGTYPE_GPGOL:
+            case MSGTYPE_SMIME:
+            case MSGTYPE_UNKNOWN:
+              not_a_gpgol_message = 1;
+              break;
             default:
               break;
             }
@@ -541,7 +548,7 @@ GpgolExtCommands::InstallCommands (
                 &m_nCmdDebug3,
         NULL);
 
-      if (!opt.disable_gpgol)
+      if (!opt.disable_gpgol && !not_a_gpgol_message)
         add_toolbar (pTBEArray, nTBECnt, 
                      is_encrypted == 2 
                      ? _("This is a signed and encrypted message.\n"