[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v |
Date: |
Thu, 09 Oct 2008 19:30:48 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/10/09 19:30:48
Index: tool-bar.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/tool-bar.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- tool-bar.el 2 Sep 2008 05:36:12 -0000 1.18
+++ tool-bar.el 9 Oct 2008 19:30:47 -0000 1.19
@@ -52,12 +52,13 @@
:global t
:group 'mouse
:group 'frames
- (and (display-images-p)
- (modify-all-frames-parameters (list (cons 'tool-bar-lines
- (if tool-bar-mode 1 0))))
- (if (and tool-bar-mode
- (display-graphic-p))
- (tool-bar-setup))))
+ (if tool-bar-mode
+ (progn
+ (dolist (frame (frame-list))
+ (if (display-graphic-p frame)
+ (set-frame-parameter frame 'tool-bar-lines 1)))
+ (tool-bar-setup))
+ (modify-all-frames-parameters (list (cons 'tool-bar-lines 0)))))
;;;###autoload
;; Used in the Show/Hide menu, to have the toggle reflect the current frame.
@@ -257,10 +258,16 @@
;;; Set up some global items. Additions/deletions up for grabs.
(defvar tool-bar-setup nil
- "Set to t if the tool-bar has been set up by `tool-bar-setup'.")
+ "Non-nil if the tool-bar has been set up by `tool-bar-setup'.")
(defun tool-bar-setup (&optional frame)
- (unless tool-bar-setup
+ (unless (or tool-bar-setup
+ (null tool-bar-mode)
+ ;; No-op if the initial frame is on a tty, deferring
+ ;; action until called from x-create-frame-with-faces.
+ ;; Tool-bar icons can depend on X settings, which are
+ ;; initially unavailable in this case.
+ (not (display-graphic-p frame)))
(with-selected-frame (or frame (selected-frame))
;; People say it's bad to have EXIT on the tool bar, since users
;; might inadvertently click that button.
- [Emacs-diffs] Changes to emacs/lisp/tool-bar.el,v,
Chong Yidong <=