* Local tool-bar (for one frame), [toggle-frame-toolbar]
@ 2005-07-16 12:53 David Reitter
2005-07-17 0:59 ` Richard M. Stallman
0 siblings, 1 reply; 2+ messages in thread
From: David Reitter @ 2005-07-16 12:53 UTC (permalink / raw)
Would people be interested in a change that introduces a function
`tool-bar-toggle' (in toolbar.el), allowing to switch a tool-bar on
and off in a single frame?
As shown below, it's not a minor mode (opposed to what Drew Adams
suggested here: http://lists.gnu.org/archive/html/emacs-devel/
2004-10/msg00248.html )
Also, I have implemented a little change that binds this to the tool-
bar window button which exists on Mac OS X. The button click is bound
to an event defined in keyboard.c (right now only in OS X), which
gets mapped to [toggle-frame-toolbar] (in macterm.c). Then you do a
simple
(global-set-key [toggle-frame-toolbar] 'tool-bar-toggle)
;; local toolbars
(defun tool-bar-enabled-p (&optional frame)
"Evaluates to non-nil if the tool-bar is present
in frame FRAME. If FRAME is nil, the function applies
to the selected frame."
(> (or (frame-parameter frame 'tool-bar-lines) 0) 0))
(defun tool-bar-toggle (&optional frame)
"Switches the tool bar on and off in frame FRAME.
If FRAME is nil, the change applies to the selected frame."
(interactive)
(modify-frame-parameters frame
(list (cons 'tool-bar-lines
(if (tool-bar-enabled-p)
0
1
)))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Local tool-bar (for one frame), [toggle-frame-toolbar]
2005-07-16 12:53 Local tool-bar (for one frame), [toggle-frame-toolbar] David Reitter
@ 2005-07-17 0:59 ` Richard M. Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard M. Stallman @ 2005-07-17 0:59 UTC (permalink / raw)
Cc: emacs-devel
Would people be interested in a change that introduces a function
`tool-bar-toggle' (in toolbar.el), allowing to switch a tool-bar on
and off in a single frame?
I would not mind, but please put `toggle' at the start of the name,
for consistency with other such names,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-17 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-16 12:53 Local tool-bar (for one frame), [toggle-frame-toolbar] David Reitter
2005-07-17 0:59 ` Richard M. Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.