Excerpts from Simon Schampijer's message of Mon Jul 04 17:08:11 +0200 2011:
[...] > Yes, this all is true. It would be nice if this (the explanation of what's going on and why) were reflected in the patch description. [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 > >> + > > > > With the above understanding, shouldn't we reset self._shared_activity > > to None in __active_activity_changed_cb() and add the following check > > before yours? > > > > if self._shared_activity is not None: > > return > > So my check prevents on any other machine then the sharer machine the > neighborhood:activity-added to have any effect. All the rest should work > fine. AFAIK your addition is not needed, from testing and looking at the > code. But maybe I do oversee something, can you explain which exact case > it should fix? I don't think it fixes anything right now. But IMO it makes it clearer what we're doing. It also makes the code more robust in the light of future changes. Sascha -- http://sascha.silbe.org/ http://www.infra-silbe.de/
signature.asc
Description: PGP signature
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel