SunSolve Internal

 

  Simple Search | Advanced Search | Product Search | Tips | Investigation Wizard

 Search for in

Printer Friendly Page ] [ E-mail this Document to Someone ]
Was this document useful? Yes or No ]

Jump to
Infodoc ID   Synopsis   Date
17432   How to add or remove an icon to or from the CDE Front Panel   16 Jul 1998

Description Top
How can I add an icon to the CDE Front Panel or remove an icon from the Front
Panel?

The CDE Front Panel is defined by a database of configuration files.  The
default Front Panel configuration is defined in:

/usr/dt/appconfig/types/C/dtwm.fp

Front Panel configuration files end with the extension ".fp".

By default, Front Panel configuration files are found in the following
directories:

$HOME/.dt/types/
/etc/dt/appconfig/types/C/
/usr/dt/appconfig/types/C/

Where there is a conflict between components of a definition, the following
rules apply:

+ If the components have the same name, the first component read is used
+ If two components specify the same position, the are placed in the order
  in which they are read

To remove a control from the Default CDE's Front Panel:

1.  Copy its definition from

    /usr/dt/appconfig/types/C/dtwm.fp

    into a file with the ".fp" extension residing in the directory:

    $HOME/.dt/types

2.   Add the following text to the control definition:

    DELETE      True

3.   Choose "Restart WorkspaceManager ..." from the root menu.

For example, to remove the Text Edit application from the Front Panel
copy its text from:

	/usr/dt/appconfig/types/C/dtwm.fp 

into

	$HOME/.dt/types/textedit.fp

then add the line:

DELETE  True

The control definition should look like:

CONTROL TextEditor
{
  TYPE                  icon
  CONTAINER_NAME        Top
  CONTAINER_TYPE        BOX
  POSITION_HINTS        4
  ICON                  Fppenpd
  LABEL                 Text Editor
  PUSH_ACTION           Dtpad
  DROP_ACTION           Dtpad
  HELP_TOPIC            FPOnItemTextEditor
  HELP_VOLUME           FPanel
  DELETE                True
}

Finally, choose "Restart Workspace Manager..." , from the root menu.  The
Text Editor will be removed from the Front Panel.

To add a system-wide Control to the Front Panel:

1.  Create and edit a file with the extension ".fp" in:

    /etc/dt/appconfig/types/C/

    Alternatively, to add a personal Control to the Front Panel, create and
edit
    a file with the extension ".fp" in:

    $HOME/.dt/types/


2.   Define a control in that file using the following syntax:

    COMPONENT {name}
    {
        {keyword} {value}
        {keyword} {value}
    ...
    }

    Refer to the /usr/dt/appconfig/types/C/dtwm.fp for examples of {name},
    {keyword} and {value}

3.   Choose "Restart Workspace Manager ..." from the root menu.

For example, to add a Load Meter to the Front Panel as the third item from
the left, follow these steps:

	A. Create and edit the file:

		$HOME/.dt/types/load.fp

	B. Define the following control:

		CONTROL LoadMeter
		{
		    TYPE                client
		    POSITION_HINTS      3
		    CONTAINER_NAME      Top
		    CONTAINER_TYPE      BOX
		    CLIENT_NAME         xload
		    CLIENT_GEOMETRY     88x64
		}


	C. Choose "Restart Workspace Manager..." , from the root menu.  
	The Load Meter will be displayed in the Front Panel.

How to add a newly created CDE action to a subpanel on dtwm's front
panel on system-wide level.

1. Create a system-wide front panel configuration file (as root) using 
   this naming convention:

   /etc/dt/appconfig/types/language/name.fp

   where "name" is the name of the file.  Please retain the ".fp" extension.

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
   {
     CONTANINER_NAME  subpanel_name
     CONTANINER_TYPE  SUBPANEL

     ...
   }

   where "..." is the actual CONTROL specifications.

   Note:  To find subpanel_name, examine these
   files:

   + $HOME/dt/appconfig/*.fp
   + /etc/dt/appconfig/types/C/*.fp
   + /usr/dt/appconfig/types/C/*.fp
  
3. Save the configuration.

4. Exit CDE and login as any user. 


EXAMPLE: Allows for a cmdtool to start from the Personal Applications subpanel
         for all users on one system.

1. Create /etc/appconfig/types/C/cmd.fp

2. cmd.fp file has the following CONTROL definition:

   CONTROL cmdtool
   {
     TYPE           icon
     CONTAINER_NAME PersAppsSubpanel
     CONTAINER_TYPE SUBPANEL
     ICON           Dtactn
     PUSH_ACTION    cmdAct
     PUSH_RECALL    True
   }

   Since this control is associated with a PUSH_ACTION, the ACTION 
   cmdACT must be created.  It is best placed in same directory, with 
   a file extension of ".dt"  (/etc/appconfig/types/C/name.dt.  In 
   this example name.dt = cmd.dt).

   The cmd.dt file has the following ACTION definition:

   ACTION cmdAct
   {
     EXEC_STRING    /usr/openwin/bin/cmdtool
     WINDOW_TYPE   NO_STDIO 
   }

3. When finished with step two one should have both a cmd.fp and a 
   cmd.dt in the "system-wide" directory /etc/appconfig/types/C

4. Exit CDE and login as any user.  The Personal Applications subpanel 
   will have a Dtactn icon.  When this icon is selected, an
   OpenWindows cmdtool will appear.
Product Area Windows
Product CDE
OS Solaris 2.x
Hardware any

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team