mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-27 13:17:56 +01:00
emacs: Drop content-free "Unknown signature status" button
When we have not been able to evaluate the signature status of a given MIME part, showing a content-free (and interaction-free) "[ Unknown signature status ]" button doesn't really help the user at all, and takes up valuable screen real-estate. A visual reminder that a given message is *not* signed isn't helpful unless it is always present, in which case we'd want to see "[ Unknown signature status ]" buttons on all messages, even ones that don't have a signing structure, but i don't think we want that. Amended by db to drop the unused initialization of 'label'
This commit is contained in:
parent
fa9d8b7026
commit
9300defd64
5 changed files with 16 additions and 17 deletions
|
@ -93,7 +93,8 @@ mode."
|
||||||
(defun notmuch-crypto-insert-sigstatus-button (sigstatus from)
|
(defun notmuch-crypto-insert-sigstatus-button (sigstatus from)
|
||||||
(let* ((status (plist-get sigstatus :status))
|
(let* ((status (plist-get sigstatus :status))
|
||||||
(help-msg nil)
|
(help-msg nil)
|
||||||
(label "Signature not processed")
|
(show-button t)
|
||||||
|
(label nil)
|
||||||
(face 'notmuch-crypto-signature-unknown)
|
(face 'notmuch-crypto-signature-unknown)
|
||||||
(button-action (lambda (button) (message (button-get button 'help-echo)))))
|
(button-action (lambda (button) (message (button-get button 'help-echo)))))
|
||||||
(cond
|
(cond
|
||||||
|
@ -118,19 +119,21 @@ mode."
|
||||||
(let ((keyid (concat "0x" (plist-get sigstatus :keyid))))
|
(let ((keyid (concat "0x" (plist-get sigstatus :keyid))))
|
||||||
(setq label (concat "Bad signature (claimed key ID " keyid ")"))
|
(setq label (concat "Bad signature (claimed key ID " keyid ")"))
|
||||||
(setq face 'notmuch-crypto-signature-bad)))
|
(setq face 'notmuch-crypto-signature-bad)))
|
||||||
|
(status
|
||||||
|
(setq label (concat "Unknown signature status: " status)))
|
||||||
(t
|
(t
|
||||||
(setq label (concat "Unknown signature status"
|
(setq show-button nil)))
|
||||||
(if status (concat ": " status))))))
|
(when show-button
|
||||||
(insert-button
|
(insert-button
|
||||||
(concat "[ " label " ]")
|
(concat "[ " label " ]")
|
||||||
:type 'notmuch-crypto-status-button-type
|
:type 'notmuch-crypto-status-button-type
|
||||||
'help-echo help-msg
|
'help-echo help-msg
|
||||||
'face face
|
'face face
|
||||||
'mouse-face face
|
'mouse-face face
|
||||||
'action button-action
|
'action button-action
|
||||||
:notmuch-sigstatus sigstatus
|
:notmuch-sigstatus sigstatus
|
||||||
:notmuch-from from)
|
:notmuch-from from)
|
||||||
(insert "\n")))
|
(insert "\n"))))
|
||||||
|
|
||||||
(declare-function notmuch-show-refresh-view "notmuch-show" (&optional reset-state))
|
(declare-function notmuch-show-refresh-view "notmuch-show" (&optional reset-state))
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ Date: Sat, 01 Jan 2000 12:00:00 +0000
|
||||||
|
|
||||||
[ multipart/encrypted ]
|
[ multipart/encrypted ]
|
||||||
[ Decryption successful ]
|
[ Decryption successful ]
|
||||||
[ Unknown signature status ]
|
|
||||||
[ application/pgp-encrypted ]
|
[ application/pgp-encrypted ]
|
||||||
[ text/plain ]
|
[ text/plain ]
|
||||||
The password is "abcd1234!", please do not tell anyone.
|
The password is "abcd1234!", please do not tell anyone.
|
||||||
|
|
|
@ -5,6 +5,5 @@ Date: Sat, 01 Jan 2000 12:00:00 +0000
|
||||||
|
|
||||||
[ multipart/encrypted ]
|
[ multipart/encrypted ]
|
||||||
[ Unknown encryption status ]
|
[ Unknown encryption status ]
|
||||||
[ Unknown signature status ]
|
|
||||||
[ application/pgp-encrypted ]
|
[ application/pgp-encrypted ]
|
||||||
[ application/octet-stream ]
|
[ application/octet-stream ]
|
||||||
|
|
|
@ -9,7 +9,6 @@ Subject: [notmuch] Working with Maildir storage?
|
||||||
|
|
||||||
[ multipart/mixed ]
|
[ multipart/mixed ]
|
||||||
[ multipart/signed ]
|
[ multipart/signed ]
|
||||||
[ Unknown signature status ]
|
|
||||||
[ text/plain ]
|
[ text/plain ]
|
||||||
> See the patch just posted here.
|
> See the patch just posted here.
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,5 @@ Date: Thu, 22 Dec 2016 08:34:56 -0400
|
||||||
|
|
||||||
[ multipart/encrypted ]
|
[ multipart/encrypted ]
|
||||||
[ Decryption error ]
|
[ Decryption error ]
|
||||||
[ Unknown signature status ]
|
|
||||||
[ application/pgp-encrypted ]
|
[ application/pgp-encrypted ]
|
||||||
[ application/octet-stream ]
|
[ application/octet-stream ]
|
||||||
|
|
Loading…
Reference in a new issue