X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-crypto.el;h=4216f58327a9fb0bef08670fa88f0b6e4723874a;hb=74a1b5ac65b31f7ebc1258b259b8c355023e21b4;hp=353f721e2593c2fb977612a088d1378534e7ee21;hpb=3c752b855f900f5251df9997514b4d27d9f38e83;p=notmuch 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))