Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-08-30 10:04:00 (GMT)
committer Simon McVittie <simon.mcvittie@collabora.co.uk>2007-08-30 10:04:00 (GMT)
commitcc6191863f97a3995e7c616b539631c205350e89 (patch)
tree2402dd7a34abb55e5712eb10eb1ad6fa073b87f5
parent16869ff93e646394908077aad5082e21d9cb73a9 (diff)
When an activity becomes valid, emit the "missing" BuddyJoined signals; when it becomes invalid, emit BuddyLeft signals for everyone in it
-rw-r--r--src/activity.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/activity.py b/src/activity.py
index e85d314..71f2b2d 100644
--- a/src/activity.py
+++ b/src/activity.py
@@ -276,13 +276,23 @@ class Activity(ExportedGObject):
"""
try:
old_valid = self._valid
- if self._color and self._actname and self._id and self._type:
+ if (self._color is not None and self._actname is not None
+ and self._id is not None and self._type is not None):
self._valid = True
else:
self._valid = False
if old_valid != self._valid:
self.emit("validity-changed", self._valid)
+ if self._valid:
+ # Pretend everyone joined
+ for buddy in self._buddies:
+ self.BuddyJoined(buddy.object_path())
+ else:
+ # Pretend everyone left
+ for buddy in self._buddies:
+ self.BuddyLeft(buddy.object_path())
+
except AttributeError:
self._valid = False