Custom Status Icons Pack
From MercuryWiki
Contents |
All versions (Unstable/Stable)
Status icon images
To create a custom status icon pack for Mercury, you'll obviously need the custom status icons you wish to create a pack for. These icons can be in PNG,JPEG or GIF format and can have any names you like. (Make sure your emoticons don't have a wide transparant edge along the sides or they'll show as smaller than their image-size indicates since the invisible edge is also shown)
Defining The Status Icons
|
- You'll need an icondef.xml file which defines the name for your pack and when to use a specific status icon. An empty icondef.xml file looks like this:
<?xml version='1.0' encoding='UTF-8'?> <icondef> <!-- This is where you should define the name and status icons --> </icondef>
Use this as the base for your icondef.xml file. Note the <icondef> tag, this is where we need to add the name and define when to use a specific status icon.
- Define a name for your status icon pack by adding the following at the top of the <icondef> section:
<meta> <name>NAME_OF_STATUS_ICON_PACK</name> <protocol>MSN</protocol> </meta>
Substitute NAME_OF_STATUS_ICON_PACK with the name of your status icon pack.
- Add an <icon> section for every status. The <icon> section looks like this:
<icon> <status>STATUS_NAME</status> <object mime='image/IMAGETYPE'>IMAGE_FILENAME</object> </icon>
- The variables will need to be changed as follows:
- Substitute STATUS_NAME with the status name which you wish to define. Make sure to use the exact status name.
- Substitute IMAGETYPE with the image format type you used for this icon. Mercury currently only checks if the mime type starts with image/ part and ignores the rest, the file format is recognized by java.
- Substitute IMAGE_FILENAME with the name of the the image file you wish to use for this status. You can use the same image for multiple icon definitions.
You'll need to make sure to define all regular status icons, that means you need to define status icons for all of the following:
- Away
- Be right back
- Blocked (used for blocked contacts)
- Busy
- Idle
- Offline
- On the phone
- Online
- Out to lunch
- Unknown (used for contacts you don't have in your list, and therefor don't know their status)
If one of these is not defined, Mercury will still run, but an error will be written to the infolog and obviously there will be no icon for that status.
- The icondef.xml file should look something like this:
<?xml version='1.0' encoding='UTF-8'?> <icondef> <meta> <name>My Status Icons</name> <protocol>MSN</protocol> </meta> <icon> <status>Away</status> <object mime='image/png'>away.png</object> </icon> <icon> <status>Be right back</status> <object mime='image/png'>online.png</object> </icon> <icon> <status>Blocked</status> <object mime='image/png'>block.png</object> </icon> <icon> <status>Busy</status> <object mime='image/png'>busy.png</object> </icon> <icon> <status>Idle</status> <object mime='image/png'>online.png</object> </icon> <icon> <status>Offline</status> <object mime='image/png'>offline.png</object> </icon> <icon> <status>On the phone</status> <object mime='image/png'>online.png</object> </icon> <icon> <status>Online</status> <object mime='image/png'>online.png</object> </icon> <icon> <status>Out to lunch</status> <object mime='image/png'>online.png</object> </icon> </icondef>
If large icon images end up being shown in their original resolution, you can set the default size for an icon by adding "width='20' height='20'" in the <object> tag for each icon. This should not happen from Mercury 2.0b3 on.
The Status Icon Pack
- Create a zip archive with all the status icon image files and the icondef.xml file in it.
- Copy/Move this zip archive to the settings directory in the resources/AppData folder ( Unstable/ Stable)
- Restart Mercury
- Activate your new custom status icon pack.
- For Mercury 2.0 Unstable: Open your account preferences and go to Contact list/Status Icons. You will see your newly created status icon pack in the list of available icons and you can now select it and press OK to use it.
- For Mercury 1.9 Stable: Open your account settings and go to Other/Status Icons. You will see your newly created status icon pack in the list of available icons and you can now select it and press OK to use it.
Mercury should now be using the custom status icons to display a contact's status.
