allow non-binary states
[enigma2.git] / lib / python / Components / TimerList.py
index f84743749e79ef2167b42a35688d70eec65b20fa..44a7eb4f4cc91fad95b508ec3cb5840a200b4b32 100644 (file)
@@ -21,11 +21,11 @@ class TimerList(HTMLComponent, GUIComponent, object):
                res.append((eListboxPythonMultiContent.TYPE_TEXT, 0, 30, width, 20, 1, RT_HALIGN_LEFT|RT_VALIGN_CENTER, timer.name))
 
                repeatedtext = ""
-               days = [ _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun") ]
+               days = ( _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun") )
                if timer.repeated:
                        flags = timer.repeated
                        count = 0
-                       for x in range(0, 7):
+                       for x in (0, 1, 2, 3, 4, 5, 6):
                                        if (flags & 1 == 1):
                                                if (count != 0):
                                                        repeatedtext += ", "
@@ -93,7 +93,7 @@ class TimerList(HTMLComponent, GUIComponent, object):
        def getCurrentIndex(self):
                return self.instance.getCurrentIndex()
 
-       currentIndex = property(moveToIndex, getCurrentIndex)
+       currentIndex = property(getCurrentIndex, moveToIndex)
        currentSelection = property(getCurrent)
 
        def moveDown(self):