+ print "ok"
+ if self.tag == "WAIT":
+ print "do nothing - wait"
+ elif self.tag == "MENU":
+ print "answer MENU"
+ cur = self["entries"].getCurrent()
+ if cur:
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, cur[1])
+ else:
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, 0)
+ self.showWait()
+ elif self.tag == "LIST":
+ print "answer LIST"
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, 0)
+ self.showWait()
+ elif self.tag == "ENQ":
+ answer = str(self.pin[1].parent.value[0])
+ length = len(answer)
+ while length < self.pinlength:
+ answer = '0'+answer
+ length+=1
+ eDVBCI_UI.getInstance().answerEnq(self.slotid, answer)
+ self.showWait()
+
+ def closeMmi(self):
+ self.Timer.stop()
+ self.close()
+
+ def keyCancel(self):
+ print "keyCancel"
+ if self.tag == "WAIT":
+ eDVBCI_UI.getInstance().stopMMI(self.slotid)
+ self.closeMmi()
+ elif self.tag in [ "MENU", "LIST" ]:
+ print "cancel list"
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, 0)
+ self.showWait()
+ elif self.tag == "ENQ":
+ print "cancel enq"
+ eDVBCI_UI.getInstance().cancelEnq(self.slotid)
+ self.showWait()
+ else:
+ print "give cancel action to ci"
+
+ def keyConfigEntry(self, key):
+ try:
+ self["entries"].handleKey(key)
+ except AttributeError:
+ pass
+
+ def keyNumberGlobal(self, number):
+ self.keyConfigEntry(config.key[str(number)])
+
+ def keyLeft(self):
+ self.keyConfigEntry(config.key["prevElement"])
+
+ def keyRight(self):
+ self.keyConfigEntry(config.key["nextElement"])
+
+ def updateList(self, list):
+ List = self["entries"]
+ try:
+ List.instance.moveSelectionTo(0)
+ except:
+ List.l.setList(list)
+ return
+
+ if self.tag == "ENQ":
+ type = TYPE_CONFIG
+ else:
+ type = TYPE_MENU
+
+ if type != self.listtype:
+ if type == TYPE_CONFIG:
+ List.l = eListboxPythonConfigContent()
+ else:
+ List.l = eListboxPythonStringContent()
+ List.instance.setContent(List.l)
+ self.listtype = type
+
+ List.l.setList(list)
+
+ def showWait(self):
+ self.tag = "WAIT"
+ self["title"].setText("")
+ self["subtitle"].setText("")
+ self["bottom"].setText("")