unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7049: 24.0.50; Feature request: tool-bar-position defcustom
@ 2010-09-16 20:06 Stephen Berman
  2010-09-17 13:36 ` Jan Djärv
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2010-09-16 20:06 UTC (permalink / raw)
  To: 7049

It would be convenient to have the Gtk+ tool bar placement (top, bottom,
left, right) be managed by Custom.  Currently, changing the default
permanently in user-init-file requires modifying the frame parameters.

In GNU Emacs 24.0.50.7 (i686-pc-linux-gnu, GTK+ Version 2.18.6)
 of 2010-09-16 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10605000
configured using `configure  '--with-imagemagick' '--without-toolkit-scroll-bars''





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7049: 24.0.50; Feature request: tool-bar-position defcustom
  2010-09-16 20:06 bug#7049: 24.0.50; Feature request: tool-bar-position defcustom Stephen Berman
@ 2010-09-17 13:36 ` Jan Djärv
  2010-09-17 15:03   ` Stephen Berman
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Djärv @ 2010-09-17 13:36 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 7049



Stephen Berman skrev 2010-09-16 22.06:
> It would be convenient to have the Gtk+ tool bar placement (top, bottom,
> left, right) be managed by Custom.  Currently, changing the default
> permanently in user-init-file requires modifying the frame parameters.
>

default-frame-alist is in custom, and you can select where to show tool bar in 
the menu and then save options.  Isn't that enough?

	Jan D.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7049: 24.0.50; Feature request: tool-bar-position defcustom
  2010-09-17 13:36 ` Jan Djärv
@ 2010-09-17 15:03   ` Stephen Berman
  2010-09-21  7:34     ` Jan Djärv
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Berman @ 2010-09-17 15:03 UTC (permalink / raw)
  To: Jan Djärv; +Cc: 7049

On Fri, 17 Sep 2010 15:36:28 +0200 Jan Djärv <jan.h.d@swipnet.se> wrote:

> Stephen Berman skrev 2010-09-16 22.06:
>> It would be convenient to have the Gtk+ tool bar placement (top, bottom,
>> left, right) be managed by Custom.  Currently, changing the default
>> permanently in user-init-file requires modifying the frame parameters.
>>
>
> default-frame-alist is in custom, and you can select where to show tool bar in
> the menu and then save options.  Isn't that enough?
>
> 	Jan D.

Well, it's not quite as comfortable for newbies, I think.  I was
thinking along the lines of scroll-bar-mode; in fact, how about this:

(defcustom tool-bar-position 'top
  "Specify whether to have a tool bar, and on which side.
Possible values are nil (no tool bar), `top' (tool bar on top),
`bottom' (tool bar at bottom), `left' (tool bar on left) and
`right' (tool bar on right)."
  :type '(choice (const :tag "none (nil)" nil)
		 (const top)
		 (const bottom)
		 (const left)
		 (const right))
  :group 'frames
  :initialize 'custom-initialize-default
  :set (lambda (sym val)
	 (if val
	     (modify-all-frames-parameters
	      (list (cons 'tool-bar-position val) (cons 'tool-bar-lines 1)))
	   (modify-all-frames-parameters (list (cons 'tool-bar-lines nil))))))

Steve Berman





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#7049: 24.0.50; Feature request: tool-bar-position defcustom
  2010-09-17 15:03   ` Stephen Berman
@ 2010-09-21  7:34     ` Jan Djärv
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Djärv @ 2010-09-21  7:34 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 7049-done

2010-09-17 17:03, Stephen Berman skrev:
> On Fri, 17 Sep 2010 15:36:28 +0200 Jan Djärv<jan.h.d@swipnet.se>  wrote:
>
>> Stephen Berman skrev 2010-09-16 22.06:
>>> It would be convenient to have the Gtk+ tool bar placement (top, bottom,
>>> left, right) be managed by Custom.  Currently, changing the default
>>> permanently in user-init-file requires modifying the frame parameters.
>>>
>>
>> default-frame-alist is in custom, and you can select where to show tool bar in
>> the menu and then save options.  Isn't that enough?
>>
>> 	Jan D.
>
> Well, it's not quite as comfortable for newbies, I think.

I'd imagine two menu choices to be simpler than customizing a variable.

> I was
> thinking along the lines of scroll-bar-mode; in fact, how about this:
>
> (defcustom tool-bar-position 'top
>    "Specify whether to have a tool bar, and on which side.
> Possible values are nil (no tool bar), `top' (tool bar on top),
> `bottom' (tool bar at bottom), `left' (tool bar on left) and
> `right' (tool bar on right)."
>    :type '(choice (const :tag "none (nil)" nil)
> 		 (const top)
> 		 (const bottom)
> 		 (const left)
> 		 (const right))
>    :group 'frames
>    :initialize 'custom-initialize-default
>    :set (lambda (sym val)
> 	 (if val
> 	     (modify-all-frames-parameters
> 	      (list (cons 'tool-bar-position val) (cons 'tool-bar-lines 1)))
> 	   (modify-all-frames-parameters (list (cons 'tool-bar-lines nil))))))
>

I've checked in a modified version of this:

1) You must set tool-bar-position in :set also, otherwise customize will 
complain and say it is set outside customize.
2) We don't want to disable the tool bar here. If so it contradicts the value 
for tool-bar-mode, which would be confusing.

	Jan D.







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-09-21  7:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-16 20:06 bug#7049: 24.0.50; Feature request: tool-bar-position defcustom Stephen Berman
2010-09-17 13:36 ` Jan Djärv
2010-09-17 15:03   ` Stephen Berman
2010-09-21  7:34     ` Jan Djärv

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).