
README-resources

Most of the apperance of widgets, such as colors and fonts, is set
via the built in option database for resources.
These instructions assume you have the sources available, or that
you run Mac OS X and has "opened" the application by control clicking it.

The default.rdb file always sets some reasonable values.
After that the platform specific rdb file is read.
If the theme is set in the prefs file, the themeName.rdb
file is read. This is first searched for inside the sources and then 
in the alternative user directory. You find this directory
by using the Jabber/Debug menu command, and write
puts $this(altResourcePath)
Typically you'll have a path .../Coccinella/resources/

There are several levels of options that can be set.

1) Tk's standard widget resources are set the usual way.
Examples:
*background:	      #aea485
*Button.background:   red

2) Specific megawidget resources are set using, for instance:
*Tablelist.background:             #aa2222

3) There are several application specific classes that can be
used when specifying resources. They are:
Whiteboard, JMain, MailBox, Chat, GroupChat, NewMsg, Splash...
Use them as:
*MailBox*Tablelist.labelBackground:        #dd1111

4) Some of these also have specific resource names, see the
respective sources for this. One example:
*Chat*youPreBackground:        green

5) Most icons may also be customized. Place your gif images
in their own directory inside the images/ directory of the
sources. Give this directory a name that associates to the 
theme name. Specify this directory in your themes rdb file as:
*themeImageDir:                     galileolinux

As an alternative you may create your image directory inside your
preferences directory, which you find by using the Jabber/Debug 
menu command, and write 
puts $this(altImagePath)
Typically you'll have a path .../Coccinella/images/MyTheme/

6) Each image has a resource name associated with it. If you keep
the filename the same as in the original distro, the image
will be automatically used. You may also pick a different
name, but then you must specify a new value for the resource
that is also the file name. Examplevise:
*JMain.connectImage:       imageMyConnect
where the 'imageMyConnect.gif' file is inside the themes image directory.

7) Images are searched for in this order:
   o the images/themeImageDir, in this case images/galileolinux
   o then images/platformName where the platformName is any of
     unix, windows, macintosh, or macosx
   o lastly, in images/

Some images have also been hardcoded into the sources, and they
will be obtained from there if not found in the above directory
hierarchy.

8) If you require anything that is not GIFs, say PNG, then you must
specify all these extra file suffixes in the theme rdb file as:
*themeImageSuffixes:       .png
Be sure you coordinate this with the paragraph below since GIF is the
only format supported by the core Tk.

9) Finally, if your theme have any requirements these should be put
in a file named ${themeName}CanLoad.tcl which must return 1 if the
theme resources can be loaded on the system and 0 if not.


That's it!