diff options
Diffstat (limited to 'src/sugar/activity/activityfactory.py')
-rw-r--r-- | src/sugar/activity/activityfactory.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py index 566455c..58de117 100644 --- a/src/sugar/activity/activityfactory.py +++ b/src/sugar/activity/activityfactory.py @@ -123,7 +123,7 @@ def get_environment(activity): return environ -def get_command(activity, activity_id=None, object_id=None, version_id=None, uri=None): +def get_command(activity, activity_id=None, tree_id=None, version_id=None, uri=None): if not activity_id: activity_id = create_activity_id() @@ -131,8 +131,8 @@ def get_command(activity, activity_id=None, object_id=None, version_id=None, uri command.extend(['-b', activity.get_bundle_id()]) command.extend(['-a', activity_id]) - if object_id is not None: - command.extend(['-o', object_id]) + if tree_id is not None: + command.extend(['-o', tree_id]) if version_id is not None: command.extend(['-r', version_id]) if uri is not None: @@ -222,7 +222,7 @@ class ActivityCreationHandler(gobject.GObject): self._shell = dbus.Interface(bus_object, _SHELL_IFACE) if handle.activity_id is not None and \ - handle.object_id is None: + handle.tree_id is None: datastore = dbus.Interface( bus.get_object(_DS_SERVICE, _DS_PATH), _DS_INTERFACE) datastore.find({ 'activity_id': self._handle.activity_id }, [], @@ -252,7 +252,7 @@ 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.tree_id, self._handle.version_id, self._handle.uri) @@ -322,8 +322,8 @@ class ActivityCreationHandler(gobject.GObject): if count > 0: if count > 1: logging.debug("Multiple objects has the same activity_id.") - self._handle.object_id = jobjects[0]['uid'] - self._handle.version_id = jobjects[0]['vid'] + self._handle.tree_id = jobjects[0]['tree_id'] + self._handle.version_id = jobjects[0]['version_id'] self._launch_activity() def _find_object_error_handler(self, err): @@ -341,7 +341,7 @@ def create_with_uri(bundle, uri): activity_handle = ActivityHandle(uri=uri) return ActivityCreationHandler(bundle, activity_handle) -def create_with_object_id(bundle, object_id, version_id): - """Create a new activity and pass both the object id and the version id as handle.""" - activity_handle = ActivityHandle(object_id=object_id, version_id=version_id) +def create_with_tree_id(bundle, tree_id, version_id): + """Create a new activity and pass both the tree id and the version id as handle.""" + activity_handle = ActivityHandle(tree_id=tree_id, version_id=version_id) return ActivityCreationHandler(bundle, activity_handle) |