X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-crypto.el;fp=emacs%2Fnotmuch-crypto.el;h=4216f58327a9fb0bef08670fa88f0b6e4723874a;hp=353f721e2593c2fb977612a088d1378534e7ee21;hb=9300defd64acf68b8e6fa6fbd89b8050168bb63d;hpb=fa9d8b702666adc5fe5759c352a9e8467c436804 diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 353f721e..4216f583 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -93,7 +93,8 @@ mode." (defun notmuch-crypto-insert-sigstatus-button (sigstatus from) (let* ((status (plist-get sigstatus :status)) (help-msg nil) - (label "Signature not processed") + (show-button t) + (label nil) (face 'notmuch-crypto-signature-unknown) (button-action (lambda (button) (message (button-get button 'help-echo))))) (cond @@ -118,19 +119,21 @@ mode." (let ((keyid (concat "0x" (plist-get sigstatus :keyid)))) (setq label (concat "Bad signature (claimed key ID " keyid ")")) (setq face 'notmuch-crypto-signature-bad))) + (status + (setq label (concat "Unknown signature status: " status))) (t - (setq label (concat "Unknown signature status" - (if status (concat ": " status)))))) - (insert-button - (concat "[ " label " ]") - :type 'notmuch-crypto-status-button-type - 'help-echo help-msg - 'face face - 'mouse-face face - 'action button-action - :notmuch-sigstatus sigstatus - :notmuch-from from) - (insert "\n"))) + (setq show-button nil))) + (when show-button + (insert-button + (concat "[ " label " ]") + :type 'notmuch-crypto-status-button-type + 'help-echo help-msg + 'face face + 'mouse-face face + 'action button-action + :notmuch-sigstatus sigstatus + :notmuch-from from) + (insert "\n")))) (declare-function notmuch-show-refresh-view "notmuch-show" (&optional reset-state))