From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63054 Path: news.gmane.org!not-for-mail From: Max Froumentin Newsgroups: gmane.emacs.gnus.general Subject: Security buttons without a face (was: Display of GPG results) Date: Fri, 28 Apr 2006 16:13:13 +0100 Organization: none Message-ID: <87lktppwc6.fsf_-_@lapin-bleu.net> References: <871wvtbzwn.fsf@lapin-bleu.net> <87wtdft96c.fsf@lapin-bleu.net> <87d5f6kjcc.fsf@w3.org> <9eslo2alzk.fsf@gowron.rz-berlin.mpg.de> <871wvl95b6.fsf@lapin-bleu.net> <9emze9trg9.fsf@doze.jochen-kuepper.de> <87odyobp8d.fsf@lapin-bleu.net> <87u08gtwjo.fsf@latte.josefsson.org> <877j5bw63y.fsf@bolshevik.w3.org> <8764kvce3d.fsf@bolshevik.w3.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1146237729 12868 80.91.229.2 (28 Apr 2006 15:22:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Apr 2006 15:22:09 +0000 (UTC) Original-X-From: ding-owner+m11581@lists.math.uh.edu Fri Apr 28 17:22:06 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FZUms-0002uY-1M for ding-account@gmane.org; Fri, 28 Apr 2006 17:21:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FZUml-0002Sy-00; Fri, 28 Apr 2006 10:21:35 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FZUfY-0002Ss-00 for ding@lists.math.uh.edu; Fri, 28 Apr 2006 10:14:08 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FZUfW-0004fk-0W for ding@lists.math.uh.edu; Fri, 28 Apr 2006 10:14:08 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FZUfU-0006RN-00 for ; Fri, 28 Apr 2006 17:14:04 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FZUf9-0001NF-Mq for ding@gnus.org; Fri, 28 Apr 2006 17:13:44 +0200 Original-Received: from dhcp-01.ilrt.bris.ac.uk ([137.222.34.201]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Apr 2006 17:13:43 +0200 Original-Received: from max by dhcp-01.ilrt.bris.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Apr 2006 17:13:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 108 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dhcp-01.ilrt.bris.ac.uk User-Agent: Gnus/5.110005 (No Gnus v0.5) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:w0JFbeYDz3xDPDr5bwAD77zeqZE= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:63054 Archived-At: --=-=-= Me again... So, now that I can see my PGP signature buttons, I'm bothered because they don't look like other buttons. Indeed, gnus-article-button-face isn't used to display them. And that applies to mime buttons, too. Is it intended? If not, I suggest a simple fix: insert (when gnus-article-button-face (gnus-overlay-put (gnus-make-overlay b e) 'face gnus-article-button-face)) in both button creation functions (taken from gnus-article-add-button). Patch attached. --=-=-= Content-Disposition: inline; filename=gnus-art.el.diff Content-Description: diff against 7.168 --- gnus-art.el 2006-04-28 15:59:02.000000000 +0100 +++ gnus-art-new.el 2006-04-28 15:58:35.000000000 +0100 @@ -870,8 +870,7 @@ :group 'gnus-article-mime :type '(repeat regexp)) -(defcustom gnus-buttonized-mime-types (unless (eq mm-verify-option 'never) - '("multipart/signed")) +(defcustom gnus-buttonized-mime-types nil "List of MIME types that should be given buttons when rendered inline. If set, this variable overrides `gnus-unbuttonized-mime-types'. To see e.g. security buttons you could set this to @@ -4993,6 +4992,9 @@ ;; Exclude a newline. (1- (point)) (point))) + (when gnus-article-button-face + (gnus-overlay-put (gnus-make-overlay b e) + 'face gnus-article-button-face)) (widget-convert-button 'link b e :mime-handle handle @@ -7694,6 +7696,9 @@ ;; Exclude a newline. (1- (point)) (point))) + (when gnus-article-button-face + (gnus-overlay-put (gnus-make-overlay b e) + 'face gnus-article-button-face)) (widget-convert-button 'link b e :mime-handle handle @@ -7711,22 +7716,28 @@ (aref gnus-down-mouse-3 0)))))) (defun gnus-mime-display-security (handle) - (save-restriction - (narrow-to-region (point) (point)) - (unless (gnus-unbuttonized-mime-type-p (car handle)) - (gnus-insert-mime-security-button handle)) - (gnus-mime-display-part (cadr handle)) - (unless (bolp) - (insert "\n")) - (unless (gnus-unbuttonized-mime-type-p (car handle)) - (let ((gnus-mime-security-button-line-format - gnus-mime-security-button-end-line-format)) - (gnus-insert-mime-security-button handle))) - (mm-set-handle-multipart-parameter - handle 'gnus-region - (cons (set-marker (make-marker) (point-min)) - (set-marker (make-marker) (point-max)))))) - + (let ((gnus-buttonized-mime-types + ;; when this function is called, the signature has been verified, + ;; so we might as well display the button. + (if (or (eq mm-verify-option 'always) (eq mm-verify-option 'known)) + (append '("multipart/signed") gnus-buttonized-mime-types) + gnus-buttonized-mime-types))) + (save-restriction + (narrow-to-region (point) (point)) + (unless (gnus-unbuttonized-mime-type-p (car handle)) + (gnus-insert-mime-security-button handle)) + (gnus-mime-display-part (cadr handle)) + (unless (bolp) + (insert "\n")) + (unless (gnus-unbuttonized-mime-type-p (car handle)) + (let ((gnus-mime-security-button-line-format + gnus-mime-security-button-end-line-format)) + (gnus-insert-mime-security-button handle))) + (mm-set-handle-multipart-parameter + handle 'gnus-region + (cons (set-marker (make-marker) (point-min)) + (set-marker (make-marker) (point-max))))))) + (defun gnus-mime-security-run-function (function) "Run FUNCTION with the security part under point." (gnus-article-check-buffer) --=-=-= Max. --=-=-=--