diff options
author | Eli Zaretskii <eliz@gnu.org> | 2001-08-30 06:52:19 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2001-08-30 06:52:19 +0000 |
commit | ef32aa028399ea9764d32acd2db384d47c1f6698 (patch) | |
tree | 985396e1e308eac9a0e8f5a15dfd6fe321115184 | |
parent | 53ca4610ef82c31ef249eb0cc000e79b21bf242d (diff) | |
download | emacs-ef32aa028399ea9764d32acd2db384d47c1f6698.tar.gz emacs-ef32aa028399ea9764d32acd2db384d47c1f6698.tar.bz2 emacs-ef32aa028399ea9764d32acd2db384d47c1f6698.zip |
(tool-bar-mode): Make it a no-op if images
aren't supported. This avoids the annoying grey strip drawn by
the Windows version instead of the missing tool bar.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/toolbar/tool-bar.el | 31 |
2 files changed, 22 insertions, 15 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1cc2c1c91e6..b61de530510 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2001-08-30 Eli Zaretskii <eliz@is.elta.co.il> + + * toolbar/tool-bar.el (tool-bar-mode): Make it a no-op if images + aren't supported. This avoids the annoying gray strip drawn by + the Windows version instead of the missing tool bar. + 2001-08-29 Gerd Moellmann <gerd@gnu.org> * menu-bar.el (menu-bar-options-menu): Make option text, messages diff --git a/lisp/toolbar/tool-bar.el b/lisp/toolbar/tool-bar.el index d3cd8749a2f..c4e548ef7e7 100644 --- a/lisp/toolbar/tool-bar.el +++ b/lisp/toolbar/tool-bar.el @@ -50,21 +50,22 @@ conveniently adding tool bar items." :global t :group 'mouse :group 'frames - (let ((lines (if tool-bar-mode 1 0))) - ;; Alter existing frames... - (mapc (lambda (frame) - (modify-frame-parameters frame - (list (cons 'tool-bar-lines lines)))) - (frame-list)) - ;; ...and future ones. - (let ((elt (assq 'tool-bar-lines default-frame-alist))) - (if elt - (setcdr elt lines) - (add-to-list 'default-frame-alist (cons 'tool-bar-lines lines))))) - (if (and tool-bar-mode - (display-graphic-p) - (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup - (tool-bar-setup))) + (and (display-images-p) + (let ((lines (if tool-bar-mode 1 0))) + ;; Alter existing frames... + (mapc (lambda (frame) + (modify-frame-parameters frame + (list (cons 'tool-bar-lines lines)))) + (frame-list)) + ;; ...and future ones. + (let ((elt (assq 'tool-bar-lines default-frame-alist))) + (if elt + (setcdr elt lines) + (add-to-list 'default-frame-alist (cons 'tool-bar-lines lines))))) + (if (and tool-bar-mode + (display-graphic-p) + (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup + (tool-bar-setup)))) (defvar tool-bar-map (make-sparse-keymap) "Keymap for the tool bar. |