First new options, then Windows Snarls at me
June 10, 2006, 5:14 pmTwo bits of news for Psi, both hot off the SoC2006 press.
Firstly, I’ve implemented (most of) the new options system we’ve been talking about for so long and pushed it to mainline. It’s all dynamic, which means there’s no more editing common.h to add a new option, then editing the profiles code to set a default and copy/pasting some code to save and load the option; it’s all dynamic. To add a new option now, all we need to do is set it in the code with PsiOptions::instance()->setOption( "options.appearance.emoticons.use", true);, for example. Of course, options are very little use without defaults and this is now handled much more conveniently. When the Psi exectutable is built, an options-default.xml file is saved within the binary with the application defaults (this means that if you’re building your own Psi, you can change the defaults trivially). On top of this, your system administrator may install a system-wide defaults file to override this - and to make this even better, it can be a partial config, so if the only thing your admin wants to change is to make the roster pink in the default profiles, they can. Additionally, unrecognised options are now handled gracefully, no more of the problems of losing configs when reverting to previous Psi versions. The last bit of candy so far is that it’s all saved the moment the data structure is changed in memory: no more losing options during an unclean termination.
It’ll take us some time to move all the old options across to the new system but it’s something to look forward too.
The second, and probably more interesting, piece of news is that I found (Jason in the Psi muc told me about) Snarl, which aims to be a Growl-alike system for Windows. Since I want plenty of plugins to test the interface while I’m working on it, I implemented a Snarl plugin for windows for prettier notifications (since the plugin interface is completely unfinished, this only works for the single plugin method I’ve implemented, incoming messages, but its pretty enough).

The Google Summer of Code is turning out to be a fantastic opportunity to work on some things I wouldn’t have had time to work on otherwise and I’m very grateful to both Google for putting up the money, and the JSF council for choosing my proposal.

This dynamic option system remind me of a similar system I’ve done for a old C# project of mine. It’s nice to see progress on your SoC, and on Psi.