Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2013-04-02 04:30:46 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2013-04-02 04:30:46 (GMT)
commit0fdd561a055f61479d5ec6ad9c990f784dd5b5b3 (patch)
tree41c7839d253e7e1170508f7429013330023819d2
parent0502cab7f37c9a987cb19ab89365fc68b48e5f3c (diff)
parent9c38b6758cbed458826e1ec7d801ea09aa5e606d (diff)
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
-rw-r--r--.arcconfig4
-rw-r--r--.gitignore1
-rw-r--r--NEWS11
-rw-r--r--TurtleArt/talogo.py2
-rw-r--r--TurtleArtActivity.py2
-rw-r--r--activity/activity.info2
-rw-r--r--plugins/audio_sensors/audiograb.py5
-rw-r--r--samples/graphics-csquiral.ta51
-rwxr-xr-xturtleblocks.py5
9 files changed, 50 insertions, 33 deletions
diff --git a/.arcconfig b/.arcconfig
new file mode 100644
index 0000000..4c2c94f
--- /dev/null
+++ b/.arcconfig
@@ -0,0 +1,4 @@
+{
+ "project_id" : "turtleart",
+ "conduit_uri" : "http://phabricator.itevenworks.net/"
+}
diff --git a/.gitignore b/.gitignore
index 737cf64..f3d74a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
*.pyc
*~
-*.pyo
diff --git a/NEWS b/NEWS
index 4185d16..0fc53e0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+175
+
+ENHANCEMENT:
+* Power management utility: Alan Aguiar
+
+BUG FIXES:
+* Force audio sensors to use single channel on XO 4
+* Fix problem with file naming when saving images in GNOME
+* Fix problem with file naming when saving Logo code in GNOME
+* Use newline (\n) instead of return (\r) in exported Logo code
+
174
ENHANCEMENTS:
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index d8adca6..91ae153 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -606,6 +606,8 @@ class LogoCode:
self.clear_value_blocks()
def clear_value_blocks(self):
+ if not hasattr(self, 'value_blocks_to_update'):
+ return
for name in value_blocks:
self.update_label_value(name)
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py
index 65b176c..2583a0c 100644
--- a/TurtleArtActivity.py
+++ b/TurtleArtActivity.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#Copyright (c) 2007, Playful Invention Company
#Copyright (c) 2008-13, Walter Bender
-#Copyright (c) 2009-10 Raul Gutierrez Segales
+#Copyright (c) 2009-13 Raul Gutierrez Segales
#Copyright (c) 2012 Alan Aguiar
#Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/activity/activity.info b/activity/activity.info
index 7ebcab1..3d1e9d5 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,6 +1,6 @@
[Activity]
name = TurtleBlocks
-activity_version = 174
+activity_version = 175
license = MIT
bundle_id = org.laptop.TurtleArtActivity
exec = sugar-activity TurtleArtActivity.TurtleArtActivity
diff --git a/plugins/audio_sensors/audiograb.py b/plugins/audio_sensors/audiograb.py
index 8ce89ad..228e4c2 100644
--- a/plugins/audio_sensors/audiograb.py
+++ b/plugins/audio_sensors/audiograb.py
@@ -25,7 +25,7 @@ import traceback
from string import find
from threading import Timer
-from TurtleArt.taconstants import XO1
+from TurtleArt.taconstants import XO1, XO4
from TurtleArt.tautils import debug_output
# Initial device settings
@@ -63,7 +63,8 @@ class AudioGrab():
self.temp_buffer = [0]
self.rate = RATE
- if self.parent.hw == XO1:
+ # Force XO1 and XO4 to use just 1 channel
+ if self.parent.hw in [XO1, XO4]:
self.channels = 1
else:
self.channels = None
diff --git a/samples/graphics-csquiral.ta b/samples/graphics-csquiral.ta
index 678dbfd..9b77344 100644
--- a/samples/graphics-csquiral.ta
+++ b/samples/graphics-csquiral.ta
@@ -1,27 +1,24 @@
-[[0, ["start", 2.0], 160, 180, [null, 1]],
-[1, "clean", 160, 222, [0, 18]],
-[2, "setpensize", 160, 348, [18, 3, 4]],
-[3, ["number", 20], 261, 348, [2, null]],
-[4, "repeat", 160, 390, [2, 5, 6, null]],
-[5, ["number", 1300], 211, 390, [4, null]],
-[6, "forward", 225, 450, [4, 21, 7]],
-[7, "right", 225, 492, [6, 8, 9]],
-[8, ["number", 91], 297, 492, [7, null]],
-[9, "setcolor", 225, 534, [7, 17, 13]],
-[10, ["division2", 0], 440, 534, [17, 11, 12]],
-[11, "xcor", 494, 534, [10, null]],
-[12, ["number", 6], 518, 576, [10, null]],
-[13, "setshade", 225, 576, [9, 14, 25]],
-[14, "heading", 303, 576, [13, null]],
-[15, ["plus2", 0], 320, 660, [25, 23, 16]],
-[16, ["number", 1], 374, 702, [15, null]],
-[17, ["identity2", 40], 306, 534, [9, 10]],
-[18, ["storein", 0], 160, 264, [1, 19, 20, 2]],
-[19, ["string", "my box"], 255, 264, [18, null]],
-[20, ["number", 1], 255, 306, [18, null]],
-[21, "box", 299, 450, [6, 22, null]],
-[22, ["string", "my box"], 354, 450, [21, null]],
-[23, "box", 374, 660, [15, 24, null]],
-[24, ["string", "my box"], 429, 660, [23, null]],
-[25, ["storein", 0], 225, 618, [13, 26, 15, null]],
-[26, ["string", "my box"], 320, 618, [25, null]]]
+[[0, ["start", 2.0], 719, 108, [null, 1]],
+[1, "clean", 719, 154, [0, 2]],
+[2, "storeinbox1", 719, 196, [1, 3, 4]],
+[3, ["number", 1], 836, 196, [2, null]],
+[4, "setpensize", 719, 238, [2, 5, 6]],
+[5, ["number", 20], 821, 238, [4, null]],
+[6, ["repeat", 84], 719, 280, [4, 7, 8, null]],
+[7, ["number", 1300], 777, 280, [6, null]],
+[8, "forward", 737, 322, [6, 9, 10]],
+[9, "box1", 807, 322, [8, null]],
+[10, "right", 737, 364, [8, 11, 12]],
+[11, ["number", 91], 795, 364, [10, null]],
+[12, "setcolor", 737, 406, [10, 22, 16]],
+[13, ["division2", 0], 948, 406, [22, 14, 15]],
+[14, "xcor", 1018, 406, [13, null]],
+[15, ["number", 6], 1042, 448, [13, null]],
+[16, "setshade", 737, 448, [12, 17, 18]],
+[17, "heading", 822, 448, [16, null]],
+[18, "storeinbox1", 737, 490, [16, 19, null]],
+[19, ["plus2", 0], 854, 490, [18, 20, 21]],
+[20, "box1", 908, 490, [19, null]],
+[21, ["number", 1], 908, 532, [19, null]],
+[22, ["identity2", 40], 814, 406, [12, 13]],
+[-1, ["turtle", "Yertle"], 907.9985581895907, 87.04554561204145, 220.0, 151.33309303159845, 220.0, 20.0]] \ No newline at end of file
diff --git a/turtleblocks.py b/turtleblocks.py
index 9947fe4..2fe9b45 100755
--- a/turtleblocks.py
+++ b/turtleblocks.py
@@ -496,7 +496,10 @@ class TurtleMain():
save_type = '.lg'
filename, self.tw.load_save_folder = get_save_name(save_type,
self.tw.load_save_folder, 'logosession')
- f = file(filename, 'w')
+ if type(filename) == unicode:
+ f = file(filename.encode('ascii', 'replace'), 'w')
+ else:
+ f = file(filename, 'w')
f.write(logocode)
f.close()