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 15:22:28 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-07-16 15:22:28 (GMT)
commitcc404747e0832a9c84c337d834a76e0c3392cfeb (patch)
tree56ee7c6707ae9a4da8a4215d34a9b84aeea56474 /TurtleArt
parent64e8bc67a0a888f09c045c2a012e50667c6c6dac (diff)
more complete fix for non-GNOME load
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tapalette.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/TurtleArt/tapalette.py b/TurtleArt/tapalette.py
index e87e889..fd6d695 100644
--- a/TurtleArt/tapalette.py
+++ b/TurtleArt/tapalette.py
@@ -77,7 +77,11 @@ block_styles = {'basic-style': [],
import gtk
-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 EXPANDABLE_STYLE, EXPANDABLE_FLOW
from tautils import debug_output
@@ -109,7 +113,7 @@ class Palette():
help_windows[self._name] = gtk.ScrolledWindow()
help_windows[self._name].set_size_request(
int(gtk.gdk.screen_width() / 3),
- gtk.gdk.screen_height() - style.GRID_CELL_SIZE * 3)
+ gtk.gdk.screen_height() - GRID_CELL_SIZE * 3)
help_windows[self._name].set_policy(
gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
help_windows[self._name].add_with_viewport(