Next: Defining new search patterns, Previous: Preferences support in custom files, Up: Customizing through XML and Python files
You can create your own themes and share them between users. You can then selectively chose which themes they want to activate through the preferences dialog (see GPS Themes).
Creating new themes is done in the customization files through
the <theme>
tag.
This tag accepts a number of attributes:
name (mandatory)
description (optional)
category (optional, default is General)
This tag accepts any other customization tag that can be put in the
customization files. This includes setting preferences (<pref>
,
defining key bindings (<key
), defining menus (<menu>
), ...
If the same theme is defined in multiple locations (multiple times in the same customization file or in different files), their effects will be cumulated. The first definition of the theme seen by GPS will set the description and category for this theme.
All the children tags of the theme will be executed when the theme is activated
through the preferences dialog. Although there is no strict ordering in which
order the children will be executed, the global order is the same as for the
customization files themselves: first the predefined themes of GPS, then the
ones defined in customization files found through the GPS_CUSTOM_PATH
directories, and finally the ones defined in files found in the user's
own GPS directory.
<?xml version="1.0" ?> <my-plug-in> <theme name="my theme" description="Create a new menu"> <menu action="my action"><title>/Edit/My Theme Menu</title></menu> </theme> </my-plug-in>