From: yamaoka Date: Fri, 29 Sep 2000 13:08:46 +0000 (+0000) Subject: (wl-e21-setup-toolbar): Make the background color of XPM icons transparent. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3a3c62ab01c6f33d0e7ac2f17b92a9663d7f12e6;p=elisp%2Fwanderlust.git (wl-e21-setup-toolbar): Make the background color of XPM icons transparent. ;; I could not find how to invalidate the default bindings in toolbar. ;; `(t . undefined)' does not work for it. :-< --- diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 3569dbf..79a0b96 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -153,22 +153,21 @@ (defun wl-e21-setup-toolbar (bar) (let ((load-path (cons wl-icon-dir load-path)) + (props '(:type xpm :ascent center + :color-symbols (("backgroundToolBarColor" . "None")) + :file)) (success t) icon up down disabled name success) (while bar (setq icon (aref (pop bar) 0)) (unless (boundp icon) (setq name (symbol-name icon) - up (find-image `((:type xpm :file ,(concat name "-up.xpm") - :ascent center)))) + up (find-image `((,@props ,(concat name "-up.xpm"))))) (if up (progn - (setq down (find-image - `((:type xpm :file ,(concat name "-down.xpm") - :ascent center))) - disabled (find-image - `((:type xpm :file ,(concat name "-disabled.xpm") - :ascent center)))) + (setq down (find-image `((,@props ,(concat name "-down.xpm")))) + disabled (find-image `((,@props + ,(concat name "-disabled.xpm"))))) (set icon (vector down up disabled disabled))) (setq bar nil success nil)))) @@ -185,11 +184,11 @@ config) (while (setq config (pop configs)) (set (make-local-variable (car config)) (cdr config)))) - (let ((n (1- (length defs))) + (let ((n (length defs)) def) (while (>= n 0) - (setq def (nth n defs) - n (1- n)) + (setq n (1- n) + def (nth n defs)) (define-key keymap (vector 'tool-bar (aref def 1)) (list 'menu-item (aref def 3) (aref def 1) :enable (aref def 2)