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

To Associate an Icon with an Action or Data Type

  1. Specify the icon using the ICON field.

    If you follow the appropriate naming conventions for icon files, specify only the base name of the icon. The correct icon will be displayed based on the resolution and color support of your display.

  2. Create the following icon sizes:

    • Actions: large, medium, and tiny

    • Data types: medium and tiny

Example of an Action Definition

The following example is an action definition for starting the Island Paint drawing tool. The icons Ipaint.l and Ipaint.s are associated with the action.

ACTION	IslandPaintOpenDoc
{
 	WINDOW_TYPE				NO-STDIO
 	ICON						Ipaint
 	EXEC_STRING    		/usr/bin/IslandPaint %Arg_1"File to open:"%
 }

If you are using color icons, the desktop first appends .pm when looking for the actual icon files. Otherwise (or if no match is found with .pm), the desktop appends .bm.

Example of Data Type Definition

The following data type definition associates the icons comprsd.l and comprsd.s with compressed files:

DATA_ATTRIBUTES  COMPRESSED
{
		ICON					comprsd
 	ACTIONS				Uncompress
 	DESCRIPTION			A COMPRESSED file has been compressed by the \
 							'compress' command to take up less space.
}