Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/activity/activityfactory.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-07-15 08:50:05 (GMT)
committer Tomeu Vizoso <tomeu.vizoso@collabora.co.uk>2010-08-20 13:33:53 (GMT)
commit363f82820557e3b15e6c36334bceeae1f863ed31 (patch)
treee1a4433cf5a5197a443d3f92359007bee6b96f34 /src/sugar/activity/activityfactory.py
parentaf6e3aa5ef284ed9184f149b119707496747f3a5 (diff)
Handle invitations using Mission Control 5.
src/sugar/activity/activity.py: If the activity is being invoked to handle an invite, create a Client.Handler instance and share the activity when HandleChannels is invoked. src/sugar/activity/activityfactory.py, src/sugar/activity/activityhandle.py, src/sugar/activity/main.py: Add a -i switch that indicates to the activity that it should handle the channel from an invitation. src/sugar/presence/activity.py: Expose Activity.room_handle. src/sugar/presence/presenceservice.py: Add get_activity_by_handle(). src/sugar/presence/util.py: Add get_account_for_connection().
Diffstat (limited to 'src/sugar/activity/activityfactory.py')
-rw-r--r--src/sugar/activity/activityfactory.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py
index 0dd3793..4789c33 100644
--- a/src/sugar/activity/activityfactory.py
+++ b/src/sugar/activity/activityfactory.py
@@ -121,7 +121,8 @@ def get_environment(activity):
return environ
-def get_command(activity, activity_id=None, object_id=None, uri=None):
+def get_command(activity, activity_id=None, object_id=None, uri=None,
+ activity_invite=False):
if not activity_id:
activity_id = create_activity_id()
@@ -133,6 +134,8 @@ def get_command(activity, activity_id=None, object_id=None, uri=None):
command.extend(['-o', object_id])
if uri is not None:
command.extend(['-u', uri])
+ if activity_invite:
+ command.append('-i')
# if the command is in $BUNDLE_ROOT/bin, execute the absolute path so there
# is no need to mangle with the shell's PATH
@@ -236,8 +239,8 @@ class ActivityCreationHandler(gobject.GObject):
environ = get_environment(self._bundle)
(log_path, log_file) = open_log_file(self._bundle)
command = get_command(self._bundle, self._handle.activity_id,
- self._handle.object_id,
- self._handle.uri)
+ self._handle.object_id, self._handle.uri,
+ self._handle.handle_invite)
dev_null = file('/dev/null', 'w')
environment_dir = None