Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Creating and Modifying Subpanels

Users can create and modify subpanels using the Front Panel pop-up menus.

This section discusses how to provide system-wide customization, which requires you to modify the Front Panel configuration files.

A subpanel is “attached” to a control in the Main Panel.

Figure 15–3 A subpanel's container is the control to which it is attached

Graphic

The attachment is done in the subpanel definition. The CONTAINER_NAME field specifies the control to which the subpanel is attached:

CONTROL control_name
 {
    …
 }

 SUBPANEL subpanel_name
 {
 	CONTAINER_NAME 					control_name
 	…
 }

To Create a New System-Wide Subpanel

  1. Locate the control_name of the control in the Main Panel to which you want to attach the subpanel.

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

  2. Create a new file /etc/dt/appconfig/types/language/*.fp.

  3. Define the subpanel:

    	SUBPANEL subpanel_name
     	{
     		CONTAINER_NAME			control_name
     		TITLE						value
     		KEYWORD				value
     		…
     	}
  4. Save the new configuration file.

  5. Choose Restart Workspace Manager from the Workspace menu.

Customizing the Built-in Subpanels

You can modify general properties (such as the title) and the contents of the built-in subpanels.

To Modify General Properties of a Built-In Subpanel

  1. Create a new Front Panel configuration file:

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

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

  2. Copy the entire default SUBPANEL definition from /usr/dt/appconfig/types/language/dtwm.fp to the new file:

    	SUBPANEL   subpanel_name
     	{
      	 …
     	}
  3. Modify the subpanel definition.

  4. Save the new configuration file.

  5. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following definition, placed in the file /users/janice/.dt/types/PerApps.fp, changes the name of the Personal Applications subpanel:

    SUBPANEL PersAppsSubpanel
     {
     	CONTAINER_NAME					TextEditor
     	TITLE								Janice's Applications
     }

To Add a System-Wide Control to a Built-In Subpanel

  1. Create a Front Panel configuration file /etc/dt/appconfig/types/language/name.fp.

  2. Define the system-wide control in the file.

    Use the CONTAINER_NAME and CONTAINER_TYPE fields to specify the container for the control:

    	CONTROL control_name
     	{
     		CONTAINER_NAME					subpanel_name
     		CONTAINER_TYPE					SUBPANEL
     		…
     	}

    See Defining Front Panel Controls.

  3. Save the configuration file.

  4. Choose Restart Workspace Manager from the Workspace menu.

    For example, the following control defined in a new file /etc/dt/appconfig/types/language/DigitalClock.fp adds the DigitalClock (in the Desktop_Tools application group) to the Personal Applications subpanel for all users.

    CONTROL DigitalClockControl
     {
     	TYPE						icon
     	CONTAINER_NAME			PersAppsSubpanel
     	CONTAINER_TYPE			SUBPANEL
     	ICON						Dtdgclk
     	PUSH_ACTION				DigitalClock
     	PUSH_RECALL				True
     }

To Remove a Control from a Built-In Subpanel

    Use the same procedure as for removing a Main Panel control. See To Remove a Control.

To Remove the Install Icon Control

    Add the following field to the subpanel definition:

	CONTROL_INSTALL					False

To Change the Auto-Close Behavior of Subpanels

The default behavior of subpanels is to close when the user chooses a control, unless the user has moved the subpanel from its original position.

The Front Panel can be configured to keep subpanels open until the user explicitly closes them.

  1. Create a new Front Panel configuration file in:

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

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

  2. Copy the default PANEL definition from /usr/dt/appconfig/types/language/dtwm.fp to the new file:

    	PANEL FrontPanel
     	{
     	  …
     	}
  3. Add the following field to the PANEL definition:

    	SUBPANEL_UNPOST    False
  4. Save the new configuration file.

  5. Choose Restart Workspace Manager from the Workspace menu.