diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-09-14 17:40:12 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-09-14 17:40:12 (GMT) |
commit | 2c9da6eaf151925502250f6390d625bec2a09529 (patch) | |
tree | ed44f28ab574dbd1c653b8cae774246bbf7f00d3 /mainscreen.py | |
parent | 7ff623023031dae3aa2daf921fad4f71da1c4e8b (diff) |
Bug fixes
Diffstat (limited to 'mainscreen.py')
-rw-r--r-- | mainscreen.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mainscreen.py b/mainscreen.py index aaff165..0f2700b 100644 --- a/mainscreen.py +++ b/mainscreen.py @@ -217,11 +217,11 @@ class MainScreen(gtk.VBox): # Hilite the button in the direction of the first unmedaled lesson. next_index = self.get_next_lesson() - if next_index > self.lesson_index: + if next_index > self.lesson_index and index < len(self.lessons)-1: self.nextlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#ff8080')) else: self.nextlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#40a040')) - if next_index < self.lesson_index: + if next_index < self.lesson_index and index > 0: self.prevlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#ff8080')) else: self.prevlessonbtn.modify_bg(gtk.STATE_NORMAL, self.get_colormap().alloc_color('#40a040')) |