{The jstools Global Preferences panel
Introduction
The jstools package provides a Global Preferences panel, shared by several applications, which lets you specify preferences that are shared among the jstools applications.  This panel is available from within the supported jstools applications, and also via the standalone jprefs application, which is just a wrapper around it.

(Most jstools applications also provide application­specific preferences which can be set from within the application with an application­specific preferences panel.)

The Global Preferences panel is implemented by the jprefpanel.tcl library; if you're a Tk programmer, you can use it in your own applications.

This document describes the Global Preferences panel provided by version 4.1/4.4 of the jstools libraries.
Usage
NOTE:  Some of these preferences do not take effect until the next time an application is run.  (Also, which preferences take effect immediately and which are only effective the next time an application is run may vary from application to application.)
Choosing preference categories
At the top of the Global Preferences panel is a pop-up option button that lets you select among several categories of preferences.  When you choose a particular category, the contents of the panel change to let you see and adjust the preferences in that category.  For instance, to see or adjust the preferences relating to printing, you would choose `Printing' on the option button at the top of the panel, and then the several printing preferences would be displayed in the centre of the panel.
General preferences
Language
The entry field labelled `Language:' is for a two­letter ISO language code, such as en for English or fr for French, or for such a code followed by some number of additional specifiers, such as en.us for US English, or fr.be for Belgian French, or en.us.boston for Bostonian English.  If possible, jstools applications will display buttons, menus, prompts, etc., in the selected language.
Auto­position dialogue boxes
If `Auto­position dialogue boxes' is selected, then applications that use the jstools libraries will attempt to centre dialogue boxes (like the Global Preferences panel itself) on the screen.  Otherwise they will let your window manager position them (and your window manager may ask you to choose a position for them).
Confirm actions
If `Confirm actions' is selected, applications will ask for confirmation before certain actions, such as quitting or overwriting an existing file.  This is the default, but you will no doubt quickly become annoyed with it.  You are welcome to turn it off.
Fast file selector
If `Fast file selector' is selected, the File Selector panel will come up a little faster, but it won't distinguish directories by appending a slash to their names, as it normally does.  (This checkbox is duplicated on the File Selector panel itself.)
Strict Motif emulation
If `Strict Motif emulation' is not selected, user­interface components such as buttons and scrollbars will highlight when the mouse pointer is moved over them to indicate they are active.  If it is selected, they will not change colour.  This preference doesn't take effect until the next time an application is run.
Scrollbar side
If `Scrollbar side' is set to `left', scrollbars will be put to the left of the objects (normally text widgets or listboxes) they control; otherwise they'll be put to the right.  This preference doesn't take effect until the next time a window with a scrollbar is created (i.e., windows that are already on the screen won't have their scrollbars moved).
Visible Bell
If `Visible Bell' is selected, jstools applications will simulate a bell by briefly flashing the relevant window.
Audible Bell
If `Audible Bell' is selected, then jstools applications will ring the display's bell when they need to catch your attention.

It's fine for both `Visible Bell' and `Audible Bell' to be selected.  It's also OK for neither to be selected; you just won't get any notification when an application tries to ring the bell.
Printing
Printer
The `Printer:' field lets you type in the name of your printer.  (It sets the J_PREFS(printer) variable; it's up to the individual application to honour this.)
How to print
The `How to print:' preference lets you select what command to use to print.  If you select `lpr', the Berkeley-style lpr command (also compatible with lprNG) will be used to print; this is likely to work on Linux and BSD variants.  If you select `lp', the AT&T System V-style lp command will be used; this is likely to work on Solaris.  If you select `custom', then you can choose a custom command below to print.  (This lets you do pretty much anything.)  If you select `file', then instead of being sent to the printer, output will be saved in a file you name below.
Custom print command
The `Custom print command:' field is only used if you select `custom' for `How to print:'.  It gives a command which will receive the data to be printed on standard input.  Within the command, you can use `$J_PREFS(printer)' to refer to the user's current printer (as set above).  This command is used for both PostScript and plain-text printing.
Output file
The `Output file:' field is only used if you select `file' for `How to print:'.  It names the file in which the data that otherwise will be printed will be stored.  If a relative pathname is used, the file will be created in the applications current working directory.
Keyboard
Keyboard bindings
The three radio buttons in the `Keyboard' section let you select what kind of keyboard bindings you want.  `Basic bindings' gives you a very basic interface, which supports the arrow keys, the mouse, the Home, End, Next, and Prior (or PageUp and PageDown) keys if your keyboard has them, and not much else.  `Emacs bindings' gives you keyboard bindings modelled after the default keyboard commands of the Emacs editor, including the use of Control-u or Escape+number for repetition.  `vi bindings' gives you keyboard bindings modelled after those of the vi editor (at present these are still rudimentary).  `EDT bindings' gives you bindings modelled after the VMS EDT editor, for which I am very grateful to Achim Bohnet <ach@rosat.mpe-garching.mpg.de>.  (Achim has also done a lot of work on the vi bindings, and the bindings are still very much under development.)
Typing replaces selection
If `Typing replaces selection' is selected, then typing while there's a selection will replace the selection (unless the insert point doesn't touch the selection), and moving the insert point, either by clicking with the mouse or through keyboard commands, will deselect any selected text.  With this option selected, the selection works more the way it does on a Mac or in a Motif application; without it, the selection works more the way it does in xterm(1).  (You may be more comfortable with this turned on if you're used to word processors, copying text is quicker with it off.)
Helper Apps
Web Browser
The Web Browser preference let you specify which application to use to display Web pages.  Currently, it's only used by jdoc.
Man Page Viewer
The Man Page Viewer preference let you specify how to show manual pages.  Currently, it's only used by jdoc.  I strongly recommend using Tom Phelps' TkMan application to view man pages; it's available from ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/tkman.tar.Z, and information about it is available under Tom's Web page at http://http.cs.berkeley.edu/~phelps/.
Screen Fonts
The `Screen Fonts' section lets you specify the screen fonts that will be used to display various types of text.  Unfortunately, there's not a good user interface to this yet; currently, you just have to type the font name in a fashion that Tk understands.  I hope to fix this soon.
PostScript
The `PostScript' section lets you adjust some of the parameters when PostScript is generated from rich text.  It lets you choose PostScript fonts to use and adjust some of the font sizes and line spacing.
Saving Preferences (Or Not)
The Save button saves your global preferences to disk, so they will be used the next time you start a jstools application, and closes the Global Preferences panel.

The Done button closes the Global Preferences panel.  The current settings will be used by the application, but they won't be saved to disk, so any changes you've made (since you last saved your preferences) won't be reflected the next time you use a jstools application.

Global preferences are saved in the file ~/.tk/defaults.tcl, which is just a series of Tcl set commands that set elements in the global array J_PREFS.  Most jstools applications save their application­specific preferences in the same format in the file ~/.tk/application-defaults.tcl, where application is the name of the particular application, but some may save them someplace else and/or in some other format.)
Evolution
Feel free to report bugs (and feature requests) to me, <js@aq.org>, and I will try to deal with them.  Also, feel free to fix bugs or add features on your own and let me know how you did it.
} {{{jdoc:anchor:anchorname {2.0 3.0 10.0 11.0 42.0 43.0 62.0 63.0}} {jdoc:xref:link {3.0 3.19 3.273 3.279 7.51 7.65 9.84 9.105 18.74 18.95 22.37 22.60 28.31 28.38 30.36 30.43 44.108 44.122 44.309 44.323 44.485 44.496 44.608 44.620 49.120 49.124 51.103 51.107 51.206 51.267 51.331 51.367}} {jdoc:xref:manpage {46.451 46.456}} {richtext:font:roman {3.0 3.4 3.11 3.150 3.157 3.223 3.230 3.273 3.279 5.6 5.13 7.51 7.65 9.88 9.95 10.0 11.5 12.0 13.0 14.0 16.0 16.84 16.86 16.102 16.104 16.194 16.199 16.219 16.224 16.248 16.260 16.298 16.305 17.0 18.0 18.78 18.85 19.0 20.0 21.0 22.0 23.0 24.0 24.31 24.34 24.195 24.197 25.0 26.0 27.0 28.0 28.31 28.38 29.0 30.0 30.36 30.43 33.0 35.0 35.78 35.94 36.0 37.0 37.118 37.121 37.152 37.157 37.277 37.279 38.0 39.0 39.206 39.223 40.0 41.0 42.0 44.0 44.204 44.208 44.210 44.213 44.215 44.219 44.225 44.230 44.235 44.241 44.246 44.254 44.440 44.449 44.453 44.459 44.460 44.466 44.554 44.556 44.721 44.752 44.797 44.799 45.0 46.0 46.87 46.94 46.451 46.456 47.0 49.0 49.120 49.124 50.0 51.0 51.103 51.107 51.206 51.267 51.331 51.367 52.0 53.0 54.0 55.0 56.0 57.0 57.102 57.109 59.251 59.258 61.41 61.59 61.91 61.94 61.142 61.149 61.157 61.164 61.253 61.283 61.291 61.302 62.0 63.0 63.55 63.66 64.0}} {richtext:font:italic {24.31 24.34 24.195 24.197 44.460 44.466 46.87 46.94 61.259 61.270 61.291 61.302}} {richtext:font:bold {3.4 3.11 3.150 3.157 3.223 3.230 5.6 5.13 7.51 7.65 9.88 9.95 11.0 11.5 16.298 16.305 18.78 18.85 28.31 28.38 30.36 30.43 44.204 44.208 44.210 44.213 44.215 44.219 44.225 44.230 44.235 44.241 44.246 44.254 44.440 44.449 44.453 44.459 49.120 49.124 51.103 51.107 57.102 57.109 59.251 59.258 61.41 61.59 61.157 61.164 61.253 61.259 61.270 61.283}} {richtext:font:typewriter {3.273 3.279 16.84 16.86 16.102 16.104 16.194 16.199 16.219 16.224 16.248 16.260 35.78 35.94 37.118 37.121 37.152 37.157 37.277 37.279 39.206 39.223 44.554 44.556 44.721 44.752 44.797 44.799 46.451 46.456 51.206 51.267 51.331 51.367 61.91 61.94 61.142 61.149 63.55 63.66}} {richtext:font:heading0 {1.0 2.0}} {richtext:font:heading1 {2.0 3.0 10.0 11.0 62.0 63.0}} {richtext:font:heading2 {12.0 13.0 14.0 15.0 33.0 34.0 42.0 43.0 47.0 48.0 52.0 53.0 54.0 55.0 56.0 57.0}} {richtext:font:heading3 {15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0 30.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0 43.0 44.0 45.0 46.0 48.0 49.0 50.0 51.0}} {jdoc:anchorname:Introduction {2.0 3.0}} {jdoc:link:jslibraries.jdoc {9.84 9.105 18.74 18.95}} {jdoc:link:jprefs.jdoc {3.273 3.279}} {jdoc:anchorname:Usage {10.0 11.0}} {jdoc:anchorname:Evolution {62.0 63.0}} {jdoc:manpage:xterm {46.451 46.456}} {jdoc:link:jstools.jdoc {3.0 3.19 28.31 28.38 30.36 30.43}} {jdoc:link:jprefpanel.tcl.jdoc {7.51 7.65}} {jdoc:link:jstools/bindbasic.jdoc {44.108 44.122}} {jdoc:link:jstools/bindemacs.jdoc {44.309 44.323}} {jdoc:link:jstools/bindvi.jdoc {44.485 44.496}} {jdoc:anchorname:Keyboard_Bindings {42.0 43.0}} {jdoc:link:panels/fileselector.jdoc {22.37 22.60}} {jdoc:link:jstools/bindedt.jdoc {44.608 44.620}} {jdoc:link:jdoc.jdoc {49.120 49.124 51.103 51.107}} {jdoc:link:http://http.cs.berkeley.edu/~phelps/ {51.331 51.367}} {jdoc:link:ftp://ftp.cs.berkeley.edu/ucb/people/phelps/tcltk/tkman.tar.Z.jdoc {51.206 51.267}}} {{convert:place:41.102 57.102} {convert:place:5.13 5.13} {convert:place:33.776 44.797} {convert:place:3.223 3.223} {convert:place:13.248 16.248} {convert:place:21.195 24.195} {convert:place:12.0 15.0} {convert:place:33.464 44.485} {convert:place:45.254 61.149} {convert:place:33.778 44.799} {convert:place:27.272 30.125} {convert:place:21.197 24.197} {convert:place:49.0 65.0} {convert:place:43.258 59.258} {convert:place:33.233 44.254} {convert:place:33.0 44.0} {convert:place:41.109 57.109} {convert:place:13.102 16.102} {convert:place:3.230 3.230} {convert:place:31.94 35.94} {convert:place:3.150 3.150} {convert:place:13.104 16.104} {convert:place:37.0 49.0} {convert:place:45.262 61.157} {convert:place:27.279 30.125} {current 1.0} {convert:place:21.0 24.0} {matchend 57.45} {convert:place:13.260 16.260} {convert:place:3.11 3.11} {convert:place:33.475 44.496} {convert:place:25.0 28.0} {convert:place:3.157 3.157} {convert:place:46.0 62.0} {convert:place:45.269 61.164} {convert:place:45.200 61.149} {convert:place:30.0 33.0} {convert:place:25.31 28.31} {convert:place:27.47 30.36} {convert:place:13.0 16.0} {convert:place:3.19 3.19} {convert:place:7.51 7.51} {convert:place:33.101 44.122} {convert:place:15.74 18.74} {convert:place:1.0 1.0} {convert:place:45.358 61.253} {convert:place:45.206 61.149} {convert:place:33.731 44.752} {convert:place:27.54 30.43} {convert:place:25.38 28.38} {convert:place:13.194 16.194} {convert:place:39.331 51.331} {convert:place:38.0 50.0} {convert:place:19.37 22.37} {convert:place:33.419 44.440} {convert:place:47.55 63.55} {convert:place:15.78 18.78} {convert:place:45.364 61.259} {convert:place:45.41 61.41} {convert:place:13.199 16.199} {convert:place:39.103 51.103} {convert:place:10.0 10.0} {convert:place:33.183 44.204} {convert:place:7.65 7.65} {convert:place:47.0 63.0} {anchor 61.278} {convert:place:5.6 5.6} {convert:place:15.85 18.85} {convert:place:39.107 51.107} {convert:place:33.428 44.449} {convert:place:31.0 35.0} {convert:place:9.84 9.84} {insert 61.283} {convert:place:14.0 17.28} {convert:place:33.187 44.208} {convert:place:9.105 9.105} {convert:place:47.66 63.66} {convert:place:35.87 46.87} {convert:place:33.432 44.453} {convert:place:45.375 61.270} {convert:place:33.189 44.210} {convert:place:13.219 16.219} {convert:place:9.88 9.88} {convert:place:33.587 44.608} {convert:place:2.0 2.0} {convert:place:33.192 44.213} {convert:place:27.243 30.125} {convert:place:45.55 61.59} {convert:place:39.267 51.267} {convert:place:15.95 18.95} {convert:place:40.0 56.0} {convert:place:39.0 51.0} {convert:place:33.204 44.225} {convert:place:33.194 44.215} {convert:place:13.224 16.224} {convert:place:13.305 16.305} {convert:place:37.120 49.120} {convert:place:35.94 46.94} {convert:place:33.438 44.459} {convert:place:33.439 44.460} {convert:place:3.273 3.273} {convert:place:9.95 9.95} {convert:place:13.298 16.298} {convert:place:21.31 24.31} {convert:place:19.60 22.60} {convert:place:45.384 61.283} {convert:place:33.198 44.219} {convert:place:27.250 30.125} {abbrevstart 61.271} {convert:place:13.84 16.84} {convert:place:45.152 61.149} {convert:place:37.124 49.124} {convert:place:33.209 44.230} {convert:place:11.0 11.0} {convert:place:45.153 61.149} {convert:place:13.86 16.86} {convert:place:21.34 24.34} {convert:place:33.445 44.466} {emacs_mark 64.0} {matchstart 57.34} {convert:place:48.0 64.0} {convert:place:39.206 51.206} {convert:place:33.599 44.620} {convert:place:33.87 44.108} {convert:place:33.214 44.235} {convert:place:32.0 42.0} {convert:place:3.279 3.279} {convert:place:15.0 18.0} {convert:place:45.392 61.291} {convert:place:45.239 61.149} {convert:place:11.5 11.5} {convert:place:33.288 44.309} {convert:place:45.403 61.302} {convert:place:36.0 49.0} {convert:place:33.533 44.554} {abbrevend 61.283} {convert:place:35.451 46.451} {convert:place:33.220 44.241} {convert:place:20.0 23.22} {convert:place:33.302 44.323} {convert:place:33.535 44.556} {convert:place:31.78 35.78} {convert:place:3.0 3.0} {convert:place:39.367 51.367} {convert:place:41.0 57.0} {convert:place:33.700 44.721} {convert:place:24.0 28.0} {convert:place:43.251 59.251} {convert:place:35.456 46.456} {convert:place:33.225 44.246} {convert:place:3.4 3.4}}} {{body_alink #ff0000} {body_vlink #000080} {body_link #0000ff} {body_text #000000} {body_bgcolor #ffffff}}