]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
emacs: Improve crypto button labels.
authorDavid Edmondson <dme@dme.org>
Tue, 9 Feb 2016 12:23:49 +0000 (12:23 +0000)
committerDavid Bremner <david@tethera.net>
Thu, 24 Mar 2016 10:58:52 +0000 (07:58 -0300)
Make the labels for both encryption and signature buttons share a common
format, in which both report the status if it is not one of those known.

emacs/notmuch-crypto.el

index 52338249a82867a4e0fea4fb7788264fc9b15bd4..73ebf51df0b825d38e88506ecb34c19b5edfa50b 100644 (file)
@@ -110,8 +110,8 @@ mode."
        (setq label (concat "Bad signature (claimed key ID " keyid ")"))
        (setq face 'notmuch-crypto-signature-bad)))
      (t
-      (setq label "Unknown signature status")
-      (if status (setq label (concat label " \"" status "\"")))))
+      (setq label (concat "Unknown signature status"
+                         (if status (concat ": " status))))))
     (insert-button
      (concat "[ " label " ]")
      :type 'notmuch-crypto-status-button-type
@@ -161,7 +161,8 @@ mode."
      ((string= status "bad")
       (setq label "Decryption error"))
      (t
-      (setq label (concat "Unknown encstatus \"" status "\""))))
+      (setq label (concat "Unknown encryption status"
+                         (if status (concat ": " status))))))
     (insert-button
      (concat "[ " label " ]")
      :type 'notmuch-crypto-status-button-type