aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2001-08-30 06:52:19 +0000
committerEli Zaretskii2001-08-30 06:52:19 +0000
commitef32aa028399ea9764d32acd2db384d47c1f6698 (patch)
tree985396e1e308eac9a0e8f5a15dfd6fe321115184
parent53ca4610ef82c31ef249eb0cc000e79b21bf242d (diff)
downloademacs-ef32aa028399ea9764d32acd2db384d47c1f6698.tar.gz
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/ChangeLog6
-rw-r--r--lisp/toolbar/tool-bar.el31
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 @@
12001-08-30 Eli Zaretskii <eliz@is.elta.co.il>
2
3 * toolbar/tool-bar.el (tool-bar-mode): Make it a no-op if images
4 aren't supported. This avoids the annoying gray strip drawn by
5 the Windows version instead of the missing tool bar.
6
12001-08-29 Gerd Moellmann <gerd@gnu.org> 72001-08-29 Gerd Moellmann <gerd@gnu.org>
2 8
3 * menu-bar.el (menu-bar-options-menu): Make option text, messages 9 * 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."
50 :global t 50 :global t
51 :group 'mouse 51 :group 'mouse
52 :group 'frames 52 :group 'frames
53 (let ((lines (if tool-bar-mode 1 0))) 53 (and (display-images-p)
54 ;; Alter existing frames... 54 (let ((lines (if tool-bar-mode 1 0)))
55 (mapc (lambda (frame) 55 ;; Alter existing frames...
56 (modify-frame-parameters frame 56 (mapc (lambda (frame)
57 (list (cons 'tool-bar-lines lines)))) 57 (modify-frame-parameters frame
58 (frame-list)) 58 (list (cons 'tool-bar-lines lines))))
59 ;; ...and future ones. 59 (frame-list))
60 (let ((elt (assq 'tool-bar-lines default-frame-alist))) 60 ;; ...and future ones.
61 (if elt 61 (let ((elt (assq 'tool-bar-lines default-frame-alist)))
62 (setcdr elt lines) 62 (if elt
63 (add-to-list 'default-frame-alist (cons 'tool-bar-lines lines))))) 63 (setcdr elt lines)
64 (if (and tool-bar-mode 64 (add-to-list 'default-frame-alist (cons 'tool-bar-lines lines)))))
65 (display-graphic-p) 65 (if (and tool-bar-mode
66 (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup 66 (display-graphic-p)
67 (tool-bar-setup))) 67 (= 1 (length (default-value 'tool-bar-map)))) ; not yet setup
68 (tool-bar-setup))))
68 69
69(defvar tool-bar-map (make-sparse-keymap) 70(defvar tool-bar-map (make-sparse-keymap)
70 "Keymap for the tool bar. 71 "Keymap for the tool bar.