Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/activity
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-09-08 01:53:32 (GMT)
committer Dan Williams <dcbw@redhat.com>2007-09-08 01:53:32 (GMT)
commit9e2a9c4c025b492169fe244c4a443d1b63b50968 (patch)
tree6995c72387024d26f4aad879b4d31f33c364fe6a /sugar/activity
parent434483f54a3a5477077a96167f17ee6e19e2a0e7 (diff)
Support moving of files to datastore when using write_file()
Using the transfer_ownership argument, activities using the default activity datastore integration methods (namely write_file) will now tell the datastore that it can move the files by default. This reduces the copies required, which is slow on flash. For activities not using the standard APIs (Record, etc), the datastore bindings allow the activity to specify when ownership should transfer.
Diffstat (limited to 'sugar/activity')
-rw-r--r--sugar/activity/activity.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index b019627..a5661cd 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -487,6 +487,7 @@ class Activity(Window, gtk.Container):
pass
self._updating_jobject = True
datastore.write(self._jobject,
+ transfer_ownership=True,
reply_handler=self._internal_save_cb,
error_handler=self._internal_save_error_cb)