From 0bd44c5a89afd327e4cd7acc715b46fd4f66a68f Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Fri, 09 Oct 2009 16:26:50 +0000 Subject: endrun Rainbow problem, v72 --- diff --git a/NEWS b/NEWS index 973a9bf..5f5e24e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ * cleaned up code for pre-0.86 palettes * fixed keyboard shortcut bug in pre-0.86 palettes +* fixed problem with int(None) in unselect +* fixed problem with int(float) in unselect +* fixed fence-post problem with searching off the end of blocks +* work-around Rainbow problem with tmpfile 71 diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index a9bce84..f7b030b 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -564,8 +564,17 @@ class TurtleArtActivity(activity.Activity): # Create a datastore object # save the current state of the project to the instance directory - import tempfile - tafd, tafile = tempfile.mkstemp(".ta") + # work-around Rainbow which doesn't seem to like tempfile.mkstemp + try: + tmppath = os.path.join(activity.get_activity_root(), "instance") + except: + # Early versions of Sugar (e.g., 656) didn't support + # get_activity_root() + tmppath = os.path.join( \ + os.environ['HOME'], \ + ".sugar/default/org.laptop.TurtleArtActivity/instance") + + tafile = os.path.join(tmppath,"tmpfile.ta") print tafile try: tawindow.save_data(self.tw,tafile) @@ -587,7 +596,6 @@ class TurtleArtActivity(activity.Activity): # Clean up dsobject.destroy() os.remove(tafile) - del tafd return """ Main toolbar button callbacks """ diff --git a/activity/activity.info b/activity/activity.info index 2644557..6742170 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = Turtle Art -activity_version = 71 +activity_version = 72 license = MIT bundle_id = org.laptop.TurtleArtActivity exec = sugar-activity TurtleArtActivity.TurtleArtActivity -- cgit v0.9.1