Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalther Neuper <neuper@neuper.(none)>2009-12-14 16:10:17 (GMT)
committer Walther Neuper <neuper@neuper.(none)>2009-12-14 16:10:17 (GMT)
commit053acc3280acd02671785da76bf0c2ba4ec27a99 (patch)
tree547f3b3f3f27245182b514ce624d1a042c70b835
parentf97b8754d4888ebacb44dfb748561ced2277e9b7 (diff)
collection_+feedback_table both visible, intermed 1
-rwxr-xr-xReckonPrimer.activity/display.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py
index bed71e9..fccec11 100755
--- a/ReckonPrimer.activity/display.py
+++ b/ReckonPrimer.activity/display.py
@@ -114,7 +114,7 @@ class Display:
self.stopwatch_label.queue_draw()
return True
- def draw_result_screen(self):
+ def draw_feedback_table(self):
"""RENAME to draw_feedback_screen"""
# Section for stopwatch
self.stopwatch = Timer()
@@ -147,7 +147,6 @@ class Display:
self.correct_count = 0
self.correct_counter = gtk.Label(str(self.correct_count))
self.correct_counter.modify_font(pango.FontDescription("sans 16"))
-
# Ugly code for label color
attr = pango.AttrList()
@@ -194,6 +193,7 @@ class Display:
self.progress_total.hide()
def offer_setting(self,ex):
+ """ Prepare display for update of settings. """
self._ex = ex #WN.LV either drop this or self.current_exercise
self._sett = self._ex.get_setting() #WN.LV make _sett local
@@ -214,18 +214,22 @@ class Display:
self.current_exercise.set_buttons(self._sett)
def clicked_start_callback(self, widget):
- if( self.running == False):
+ """ Finish offer_setting, deliver settings (possibly updated)
+ and tell the coach to start the calculations of the exercise
+ ELIF
+ """
+ if self.running == False:
self.running = True
self.start_button.set_label(gtk.STOCK_STOP)
self.start_alignment = self.start_button.get_children()[0]
self.start_hbox = self.start_alignment.get_children()[0]
self.start_image, self.start_label = self.start_hbox.get_children()
self.start_label.set_label("")
- self._co.notify(('setting-done', self._sett))
+ self._co.notify(('setting-done', self._sett))# difference from here
self.settings_table.hide()
self.collection_table.hide()
- self.draw_result_screen()
- elif( self.running == True):
+ self.draw_feedback_table()
+ elif self.running == True:
self.protocol('----------------------------------------', 0, 'OK')
self.running = False
self.start_button.set_label(gtk.STOCK_GO_FORWARD)
@@ -233,7 +237,7 @@ class Display:
self.start_hbox = self.start_alignment.get_children()[0]
self.start_image, self.start_label = self.start_hbox.get_children()
self.start_label.set_label("")
- self.display_table.destroy()
+ self.display_table.destroy() # difference from here
self.hide_result_screen()
self.settings_table.show()
self.collection_table.show()
@@ -360,7 +364,7 @@ class Display:
def offer_coll_to_learner(self, collect):
"""TODO: get the users choice from buttons above the settings"""
collect.define_coll_gui()
- collect.set_coll_gui()
+ collect.set_coll_gui()
def switch_exercise(self):
""" Another exercise has been selected. """