Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-06-10 21:20:46 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-06-10 21:20:46 (GMT)
commit4590f28a206bee298efa523f0c2f90f8d3f97040 (patch)
tree9eac0459dd14d953e06344ae9e092e108ca11ba5 /activity.py
parent6da68b08c94f321a755140c59e30c823ada72f67 (diff)
Games without color information
For example a downloaded game won't have color information
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/activity.py b/activity.py
index aba9d9b..deb6e17 100644
--- a/activity.py
+++ b/activity.py
@@ -158,7 +158,11 @@ class MemorizeActivity(Activity):
if self.metadata['mime_type'] == 'application/x-memorize-project':
self.toolbox.set_current_toolbar(_TOOLBAR_PLAY)
- self.game.change_game(None, file_path, 4, 'file', self.metadata['title'], self.metadata['icon-color'])
+ if self.metadata.has_key('icon-color'):
+ color = self.metadata['icon-color']
+ else:
+ color = profile.get_color().to_string()
+ self.game.change_game(None, file_path, 4, 'file', self.metadata['title'], color)
def change_mode(self, notebook, index):
if index == _TOOLBAR_CREATE: