No decrypt menu item for non GpgOL messages.
authorWerner Koch <wk@gnupg.org>
Thu, 26 Feb 2009 10:06:18 +0000 (10:06 +0000)
committerWerner Koch <wk@gnupg.org>
Thu, 26 Feb 2009 10:06:18 +0000 (10:06 +0000)
src/ChangeLog
src/ext-commands.cpp

index ae7dff3..043eda6 100644 (file)
@@ -1,5 +1,8 @@
 2009-02-26  Werner Koch  <wk@g10code.com>
 
+       * ext-commands.cpp (InstallCommands): Disable decrypt button for
+       non GpgOl messages.
+
        * engine.c (engine_encrypt_prepare): Add arg SENDER.
        * engine-assuan.c (op_assuan_encrypt): Ditto.
        * mimemaker.c (do_mime_sign): Free sender string.
index cbc0b36..09b4ad3 100644 (file)
@@ -541,11 +541,10 @@ GpgolExtCommands::InstallCommands (
       ul_release (message, __func__, __LINE__);
       ul_release (mdb, __func__, __LINE__);
       
-      /* We always enable the verify button as it might be useful on
-         an already decrypted message. */
       add_menu (eecb, pnCommandIDBase,
         "@", NULL,
-        opt.disable_gpgol? "":_("GpgOL Decrypt/Verify"), &m_nCmdCryptoState,
+        (opt.disable_gpgol || not_a_gpgol_message)?
+                "" : _("GpgOL Decrypt/Verify"), &m_nCmdCryptoState,
         opt.enable_debug? "GpgOL Debug-0 (display crypto info)":"", 
                 &m_nCmdDebug0,
         (opt.enable_debug && !opt.disable_gpgol)?