Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorDan Williams <dcbw@localhost.localdomain>2007-01-06 21:29:13 (GMT)
committer Dan Williams <dcbw@localhost.localdomain>2007-01-06 21:29:13 (GMT)
commitb27257fadb7f198c3072a2480c3711b7b57cd43f (patch)
tree23d80f2d28dd20a2cb0c7e2808e5f2fba452b730 /sugar
parentf50d9f5f9a972f7149c4a57f225e00d7e48834c6 (diff)
Make shell responsible for activity ID generation
Enables tracking of activity launch throughout the whole process, so that the shell can be aware of the activity ID from the moment the activity is started by the shell, until the activity becomes active. Previously, the activity itself generated its own ID and told the shell what it was.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/Activity.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/sugar/activity/Activity.py b/sugar/activity/Activity.py
index c0023ab..7926dae 100644
--- a/sugar/activity/Activity.py
+++ b/sugar/activity/Activity.py
@@ -62,9 +62,9 @@ class ActivityDbusService(dbus.service.Object):
self._pservice = PresenceService.get_instance()
@dbus.service.method(ACTIVITY_INTERFACE)
- def start(self):
- """Start the activity."""
- self._activity.start()
+ def start(self, activity_id):
+ """Start the activity in unshared mode."""
+ self._activity.start(activity_id)
@dbus.service.method(ACTIVITY_INTERFACE)
def join(self, activity_ps_path):
@@ -120,13 +120,13 @@ class Activity(gtk.Window):
self._bus = ActivityDbusService(self)
- def start(self):
+ def start(self, activity_id):
"""Start the activity."""
if self._activity_id != None:
logging.warning('The activity has been already started.')
return
- self._activity_id = sugar.util.unique_id()
+ self._activity_id = activity_id
#ds = datastore.get_instance()
#self._journal_object = ds.create('', {}, self._activity_id)
@@ -162,9 +162,9 @@ class Activity(gtk.Window):
if self._activity_id != None:
logging.warning('The activity has been already started.')
return
+ self._activity_id = activity_ps.get_id()
self._shared = True
- self._activity_id = activity_ps.get_id()
# Publish the default service, it's a copy of
# one of those we found on the network.