Monday, 29 June 2009

Changing status for multiple accounts

We now supports multiple accounts. Each account can have its own status and description. We need a way to allow user to change these easily. Our usability team created two modes for kadu: advanced and simple one. In advanced mode each account will have its own status button and status menu, each identity will have own button and menu (accounts can be joined in identities like Work and Private).

Development team has to put these ideas into code. In Kadu 0.6.5 each status change goes through StatusChangerManager singleton, that stores current user-set status and computes real status (modules can change what user set). StatusButton and StatusMenu uses this singleton.

The new code will be a little more complicated. StatusContainer interface (empty class) is introduced. It contains methods to set status, get current status and signal statusChanged. This interface will be implemented by two classes: Account (already done) and Identity (this class does not exists yet). Singleton StatusContainerManager will be created, as well as StatusContainerAwareObject class. Each StatusMenu object will get an StatusContainer object as contructor parameter, the samy apply for StatusButton. New widget, StatusButtons, is an StatusContainerAwareObject so it can adjust itself to new accounts/identities. It is just a horizontal box that contains multiple StatusButton widgets.

I thinks that this architecture will cover all needed functionality. Any other ideas?

No comments:

Post a Comment