1 ;;; gnus-picon.el --- displaying pretty icons in Gnus
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 ;; Free Software Foundation, Inc.
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7 ;; Keywords: news xpm annotation glyph faces
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
28 ;; There are three picon types relevant to Gnus:
30 ;; Persons: person@subdomain.dom
31 ;; users/dom/subdomain/person/face.gif
32 ;; usenix/dom/subdomain/person/face.gif
33 ;; misc/MISC/person/face.gif
34 ;; Domains: subdomain.dom
35 ;; domain/dom/subdomain/unknown/face.gif
36 ;; Groups: comp.lang.lisp
37 ;; news/comp/lang/lisp/unknown/face.gif
39 ;; Original implementation by Wes Hardaker <hardaker@ece.ucdavis.edu>.
43 (eval-when-compile (require 'cl))
50 (defcustom gnus-picon-news-directories '("news")
51 "*List of directories to search for newsgroups faces."
52 :type '(repeat string)
55 (defcustom gnus-picon-user-directories '("users" "usenix" "local" "misc")
56 "*List of directories to search for user faces."
57 :type '(repeat string)
60 (defcustom gnus-picon-domain-directories '("domains")
61 "*List of directories to search for domain faces.
62 Some people may want to add \"unknown\" to this list."
63 :type '(repeat string)
66 (defcustom gnus-picon-file-types
67 (let ((types (list "xbm")))
68 (when (gnus-image-type-available-p 'gif)
70 (when (gnus-image-type-available-p 'xpm)
73 "*List of suffixes on picon file names to try."
74 :type '(repeat string)
77 (defface gnus-picon-xbm-face '((t (:foreground "black" :background "white")))
78 "Face to show xbm picon in."
81 (defface gnus-picon-face '((t (:foreground "black" :background "white")))
82 "Face to show picon in."
85 ;;; Internal variables:
87 (defvar gnus-picon-setup-p nil)
88 (defvar gnus-picon-glyph-alist nil
90 List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.")
91 (defvar gnus-picon-cache nil)