Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArtActivity.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-02 19:47:56 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-02 19:47:56 (GMT)
commit63b77956a996c0f7214248275f7f12806e5ba341 (patch)
treedbfb2556a65b0289c94d5e8288551b8e6176508a /TurtleArtActivity.py
parent1b5b6af91b260dc90620baafae25fb2d0d396a06 (diff)
bits of cleaning here and there
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r--TurtleArtActivity.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py
index 0c9d747..8afbd9f 100644
--- a/TurtleArtActivity.py
+++ b/TurtleArtActivity.py
@@ -20,9 +20,6 @@
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#THE SOFTWARE.
-import tawindow
-import talogo
-
import pygtk
pygtk.require('2.0')
import gtk
@@ -59,11 +56,14 @@ import os.path
import subprocess
import tarfile
import sys
-from taexporthtml import *
-from taexportlogo import *
import re
from constants import *
+from taexporthtml import *
+from taexportlogo import *
+from tautils import *
+import tawindow
+import talogo
SERVICE = 'org.laptop.TurtleArtActivity'
IFACE = SERVICE
@@ -283,7 +283,7 @@ class TurtleArtActivity(activity.Activity):
print tafile
try:
# FIXME: encapsulation?
- self.tw.save_data(tafile)
+ data_to_file(self.tw.assemble_data_to_save(), tafile)
except:
_logger.debug("couldn't save snapshot to journal")
@@ -568,8 +568,7 @@ class TurtleArtActivity(activity.Activity):
# sharer should send current state to joiner
if self.initiating is True:
_logger.debug("serialize the project and send to joiner")
- data = self.tw.assemble_data_to_save(True, True)
- text = data_to_string(data)
+ text = data_to_string(self.tw.assemble_data_to_save(True, True))
self._send_event("I:" + text)
self.tw.show_palette()
elif text[0] == 'I': # receiving current state
@@ -1014,7 +1013,7 @@ class TurtleArtActivity(activity.Activity):
def write_file(self, file_path):
_logger.debug("Write file: %s" % file_path)
self.metadata['mime_type'] = 'application/x-turtle-art'
- self.tw.save_data(file_path)
+ data_to_file(self.tw.assemble_data_to_save(), file_path+'.ta')
"""
Read a project in and then run it