sugarlabs/sugar — pull request #271 by tchx84 (2014-03-13 03:40:24+00:00)
Title: Connect to same event once at a time from _Account

After an _Account._connection is set, the _Account connects to
'active-activity-changed' shell event. _Account._connection can
later be drop and set to None. When _Account._connection is re-set,
the _Account will re-connect to the same shell event without
disconnecting from the previous one.

Also, when _Account._connection is set to None, it makes no sense
to continue handling that shell event, as there is no need to update
the current active activity for that _Account.

Therefore, make sure _Account connects to shell event only once at a
time, and that it gets disconnected when _Account._connection is drop.

Fixes #4739

Signed-off-by: Martin Abente Lahaye