- (let ((logo (and gnus-xmas-glyph-directory
- (concat
- (file-name-as-directory gnus-xmas-glyph-directory)
- "gnus."
- (if (featurep 'xpm) "xpm" "xbm"))))
- (xpm-color-symbols
- (and (featurep 'xpm)
- (append `(("thing" ,(car gnus-xmas-logo-colors))
- ("shadow" ,(cadr gnus-xmas-logo-colors)))
- xpm-color-symbols))))
- (if (and (featurep 'xpm)
- (not (equal (device-type) 'tty))
- logo
- (file-exists-p logo))
- (progn
- (setq logo (make-glyph logo))
- (insert " ")
- (set-extent-begin-glyph (make-extent (point) (point)) logo)
- (goto-char (point-min))
- (while (not (eobp))
- (insert (make-string (/ (max (- (window-width) (or x 35)) 0) 2)
- ? ))
- (forward-line 1))
- (goto-char (point-min))
- (let* ((pheight (+ 20 (count-lines (point-min) (point-max))))
- (wheight (window-height))
- (rest (- wheight pheight)))
- (insert (make-string (max 0 (* 2 (/ rest 3))) ?\n))))
-
- (insert
- (format " %s
- _ ___ _ _
- _ ___ __ ___ __ _ ___
- __ _ ___ __ ___
- _ ___ _
- _ _ __ _
- ___ __ _
- __ _
- _ _ _
- _ _ _
- _ _ _
- __ ___
- _ _ _ _
- _ _
- _ _
- _ _
- _
- __
-
-"
- ""))
- ;; And then hack it.
- (gnus-indent-rigidly (point-min) (point-max)
- (/ (max (- (window-width) (or x 46)) 0) 2))
+ (cond
+ ((and (console-on-window-system-p)
+ (or (featurep 'xpm)
+ (featurep 'xbm)))
+ (let* ((logo-xpm (expand-file-name "gnus.xpm" gnus-xmas-glyph-directory))
+ (logo-xbm (expand-file-name "gnus.xbm" gnus-xmas-glyph-directory))
+ (glyph (make-glyph
+ (cond ((featurep 'xpm)
+ `[xpm
+ :file ,logo-xpm
+ :color-symbols
+ (("thing" . ,(car gnus-xmas-logo-colors))
+ ("shadow" . ,(cadr gnus-xmas-logo-colors))
+ ("background" . ,(face-background 'default)))])
+ ((featurep 'xbm)
+ `[xbm :file ,logo-xbm])
+ (t [nothing])))))
+ (insert " ")
+ (set-extent-begin-glyph (make-extent (point) (point)) glyph)