From 21111b93b925d56d1a78a08d464699517ab1476b Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 16 Jul 2012 16:25:10 +0000 Subject: caught sugar import in non-sugar version --- (limited to 'TurtleArt/talogo.py') 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) -- cgit v0.9.1