From 053acc3280acd02671785da76bf0c2ba4ec27a99 Mon Sep 17 00:00:00 2001 From: Walther Neuper Date: Mon, 14 Dec 2009 16:10:17 +0000 Subject: collection_+feedback_table both visible, intermed 1 --- 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. """ -- cgit v0.9.1