diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 11:35:39 (GMT) |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2007-09-12 11:35:39 (GMT) |
commit | bc49fc425755bc148649ae0934e06eb76eb1125c (patch) | |
tree | 1f2230f3b4170cc9c70583c921286886363be4ba /sugar | |
parent | ac73c3950a2c44e7e146d1b5e86ffc81d560e727 (diff) |
When joining an activity, pick up its sharing scope.
This avoids trying to re-share already shared activities in order to invite someone (#3364)
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/activity/activity.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 4bda7eb..f18cb1c 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -520,11 +520,15 @@ class Activity(Window, gtk.Container): if not success: logging.debug("Failed to join activity: %s" % err) return + if self._shared_activity.props.private: + self._share_scope = SCOPE_INVITE_ONLY + else: + self._share_scope = SCOPE_NEIGHBORHOOD + self.present() self.emit('joined') if self._jobject: - # FIXME: some way to distinguish between share scopes - self._jobject.metadata['share-scope'] = SCOPE_NEIGHBORHOOD + self._jobject.metadata['share-scope'] = self._share_scope def get_shared(self): """Returns TRUE if the activity is shared on the mesh.""" |