Chapter 15. Adding Your Application's Icon to the Icon Catalog

This chapter explains how to add your Desktop icon to the Desktop's Icon Catalog. This chapter contains these sections:

About the Icon Catalog

The Icon Catalog (or Icon Book) contains named pages that store icons. The pages are named according to type. For example, some current page names are Applications, Demos, and Control Panels. Users can create their own custom pages containing collections of icons.

To open the Icon Catalog, choose an item from the Icon Catalog menu on the Find toolchest. Figure 15-1 shows the DesktopTools page of the Icon Catalog.

Figure 15-1. The Icon Catalog Window


Adding an Icon to the Icon Catalog

Before you can add an icon to the Icon Catalog, you must create the icon using IconSmith and the appropriate FTR rules, as described earlier in this guide. Once you've done this, use the iconbookedit command to add or remove icons from the Icon Catalog. The iconbookedit command accepts a file that contains a layout for the Icon Catalog window. This layout file declares which icons should be in the window. To add your application's icon to the Icon Catalog, enter:

% iconbookedit -add "Category:File Name:myApplication" -syspage whichPage 

where myApplication is your application name and path and whichPage is a particular page in the Icon Catalog. For example, suppose your application is called pastry and it's in /usr/sbin. To add the pastry application to the Applications page of the Icon Catalog (assuming you've already created the icon), you would enter:

% iconbookedit -add "Category:File Name:/usr/sbin/pastry" -syspage Applications 

Similarly, you can remove an icon using the -remove flag.

For more information on the Icon Catalog and how to edit it, see the iconbook(1M) and iconbookedit(1M) reference pages. To determine which Icon Catalog page is appropriate for your application, see “Putting Icons into the Icon Catalog” in Chapter 2 of the Indigo Magic User Interface Guidelines.

Updating Your Installation Process

Set up your installation process to execute the iconbookedit command, as described above, so that your icon appears in the Icon Catalog on your users' workstations when they install your application.

To do this (assuming you're using swpkg to package your product for installation), select the exitop attribute on the Add Attributes worksheet and specify the iconbookedit command described earlier:

iconbookedit -add "Category:File Name:myApplication" -syspage whichPage 

where myApplication is your application name and path and whichPage is a particular page in the Icon Catalog.

See Chapter 6, “Adding Attributes,” in the Software Packager User's Guide for instructions for more information on setting the exitop attribute in swpkg.