From 670722bc497b1ba90d4300bfc2a48424334d29b8 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 9 Nov 2007 15:43:54 +0100 Subject: [PATCH] Always checkin to the DS from a new file. --- NEWS | 2 ++ lib/sugar/activity/activity.py | 13 +++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 333dd0ae..7825e575 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +* Always checkin to the DS from a new file. (tomeu) + Snapshot c682a5e241 - #4570: Fix alt-tab and ctrl-alt-tab behavior diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index 71e53452..ffbd9ec3 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -686,14 +686,11 @@ class Activity(Window, gtk.Container): self.metadata['preview'] = dbus.ByteArray(preview) try: - if self._jobject.file_path: - self.write_file(self._jobject.file_path) - else: - file_path = os.path.join(self.get_activity_root(), 'instance', - '%i' % time.time()) - self.write_file(file_path) - self._owns_file = True - self._jobject.file_path = file_path + file_path = os.path.join(self.get_activity_root(), 'instance', + '%i' % time.time()) + self.write_file(file_path) + self._owns_file = True + self._jobject.file_path = file_path except NotImplementedError: pass