/[emacs]/emacs/lisp/mh-e/mh-mime.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-mime.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by ttn, Wed May 18 11:01:20 2005 UTC revision 1.12 by wohler, Sat May 28 22:04:54 2005 UTC
# Line 1  Line 1 
1  ;;; mh-mime.el --- MH-E support for composing MIME messages  ;;; mh-mime.el --- MH-E support for composing MIME messages
2    
3  ;; Copyright (C) 1993, 1995, 2005 Free Software Foundation, Inc.  ;; Copyright (C) 1993, 1995,
4    ;; 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5    
6  ;; Author: Bill Wohler <wohler@newt.com>  ;; Author: Bill Wohler <wohler@newt.com>
7  ;; Maintainer: Bill Wohler <wohler@newt.com>  ;; Maintainer: Bill Wohler <wohler@newt.com>
# Line 1325  Parameter EL is unused." Line 1326  Parameter EL is unused."
1326               (point-max)))               (point-max)))
1327          (forward-line -1)))))          (forward-line -1)))))
1328    
1329    (defun mh-mime-security-button-face (info)
1330      "Return the button face to use for encrypted/signed mail based on INFO."
1331      (cond ((string-match "OK" info)       ;Decrypted mail
1332             mh-show-pgg-good-face)
1333            ((string-match "Failed" info)   ;Decryption failed or signature invalid
1334             mh-show-pgg-bad-face)
1335            ((string-match "Undecided" info);Unprocessed mail
1336             mh-show-pgg-unknown-face)
1337            ((string-match "Untrusted" info);Key not trusted
1338             mh-show-pgg-unknown-face)
1339            (t mh-show-pgg-good-face)))
1340    
1341  (defun mh-mime-security-press-button (handle)  (defun mh-mime-security-press-button (handle)
1342    "Callback from security button for part HANDLE."    "Callback from security button for part HANDLE."
1343    (if (mm-handle-multipart-ctl-parameter handle 'gnus-info)    (if (mm-handle-multipart-ctl-parameter handle 'gnus-info)
# Line 1364  Parameter EL is unused." Line 1377  Parameter EL is unused."
1377           (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)           (info (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
1378                     "Undecided"))                     "Undecided"))
1379           (details (mm-handle-multipart-ctl-parameter handle 'gnus-details))           (details (mm-handle-multipart-ctl-parameter handle 'gnus-details))
1380           pressed-details begin end)           pressed-details begin end face)
1381      (setq details (if details (concat "\n" details) ""))      (setq details (if details (concat "\n" details) ""))
1382      (setq pressed-details (if mh-mime-security-button-pressed details ""))      (setq pressed-details (if mh-mime-security-button-pressed details ""))
1383        (setq face (mh-mime-security-button-face info))
1384      (unless (bolp) (insert "\n"))      (unless (bolp) (insert "\n"))
1385      (setq begin (point))      (setq begin (point))
1386      (gnus-eval-format      (gnus-eval-format
# Line 1382  Parameter EL is unused." Line 1396  Parameter EL is unused."
1396                             :mime-handle handle                             :mime-handle handle
1397                             :action 'mh-widget-press-button                             :action 'mh-widget-press-button
1398                             :button-keymap mh-mime-security-button-map                             :button-keymap mh-mime-security-button-map
1399                               :button-face face
1400                             :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.")                             :help-echo "Mouse-2 click or press RET (in show buffer) to see security details.")
1401      (dolist (ov (mh-funcall-if-exists overlays-in begin end))      (dolist (ov (mh-funcall-if-exists overlays-in begin end))
1402        (mh-funcall-if-exists overlay-put ov 'evaporate t))        (mh-funcall-if-exists overlay-put ov 'evaporate t))

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26