From d0277612092074a7fdebbaa42b3a958f1f2cb14f Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 2 Mar 2007 22:22:19 +0100 Subject: [PATCH] Added create_with_object_id() func. --- sugar/activity/activityfactory.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sugar/activity/activityfactory.py b/sugar/activity/activityfactory.py index 5c0e69db..7901ed2e 100644 --- a/sugar/activity/activityfactory.py +++ b/sugar/activity/activityfactory.py @@ -100,3 +100,9 @@ def create_with_uri(service_name, uri): activity_handle = ActivityHandle(_find_activity_id()) activity_handle.uri = uri return ActivityCreationHandler(service_name, activity_handle) + +def create_with_object_id(service_name, object_id): + """Create a new activity and pass the object id as handle.""" + activity_handle = ActivityHandle(_find_activity_id()) + activity_handle.object_id = object_id + return ActivityCreationHandler(service_name, activity_handle)