From: yamaoka Date: Fri, 29 Sep 2000 13:09:03 +0000 (+0000) Subject: (wl-demo): Hide toolbar while showing a logo under Emacs 21. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0980244ad39cbde9fcc71e00270a30a96ac862d;p=elisp%2Fwanderlust.git (wl-demo): Hide toolbar while showing a logo under Emacs 21. --- diff --git a/wl/wl-demo.el b/wl/wl-demo.el index 8de6332..adea053 100644 --- a/wl/wl-demo.el +++ b/wl/wl-demo.el @@ -43,10 +43,10 @@ '(bitmap-compose bitmap-decode-xbm bitmap-read-xbm-buffer bitmap-read-xbm-file create-image device-on-window-system-p display-graphic-p - frame-char-height frame-char-width image-type-available-p - insert-image make-extent make-glyph set-extent-end-glyph - set-glyph-face set-specifier window-pixel-height - window-pixel-width))) + frame-char-height frame-char-width frame-parameter + image-type-available-p insert-image make-extent make-glyph + set-extent-end-glyph set-glyph-face set-specifier tool-bar-mode + window-pixel-height window-pixel-width))) ;; ;; demo ;-) @@ -194,17 +194,22 @@ Optional IMAGE-TYPE overrides the variable `wl-demo-display-logo'." nil demo-buf)) (set-specifier (symbol-value 'scrollbar-height) 0 demo-buf) (set-specifier (symbol-value 'scrollbar-width) 0 demo-buf)) - ((and (> emacs-major-version 20) window-system) + ((and (> emacs-major-version 20) (display-graphic-p)) (make-local-hook 'kill-buffer-hook) - (let ((frame (selected-frame))) - (add-hook 'kill-buffer-hook - (` (lambda () - (if (frame-live-p (, frame)) - (set-face-background - 'fringe - (, (face-background 'fringe frame)) - (, frame))))) - nil t) + (let* ((frame (selected-frame)) + (toolbar (frame-parameter frame 'tool-bar-lines))) + (modify-frame-parameters frame '((tool-bar-lines))) + (add-hook + 'kill-buffer-hook + (` (lambda () + (let ((frame (, frame))) + (when (frame-live-p frame) + (, (if (and toolbar (> toolbar 0)) + (` (modify-frame-parameters + frame '((tool-bar-lines . (, toolbar))))))) + (set-face-background + 'fringe (, (face-background 'fringe frame)) frame))))) + nil t) (set-face-background 'fringe (face-background 'default frame) frame)))) (erase-buffer)