Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-07-16 16:25:10 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-07-16 16:25:10 (GMT)
commit21111b93b925d56d1a78a08d464699517ab1476b (patch)
treed228c5ba496cbf8f305e3761a6f1147d4169adb0 /TurtleArt
parentf90135b6a2082b594cfb67d85b9895f91db0d19b (diff)
caught sugar import in non-sugar version
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/talogo.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index 8d957bc..25bf44c 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -27,7 +27,11 @@ from time import time
from operator import isNumberType
from UserDict import UserDict
-from sugar.graphics import style
+try:
+ from sugar.graphics import style
+ GRID_CELL_SIZE = style.GRID_CELL_SIZE
+except ImportError:
+ GRID_CELL_SIZE = 55
from taconstants import TAB_LAYER, DEFAULT_SCALE, PREFIX_DICTIONARY
from tapalette import block_names, value_blocks
@@ -788,9 +792,9 @@ class LogoCode:
yoffset = 0
if self.tw.running_sugar:
if not self.tw.activity.is_fullscreen():
- yoffset += style.GRID_CELL_SIZE
+ yoffset += GRID_CELL_SIZE
if self.tw.activity.toolbars_expanded():
- yoffset += style.GRID_CELL_SIZE
+ yoffset += GRID_CELL_SIZE
play_movie_from_file(self, self.filepath, self.x2tx(),
self.y2ty() + yoffset, w, h)