Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 17

Administering Application Resources, Fonts, and Colors

You can choose a wide range of colors and fonts for your display either by using Style Manager or by customizing additional font and color resources. This chapter discusses how to customize fonts and color resources.

This chapter also describes how to specify style translations for DtEditor widget applications such as the desktop text editor (dtpad) and Mailer (dtmail), and alternates for DtEditor widget application menu accelerators that conflict with these translations.

Setting Application Resources

Resources are used by applications to set certain aspects of appearance and behavior. For example, Style Manager (dtstyle) provides resources that enable you to specify where the system looks for files containing information about color palettes:

dtstyle*paletteDirectories: /usr/dt/palettes/C  HomeDirectory/.dt/palettes

App-default files for the desktop applications are located in the /usr/dt/app-defaults/language directory.

To Set System-Wide Resources

  • Add the resources to the file /etc/dt/config/language/sys.resources. (You may have to create the file.)

For example, if in /etc/dt/config/C/sys.resources you specify:

AnApplication*resource: value

then the resource AnApplication*resource will be set in each user's RESOURCE_MANAGER property at the next login.


Note - For more information about Style Manager resources, see the dtstyle man page. For more information about Mailer resources, see the dtmail man page.


To Set Personal Resources

  1. Add the resources to the file HomeDirectory/.Xdefaults.

  2. Double-click Reload Resources in the Desktop_Tools application group.

How the Desktop Loads Resources

Resources are loaded at session startup by Session Manager. For information on how Session Manager loads the resources into the RESOURCE_MANAGER, see "Loading the Session Resources".

Process Manager Resources

The following Process Manager Resources are available:

  • sampleNowTR

  • postPopupMenuTR

  • selectNextProcessTR

  • selectPrevProcessTR

  • selectFirstProcessTR

  • selectLastProcessTR

  • killSelectedProcessTR

Defining UNIX Bindings

By default UNIX bindings are not enabled.

To Specify-EMACS Style Translations

The following procedure specifies:

  • EMACS style translations for DtEditor widget applications such as the desktop Text Editor (dtpad) and Mailer (dtmail)

  • Alternates for DtEditor widget application menu accelerators that conflict with these translations.

  1. Add the following line to the HomeDirectory/.Xdefaults file:

    #include "/usr/dt/app-defaults/language/UNIXbindings"

    where language is the value of the LANG environment variable.

  2. Restart your session.

To Modify the EMACS-Style Translations

  1. Insert the contents of the file /usr/dt/app-defaults/language/UNIXbindings into HomeDirectory/.Xdefaults.

  2. Edit the bindings in the .Xdefaults file.

  3. Restart your session when you have finished.

UNIX Bindings Provided by the UNIXbindings File

The /usr/dt/app-defaults/language/UNIXbindings file provides the bindings described in the tables below.


Note - The Delete key deletes the previous character when the UNIX bindings are enabled, and Shift-Delete deletes the next character.


Table 17-1 lists the dtpad overrides for menu accelerators and accelerator text that conflict with the UNIX bindings.

Table 17-1 dtpad Overrides

Menu Accelerators and Accelerator Text

Override

Dtpad*fileMenu.print.acceleratorText:

 

Dtpad*fileMenu.print.accelerator:

 

Dtpad*editMenu.undo.acceleratorText:

Ctrl+_

Dtpad*editMenu.undo.accelerator:

Ctrl<Key>_

Dtpad*editMenu.paste.acceleratorText:

Shift+Insert

Dtpad*editMenu.paste.accelerator:

Shift<Key>osfInsert

Dtpad*editMenu.findChange.acceleratorText:

Ctrl+S

Dtpad*editMenu.findChange.accelerator:

Ctrl<Key>s

Table 17-2 lists the dtmail Compose window overrides for menu accelerators and accelerator text that conflict with the UNIX bindings.

Table 17-2 dtmail Compose Window Overrides

Menu Accelerators and Accelerator Text

Override

Dtmail*ComposeDialog*menubar*Edit.Undo.acceleratorText:

Ctrl+_

Dtmail*ComposeDialog*menubar*Edit.Undo.accelerator:

Ctrl<Key>_

Dtmail*ComposeDialog*menubar*Edit.Paste.acceleratorText:

Shift+Insert

Dtmail*ComposeDialog*menubar*Edit.Paste.accelerator:

Shift<Key>osfInsert

Dtmail*ComposeDialog*menubar*Edit.Find/Change.acceleratorText:

Ctrl+S

Dtmail*ComposeDialog*menubar*Edit.Find/Change.accelerator:

Ctrl<Key>s

 
 
 
  Previous   Contents   Next