emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mh-e/mh-mime.el


From: Bill Wohler
Subject: [Emacs-diffs] Changes to emacs/lisp/mh-e/mh-mime.el
Date: Sat, 28 May 2005 18:04:59 -0400

Index: emacs/lisp/mh-e/mh-mime.el
diff -c emacs/lisp/mh-e/mh-mime.el:1.11 emacs/lisp/mh-e/mh-mime.el:1.12
*** emacs/lisp/mh-e/mh-mime.el:1.11     Wed May 18 11:01:20 2005
--- emacs/lisp/mh-e/mh-mime.el  Sat May 28 22:04:54 2005
***************
*** 1,6 ****
  ;;; mh-mime.el --- MH-E support for composing MIME messages
  
! ;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.
  
  ;; Author: Bill Wohler <address@hidden>
  ;; Maintainer: Bill Wohler <address@hidden>
--- 1,7 ----
  ;;; mh-mime.el --- MH-E support for composing MIME messages
  
! ;; Copyright (C) 1993, 1995,
! ;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  
  ;; Author: Bill Wohler <address@hidden>
  ;; Maintainer: Bill Wohler <address@hidden>
***************
*** 1325,1330 ****
--- 1326,1343 ----
               (point-max)))
          (forward-line -1)))))
  
+ (defun mh-mime-security-button-face (info)
+   "Return the button face to use for encrypted/signed mail based on INFO."
+   (cond ((string-match "OK" info)       ;Decrypted mail
+          mh-show-pgg-good-face)
+         ((string-match "Failed" info)   ;Decryption failed or signature 
invalid
+          mh-show-pgg-bad-face)
+         ((string-match "Undecided" info);Unprocessed mail
+          mh-show-pgg-unknown-face)
+         ((string-match "Untrusted" info);Key not trusted
+          mh-show-pgg-unknown-face)
+         (t mh-show-pgg-good-face)))
+ 
  (defun mh-mime-security-press-button (handle)
    "Callback from security button for part HANDLE."
    (if (mm-handle-multipart-ctl-parameter handle 'gnus-info)
***************
*** 1364,1372 ****
           (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
                     "Undecided"))
           (details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
!          pressed-details begin end)
      (setq details (if details (concat "\n" details) ""))
      (setq pressed-details (if mh-mime-security-button-pressed details ""))
      (unless (bolp) (insert "\n"))
      (setq begin (point))
      (gnus-eval-format
--- 1377,1386 ----
           (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
                     "Undecided"))
           (details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
!          pressed-details begin end face)
      (setq details (if details (concat "\n" details) ""))
      (setq pressed-details (if mh-mime-security-button-pressed details ""))
+     (setq face (mh-mime-security-button-face info))
      (unless (bolp) (insert "\n"))
      (setq begin (point))
      (gnus-eval-format
***************
*** 1382,1387 ****
--- 1396,1402 ----
                             :mime-handle handle
                             :action 'mh-widget-press-button
                             :button-keymap mh-mime-security-button-map
+                            :button-face face
                             :help-echo "Mouse-2 click or press RET (in show 
buffer) to see security details.")
      (dolist (ov (mh-funcall-if-exists overlays-in begin end))
        (mh-funcall-if-exists overlay-put ov 'evaporate t))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]