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 17:12:11 (GMT)
committer Walther Neuper <neuper@neuper.(none)>2009-12-14 17:12:11 (GMT)
commit255bdc53f8dece503d44e0887ac76670820efa96 (patch)
tree442c6dfcea70dcbb7e0a420e5d10bb627e9e831d
parent0bd0fbcfdcac1d7db820e9f0df45afaffaefccf8 (diff)
collection_+feedback_table both visible, intermed 5:renamings
-rw-r--r--ReckonPrimer.activity/collection.py17
-rwxr-xr-xReckonPrimer.activity/display.py8
2 files changed, 13 insertions, 12 deletions
diff --git a/ReckonPrimer.activity/collection.py b/ReckonPrimer.activity/collection.py
index bd8054a..e303e21 100644
--- a/ReckonPrimer.activity/collection.py
+++ b/ReckonPrimer.activity/collection.py
@@ -53,7 +53,7 @@ class Collection:
def define_coll_gui(self):
""" Define gui-elements for presenting the collection.
TODO: define once at startup of RP ?"""
- #WN.LV diesen Code ersetzen !!!!!
+ #WN.LV diesen Code ersetzen: collection_table.attach(self.colldata,...
self.topic_box = gtk.HBox(True, 0)
#self._display.collection_table.attach(self.topic_box, 0, 6, 0, 1)
self._display.collection_table.attach(self.topic_box, 0, 6, 5, 6)
@@ -80,18 +80,19 @@ class Collection:
_i = _i + 1
self.topic_box.show()
- def select_exerc_callback(self, widget, exerc):
+ def select_exerc_callback(self, widget, coll_key):
""" Callback telling the item from the collection selected. """
+ #WN.LV diesen Code ersetzen> statt 1..n fuer Listen kommt coll_key
if(self._active_exerc == None):
# at startup
- self._active_exerc = exerc
- self._coach.notify(('exerc-selected', exerc))
- elif(self._active_exerc == exerc):
+ self._active_exerc = coll_key
+ self._coach.notify(('exerc-selected', coll_key))
+ elif(self._active_exerc == coll_key):
# hit the same button once more
pass
- elif(self._active_exerc != exerc):
+ elif(self._active_exerc != coll_key):
# switched to another exercise
- self._active_exerc = exerc
+ self._active_exerc = coll_key
self._display.switch_exercise()
- self._coach.notify(('exerc-selected', exerc))
+ self._coach.notify(('exerc-selected', coll_key))
diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py
index 092e78b..ac0381e 100755
--- a/ReckonPrimer.activity/display.py
+++ b/ReckonPrimer.activity/display.py
@@ -220,7 +220,7 @@ class Display:
"""
if self.running == False:
self.running = True
- self.start_button.set_label(gtk.STOCK_STOP)
+ self.start_button.set_label(gtk.STOCK_STOP) #stop-button
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()
@@ -232,12 +232,12 @@ class Display:
elif self.running == True:
self.protocol('----------------------------------------', 0, 'OK')
self.running = False
- self.start_button.set_label(gtk.STOCK_GO_FORWARD)
+ self.start_button.set_label(gtk.STOCK_GO_FORWARD)# >-button
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.calc_table.destroy() # difference from here
+ self.calc_table.destroy() # difference from here
self.feedback_table_hide()
self.settings_table.show()
self.collection_table.show()
@@ -364,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() # sets callbacks
def switch_exercise(self):
""" Another exercise has been selected. """