Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-03-06 13:29:38 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-03-06 13:29:38 (GMT)
commit2b0e769d5c1fdf4c8e7142111b6e044bb13ca99a (patch)
tree4e821fb5eca0835bb71344d5fe30709d1439d7e8
parentf779378a01ee3756fe887ec321d98e65b42ae611 (diff)
using constants for orientation
-rw-r--r--taconstants.py2
-rw-r--r--tawindow.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/taconstants.py b/taconstants.py
index 11dc3d8..65c347a 100644
--- a/taconstants.py
+++ b/taconstants.py
@@ -167,6 +167,8 @@ STANDARD_STROKE_WIDTH = 1.0
BLOCK_SCALE = 2.0
PALETTE_SCALE = 1.5
DEFAULT_TURTLE = 1
+HORIZONTAL_PALETTE = 0
+VERTICAL_PALETTE = 1
#
# Block-style definitions
diff --git a/tawindow.py b/tawindow.py
index ac75ca2..6748688 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -119,11 +119,11 @@ class TurtleArtWindow():
if self._OLPC_XO_1():
self.lead = 1.0
self.scale = 0.67
- self.orientation = 1
+ self.orientation = VERTICAL_PALETTE
else:
self.lead = 1.0
self.scale = 1.0
- self.orientation = 0
+ self.orientation = HORIZONTAL_PALETTE
self.block_scale = BLOCK_SCALE
self.trash_scale = 0.5
self.myblock = None
@@ -248,7 +248,7 @@ class TurtleArtWindow():
return False
"""
- Is the an OLPC XO-1?
+ Is the an OLPC XO-1 or XO-1.5?
"""
def _OLPC_XO_1(self):
return os.path.exists('/etc/olpc-release') or \