]> git.eshelyaron.com Git - emacs.git/commitdiff
(tool-bar-mode): Make it a no-op if images
authorEli Zaretskii <eliz@gnu.org>
Thu, 30 Aug 2001 06:52:19 +0000 (06:52 +0000)
committerEli Zaretskii <eliz@gnu.org>
Thu, 30 Aug 2001 06:52:19 +0000 (06:52 +0000)
aren't supported.  This avoids the annoying grey strip drawn by
the Windows version instead of the missing tool bar.

lisp/ChangeLog
lisp/toolbar/tool-bar.el

index 1cc2c1c91e6921cf813b663575907c6f2203139f..b61de5305104e27bb626343c46e1bae75ccc76f0 100644 (file)
@@ -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
index d3cd8749a2f62e61bce297c7db4d4bf3b819642f..c4e548ef7e774539ea616128cc065c4e6c25d780 100644 (file)
@@ -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.