bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off


From: martin rudalics
Subject: bug#1754: 23.0.60; tool-bar is shown with tool-bar-mode off
Date: Fri, 09 Jan 2009 20:37:01 +0100
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

Chong, your

2008-10-09  Chong Yidong  <address@hidden>

        * tool-bar.el (tool-bar-mode): Only change tool-bar-lines on
        graphical terminals.

change is inherently asymmetric with respect to future frames: Turning
`tool-bar-mode' off now adds an entry to `default-frame-alist' as before.
Turning it on now no more adds an entry.  IMHO, we should either not
call `modify-all-frames-parameters' in either case or call them in both
cases as in the (attached) tool-bar.el patch I proposed earlier.

martin
*** tool-bar.el.~1.23.~ 2009-01-05 10:00:20.515625000 +0100
--- tool-bar.el 2009-01-09 20:09:59.421875000 +0100
***************
*** 54,62 ****
    :group 'frames
    (if tool-bar-mode
        (progn
!       (dolist (frame (frame-list))
!         (if (display-graphic-p frame)
!             (set-frame-parameter frame 'tool-bar-lines 1)))
        (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
            (tool-bar-setup)))
      (modify-all-frames-parameters (list (cons 'tool-bar-lines 0)))))
--- 54,60 ----
    :group 'frames
    (if tool-bar-mode
        (progn
!       (modify-all-frames-parameters (list (cons 'tool-bar-lines 1)))
        (if (= 1 (length (default-value 'tool-bar-map))) ; not yet setup
            (tool-bar-setup)))
      (modify-all-frames-parameters (list (cons 'tool-bar-lines 0)))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]