From f7440ec7b621d0b537df60f88d0e0a24be8240a4 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 26 Sep 2000 02:13:44 +0000 Subject: [PATCH] (after-make-frame-functions): Add `wl-e21-force-switch-toolbar'. (wl-e21-force-switch-toolbar): New function force to switch the toolbar appearance automatically. NOTE: This change should be fixed in the future. --- wl/ChangeLog | 6 +++++- wl/wl-e21.el | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 0b881d2..8e3ca41 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,7 +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.el (after-make-frame-functions): Add + `wl-e21-force-switch-toolbar'. + (wl-e21-force-switch-toolbar): New function force to switch the + toolbar appearance automatically. + (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. diff --git a/wl/wl-e21.el b/wl/wl-e21.el index cefd192..4ed5451 100644 --- a/wl/wl-e21.el +++ b/wl/wl-e21.el @@ -197,10 +197,14 @@ (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) - ))) + (modify-frame-parameters frame (list (cons 'tool-bar-lines new)))))) (add-hook 'post-command-hook 'wl-e21-switch-toolbar) +(defun wl-e21-force-switch-toolbar (frame) + (let ((lines (frame-parameter frame 'tool-bar-lines))) + (unless (and lines (> lines 0)) + (modify-frame-parameters frame (list (cons 'tool-bar-lines + wl-e21-tool-bar-lines)))))) +(add-hook 'after-make-frame-functions 'wl-e21-force-switch-toolbar) (defun wl-e21-make-toolbar-buttons (keymap defs) (let ((configs wl-e21-toolbar-configurations) -- 1.7.10.4