From 7ccbfb2da266004d149e89020eda01ae50bcaee7 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Fri, 24 Jun 2011 09:49:39 +0000 Subject: Friendstray: make sure the tray is right on the sharer side OLPC #10817 The code path that listens for the 'activity-added' signal is used to track the following use case: 'A' starts an activity (he gets the 'active-activity-changed' signal from the shell), he then at a later point shares the activity. In order to track joining/leaving buddies he needs to get the shared activity. On other machines if we receive the 'activity-added' signal we can ignore it, therefore the check if the current active activity is the shared one. Signed-off-by: Simon Schampijer Acked-By: Sascha Silbe --- diff --git a/src/jarabe/frame/friendstray.py b/src/jarabe/frame/friendstray.py index 31a9809..4055340 100644 --- a/src/jarabe/frame/friendstray.py +++ b/src/jarabe/frame/friendstray.py @@ -75,6 +75,10 @@ class FriendsTray(VTray): def __neighborhood_activity_added_cb(self, neighborhood_model, shared_activity): logging.debug('FriendsTray.__neighborhood_activity_added_cb') + active_activity = shell.get_model().get_active_activity() + if active_activity.get_activity_id() != shared_activity.activity_id: + return + self.clear() # always display ourselves -- cgit v0.9.1