[Sugar-devel] [PATCH sugar] Friendstray: make sure the tray is right on the sharer side OLPC #10817

Simon Schampijer simon at schampijer.de
Fri Jun 24 05:57:56 EDT 2011

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 <simon at laptop.org>
 src/jarabe/frame/friendstray.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

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,
+        active_activity = shell.get_model().get_active_activity()
+        if active_activity.get_activity_id() != shared_activity.activity_id:
+            return
         # always display ourselves

More information about the Sugar-devel mailing list