Set the background colour of the XPMs explicitly.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 13:43:17 +0000 (15:43 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 26 Sep 2010 13:43:17 +0000 (15:43 +0200)
This makes more sense than trying to set the background colour.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-picon.el

index 63490a0..06fbd41 100644 (file)
@@ -1,5 +1,11 @@
 2010-09-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-art.el (gnus-treatment-function-alist): Do picons before
+       highlight again, so that the highlight is correct.
+
+       * gnus-picon.el (gnus-picon): Remove again.
+       (gnus-picon-create-glyph): Set the background XPM colour explicitly.
+
        * gnus-art.el (gnus-treatment-function-alist): Insert picons after
        doing the header highlightling, so that the background colour of the
        picon is correct.
index b0cfb5b..ad6ccb2 100644 (file)
@@ -1691,14 +1691,14 @@ This requires GNU Libidn, and by default only enabled if it is found."
     (gnus-treat-hide-signature gnus-article-hide-signature)
     (gnus-treat-strip-list-identifiers gnus-article-hide-list-identifiers)
     (gnus-treat-leading-whitespace gnus-article-remove-leading-whitespace)
+    (gnus-treat-from-picon gnus-treat-from-picon)
+    (gnus-treat-mail-picon gnus-treat-mail-picon)
+    (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon)
     (gnus-treat-strip-pem gnus-article-hide-pem)
     (gnus-treat-from-gravatar gnus-treat-from-gravatar)
     (gnus-treat-mail-gravatar gnus-treat-mail-gravatar)
     (gnus-treat-highlight-headers gnus-article-highlight-headers)
     (gnus-treat-highlight-signature gnus-article-highlight-signature)
-    (gnus-treat-from-picon gnus-treat-from-picon)
-    (gnus-treat-mail-picon gnus-treat-mail-picon)
-    (gnus-treat-newsgroups-picon gnus-treat-newsgroups-picon)
     (gnus-treat-strip-trailing-blank-lines
      gnus-article-remove-trailing-blank-lines)
     (gnus-treat-strip-leading-blank-lines
index 2f70eae..97cd820 100644 (file)
@@ -85,10 +85,6 @@ added right to the textual representation."
                 (const right))
   :group 'gnus-picon)
 
-(defface gnus-picon '((t (:foreground "black" :background "white")))
-  "Face to show picon in."
-  :group 'gnus-picon)
-
 ;;; Internal variables:
 
 (defvar gnus-picon-glyph-alist nil
@@ -151,13 +147,13 @@ replacement is added."
       (insert glyph)
     (gnus-add-wash-type category)
     (gnus-add-image category (car glyph))
-    (let ((start (point)))
-      (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category)
-      (put-text-property start (point) 'face 'gnus-picon))))
+    (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category)))
 
 (defun gnus-picon-create-glyph (file)
   (or (cdr (assoc file gnus-picon-glyph-alist))
-      (cdar (push (cons file (gnus-create-image file))
+      (cdar (push (cons file (gnus-create-image
+                             file nil nil
+                             :color-symbols '(("None" . "white"))))
                  gnus-picon-glyph-alist))))
 
 ;;; Functions that does picon transformations: