Mikhail Gusarov a écrit :
Hi,
Attached is the patch which allows subscribing to events in common/events.py (using publisher/subscriber pattern). As a side-effect, this patch decouples systray.py and common/events.py (common/events.py no longer even imports common.gajim).
The patch allows additional modules to be written, which do the different things when events arrive (e.g. blinking LED, executing external program). Existing things, such as emiting DBus messages on new events also may be restructured to use this mechanism.
Thanks for the patch. It's a good solution to handle events better in our code. I've modified your code a bit (integrate SystrayEventsListener class in Systray one) and commited it in rev 8008