add runAsync support to wizzard
[enigma2.git] / lib / python / Screens / Ci.py
index d23fb0447ee1a70b85e148ca24981bb1d4d3976c..881ad10de4fc141532c4de422357ce2d5e8375e5 100644 (file)
@@ -265,7 +265,6 @@ class CiSelection(Screen):
 
                for slot in range(MAX_NUM_CI):
                        state = eDVBCI_UI.getInstance().getState(slot)
-                       print "slot", slot, "state", state
                        if state != -1:
                                self.appendEntries(slot, state)
                                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)
@@ -274,6 +273,12 @@ class CiSelection(Screen):
                menuList.list = self.list
                menuList.l.setList(self.list)
                self["entries"] = menuList
+               self["entries"].onSelectionChanged.append(self.selectionChanged)
+               self["text"] = Label(_("Slot %d")%(1))
+
+       def selectionChanged(self):
+               cur_idx = self["entries"].getCurrentIndex()
+               self["text"].setText(_("Slot %d")%((cur_idx / 4)+1))
 
        def keyConfigEntry(self, key):
                try:
@@ -309,7 +314,7 @@ class CiSelection(Screen):
                self.state[slot] = state
 
                slotidx=0
-               while self.list[slotidx][3] != slot:
+               while len(self.list[slotidx]) < 3 or self.list[slotidx][3] != slot:
                        slotidx += 1
 
                slotidx += 1 # do not change Reset