From 86498528e553bb2ca1b3c2ca0d7788ecc15e8d7c Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 26 Sep 2000 01:37:13 +0000 Subject: [PATCH] (wl-e21-tool-bar-lines): New buffer local variable. (wl-e21-switch-toolbar): New function to switch the toolbar appearance automatically. (post-command-hook): Add `wl-e21-switch-toolbar'. NOTE: This change should be fixed in the future. --- wl/ChangeLog | 8 ++++++++ wl/wl-e21.el | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/wl/ChangeLog b/wl/ChangeLog index 6cce28ba..0b881d2 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2000-09-26 Katsumi Yamaoka + + NOTE: This change should be fixed in the future. + * wl-e21.el (post-command-hook): Add `wl-e21-switch-toolbar'. + (wl-e21-switch-toolbar): New function to switch the toolbar + appearance automatically. + (wl-e21-tool-bar-lines): New buffer local variable. + 2000-09-25 Yuuichi Teranishi * wl-util.el (wl-biff-check-folders-running): New variable. diff --git a/wl/wl-e21.el b/wl/wl-e21.el index 59af044..cefd192 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -189,12 +189,26 @@ (tool-bar-button-margin . 0) (tool-bar-button-relief . 2))) +;; FIXME! It's only a quick hack. +(defvar wl-e21-tool-bar-lines nil) +(defun wl-e21-switch-toolbar () + (let* ((frame (selected-frame)) + (old (frame-parameter frame 'tool-bar-lines)) + (new (or wl-e21-tool-bar-lines + (cdr (assq 'tool-bar-lines default-frame-alist))))) + (unless (eq (and old t) (and new t)) + (modify-frame-parameters frame (list (cons 'tool-bar-lines new))) + ;;(redraw-frame frame) + ))) +(add-hook 'post-command-hook 'wl-e21-switch-toolbar) + (defun wl-e21-make-toolbar-buttons (keymap defs) (let ((configs wl-e21-toolbar-configurations) config) (while (setq config (pop configs)) (set (make-local-variable (car config)) (cdr config)))) (modify-frame-parameters (selected-frame) '((tool-bar-lines . 1))) + (set (make-local-variable 'wl-e21-tool-bar-lines) 1) (let ((n (1- (length defs))) def) (while (>= n 0) -- 1.7.10.4