[Gajim-devel] [PATCH] publisher/subscriber in common/events.py (+ decoupling from systray.py)
asterix at lagaule.org
Sat Mar 10 12:29:16 CET 2007
Mikhail Gusarov a écrit :
> 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
More information about the Gajim-devel