+ self.clearMenu()
+ self.createMenu(0) # FIXME more than one CI
+ CiHandler.registerCIMessageHandler(0, self.ciStateChanged)
+
+ def clearMenu(self):
+ self.list = [ ]
+
+ def createMenu(self, slot):
+ self.list.append( (_("Reset"), 0, slot) )
+ self.list.append( (_("Init"), 1, slot) )
+
+ self.state[slot] = eDVBCI_UI.getInstance().getState(slot)
+ if self.state[slot] == 0: #no module
+ self.list.append( (_("no module found"), 2, slot) )
+ elif self.state[slot] == 1: #module in init
+ self.list.append( (_("init module"), 2, slot) )
+ elif self.state[slot] == 2: #module ready
+ #get appname
+ appname = eDVBCI_UI.getInstance().getAppName(slot)
+ self.list.append( (appname, 2, slot) )
+
+ self["entries"].list = self.list
+ self["entries"].l.setList(self.list)
+
+ def ciStateChanged(self, slot):
+ if self.dlg:
+ self.dlg.ciStateChanged()
+ else:
+ state = eDVBCI_UI.getInstance().getState(slot)
+ if self.state[slot] != state:
+ #print "something happens"
+ self.state[slot] = state
+ self.clearMenu()
+ self.createMenu(slot)