[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100292: Fix bug #1077 with poppin
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100292: Fix bug #1077 with popping new frames from a minibuffer-only frame. |
Date: |
Thu, 09 Dec 2010 20:53:17 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100292
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-23
timestamp: Thu 2010-12-09 20:53:17 +0200
message:
Fix bug #1077 with popping new frames from a minibuffer-only frame.
Do NOT merge with trunk!
menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): New functions.
(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
them instead of `nil' and `>', respectively.
modified:
lisp/ChangeLog
lisp/menu-bar.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-12-09 01:50:08 +0000
+++ b/lisp/ChangeLog 2010-12-09 18:53:17 +0000
@@ -1,3 +1,10 @@
+2010-12-09 Eli Zaretskii <address@hidden>
+
+ * menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
+ New functions.
+ (menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
+ them instead of `nil' and `>', respectively. (Bug#1077)
+
2010-12-09 Stephen Berman <address@hidden>
* calendar/diary-lib.el (diary-list-sexp-entries):
=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el 2010-10-27 04:06:52 +0000
+++ b/lisp/menu-bar.el 2010-12-09 18:53:17 +0000
@@ -980,16 +980,33 @@
:visible (and (display-graphic-p) (fboundp 'x-show-tip))
:button (:toggle . tooltip-mode)))
+(defun menu-bar-frame-for-menubar ()
+ "Return the frame suitable for updating the menu bar."
+ (or (and (framep menu-updating-frame)
+ menu-updating-frame)
+ (selected-frame)))
+
+(defun menu-bar-positive-p (val)
+ "Return non-nil iff VAL is a positive number."
+ (and (numberp val)
+ (> val 0)))
+
(define-key menu-bar-showhide-menu [menu-bar-mode]
`(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame
:help ,(purecopy "Turn menu-bar on/off")
- :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0))))
+ :button
+ (:toggle . (menu-bar-positive-p
+ (frame-parameter (menu-bar-frame-for-menubar)
+ 'menu-bar-lines)))))
(define-key menu-bar-showhide-menu [showhide-tool-bar]
`(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame
:help ,(purecopy "Turn tool-bar on/off")
:visible (display-graphic-p)
- :button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0))))
+ :button
+ (:toggle . (menu-bar-positive-p
+ (frame-parameter (menu-bar-frame-for-menubar)
+ 'tool-bar-lines)))))
(define-key menu-bar-options-menu [showhide]
`(menu-item ,(purecopy "Show/Hide") ,menu-bar-showhide-menu))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100292: Fix bug #1077 with popping new frames from a minibuffer-only frame.,
Eli Zaretskii <=