diff options
Diffstat (limited to 'ReckonPrimer.activity/collection.py')
-rw-r--r-- | ReckonPrimer.activity/collection.py | 17 |
1 files changed, 9 insertions, 8 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)) |