added a "Starting on" option to set a starting date for repeated timers
[vuplus_dvbapp] / lib / python / Screens / Ci.py
index c3302a1..881ad10 100644 (file)
@@ -6,8 +6,6 @@ from Components.Header import Header
 from Components.Button import Button
 from Components.Label import Label
 
-from Components.HTMLComponent import *
-from Components.GUIComponent import *
 from Components.config import config, ConfigSubsection, ConfigSelection, ConfigSubList, getConfigListEntry, KEY_LEFT, KEY_RIGHT, KEY_0, ConfigNothing, ConfigPIN
 from Components.ConfigList import ConfigList
 
@@ -275,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:
@@ -310,7 +314,7 @@ class CiSelection(Screen):
                self.state[slot] = state
 
                slotidx=0
-               while self.list[slotidx][2] != slot:
+               while len(self.list[slotidx]) < 3 or self.list[slotidx][3] != slot:
                        slotidx += 1
 
                slotidx += 1 # do not change Reset