From: Max Froumentin <max@lapin-bleu.net>
Subject: Security buttons without a face (was: Display of GPG results)
Date: Fri, 28 Apr 2006 16:13:13 +0100 [thread overview]
Message-ID: <87lktppwc6.fsf_-_@lapin-bleu.net> (raw)
In-Reply-To: <8764kvce3d.fsf@bolshevik.w3.org>
[-- Attachment #1: Type: text/plain, Size: 507 bytes --]
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.
[-- Attachment #2: diff against 7.168 --]
[-- Type: text/plain, Size: 3024 bytes --]
--- 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)
[-- Attachment #3: Type: text/plain, Size: 6 bytes --]
Max.
next prev parent reply other threads:[~2006-04-28 15:13 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-19 10:52 bugs: slow scoring in emacs 22, slow PGP in No Gnus v0.4, serious PGP signing bug Max Froumentin
2006-04-19 21:54 ` Elias Oltmanns
2006-04-24 13:01 ` bugs: slow scoring in emacs 22 Max Froumentin
2006-05-06 19:10 ` Elias Oltmanns
2006-04-22 0:17 ` bugs: slow scoring in emacs 22, slow PGP in No Gnus v0.4, serious PGP signing bug Lars Magne Ingebrigtsen
2006-04-24 13:06 ` Max Froumentin
2006-04-24 16:51 ` slow PGP in No Gnus v0.4 Max Froumentin
[not found] ` <87d5f6kjcc.fsf-Pl0VvzL1eo4@public.gmane.org>
2006-04-24 18:04 ` Jochen Küpper
2006-04-25 13:02 ` Max Froumentin
[not found] ` <871wvl95b6.fsf-j8nGiIS5Ut1oeR6VNtCasQ@public.gmane.org>
2006-04-25 18:56 ` Jochen Küpper
2006-04-26 10:33 ` Max Froumentin
2006-04-26 11:18 ` Simon Josefsson
2006-04-26 14:12 ` Display of GPG results (was: slow PGP in No Gnus v0.4) Reiner Steib
2006-04-27 12:33 ` Display of GPG results Max Froumentin
2006-04-27 14:01 ` Max Froumentin
2006-04-28 15:13 ` Max Froumentin [this message]
2006-04-29 12:39 ` Reiner Steib
2006-04-30 20:43 ` Max Froumentin
2006-04-30 10:24 ` Lars Magne Ingebrigtsen
2006-04-30 20:53 ` Max Froumentin
2006-04-30 20:56 ` Max Froumentin
2006-04-30 10:22 ` slow PGP in No Gnus v0.4 Lars Magne Ingebrigtsen
[not found] ` <m3zmi32wj0.fsf-qBEgNjfYAPolG3ThADb//ti2O/JbrIOy@public.gmane.org>
2006-04-30 11:14 ` Jochen Küpper
2006-04-30 11:33 ` Lars Magne Ingebrigtsen
2006-04-30 12:22 ` Elias Oltmanns
2006-04-30 12:38 ` Lars Magne Ingebrigtsen
2006-04-30 14:31 ` Juliusz Chroboczek
2006-04-30 22:21 ` gdt
2006-05-01 13:36 ` Juliusz Chroboczek
2006-05-01 12:18 ` Lars Magne Ingebrigtsen
2006-05-01 13:32 ` Juliusz Chroboczek
2006-05-01 15:00 ` Lars Magne Ingebrigtsen
2006-05-02 18:09 ` Display of GPG results (was: slow PGP in No Gnus v0.4) Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lktppwc6.fsf_-_@lapin-bleu.net \
--to=max@lapin-bleu.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).