Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Advanced Front Panel Customization Modifying the Main Panel To Add a Control to the Main Panel  Previous   Contents   Next 
   
 

To Remove a Control

  1. Create a Front Panel configuration file:

    • System-wide: /etc/dt/appconfig/types/language/name.fp

    • Personal: HomeDirectory/.dt/types/name.fp

  2. Copy the definition of the control you want to delete to the new file.

    If the control is built-in, its definition is in /usr/dt/appconfig/types/language/dtwm.fp.

    You do not need to copy the entire definition. However, the portion you copy must include the fields CONTAINER_NAME and CONTAINER_TYPE.

  3. Add the DELETE field to the definition:

    	DELETE			True
  4. Save the configuration file

  5. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following control definition placed in the file /etc/dt/appconfig/types/language/TrashCan.fp removes the Trash Can control from the Front Panel.

    CONTROL Trash
     {
      CONTAINER_NAME  Top
      CONTAINER_TYPE  BOX
      DELETE          True
     }

To Modify a Control

Use this procedure when you need to modify a control definition--for example, to change its icon image.

  1. Copy the entire control definition from /usr/dt/appconfig/types/language/dtwm.fp to:

    • System-wide: /etc/dt/appconfig/types/language/name.fp

    • Personal: HomeDirectory/.dt/types/name.fp.

  2. Edit the field you want to change. You can also add additional fields.

  3. Save the file

  4. Choose Restart Workspace Manager from the Workspace menu.

To Interchange the Position of Controls

  1. Copy the control definitions for the controls whose positions you want to change from /usr/dt/appconfig/types/language/dtwm.fp to:

    • System-wide: /etc/dt/appconfig/types/language/name.fp

    • Personal: HomeDirectory/.dt/types/name.fp.

      You must copy the entire control definition for each control to be moved.

  2. Interchange the values of the POSITION_HINTS fields of the control definitions.

  3. Save the file

  4. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following definitions placed in a file /etc/dt/appconfig/types/C/MailHelp.fp interchange the positions of the Mail and Help Manager controls and lock these controls against personal changes.

    CONTROL Mail
     {
     	POSITION_HINTS					12
     	LOCKED							True
     	...the rest of the control definition
     }
     
    CONTROL Help
     {
     	POSITION_HINTS					5
     	LOCKED							True
     	...the rest of the control definition
     }

To Replace a Front Panel Control

  • Create another control definition with the same:

  • control_name

  • CONTAINER_NAME value

    For example, the following two controls are defined in two different configuration files. The controls have the same control name and container name and are therefore considered the same control.

  • Definition in /etc/dt/appconfig/types/C/SysControls.fp:

    	Control ImportantApplication
     	{
     		CONTAINER_NAME					Top
     		CONTAINER_TYPE					BOX
     		POSITION_HINTS					2
     	 ...
    	}
  • Definition in HomeDirectory/.dt/types/MyControls.fp:

    	Control ImportantApplication
     	{
     		CONTAINER_NAME					Top
     		CONTAINER_TYPE					BOX
     		POSITION_HINTS					6
     	 ...
    	}

    The personal control has precedence, so the control will be located at position 6.

 
 
 
  Previous   Contents   Next