diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-08-13 14:58:48 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-09-26 14:28:15 (GMT) |
commit | 13eff73b0aaa82bea75843f7385b48bcee21fc3f (patch) | |
tree | c03e0352aea5c26aac99f85a1687b54d42c0a7d4 /mainscreen.py | |
parent | 352c76c78507221faf789dc8636ff26653c94cf0 (diff) |
Remove wrapper (port/ directory) around sugar-toolkit SL #3780
This wrapper was used to allow compatibility with old versions of
Sugar. I'm removing this because is no longer needed by the Gtk3
versions of this Activity.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Diffstat (limited to 'mainscreen.py')
-rw-r--r-- | mainscreen.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mainscreen.py b/mainscreen.py index 7f540f0..b911500 100644 --- a/mainscreen.py +++ b/mainscreen.py @@ -17,7 +17,8 @@ # Import standard Python modules. import logging, os, math, time, copy, locale, datetime, random, re, glob from gettext import gettext as _ -from port import json +import sys +import json from gi.repository import Gtk from gi.repository import Gdk @@ -95,6 +96,8 @@ class MainScreen(Gtk.VBox): # We cannot run without lessons. if not len(self.lessons): + logging.error('There is no lessons and we ' + 'cannot run without them.') sys.exit(1) # Sort by the 'order' field. @@ -140,6 +143,9 @@ class MainScreen(Gtk.VBox): def get_next_lesson(self): """Returns the index of the first lesson without a medal.""" index = len(self.lessons)-1 + # FIXME: lesson doesn't have the 'order' key if the user + # didn't press Go Back in the Edit Lessons Screen after + # creating one for i in xrange(0, len(self.lessons)): if self.lessons[i]['order'] >= 0 and \ not self.activity.data['medals'].has_key(self.lessons[i]['name']): |