X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2Fconfig.py;h=0245a4f4ead961275fe71dc518d53fa74dec1b5b;hb=7bee809a45d982abe2bb7376f1e4420103ffc907;hp=2056192fe05aa2a3b8e67a92a13e57850b83bf57;hpb=a996da519c52c9e468b30da93d8439ad49c875d5;p=vuplus_dvbapp diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 2056192..0245a4f 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -55,10 +55,9 @@ class configSelection: def checkValues(self): if self.parent.value < 0: - self.parent.value = 0 - - if(self.parent.value >= (len(self.parent.vals) - 1)): - self.parent.value = len(self.parent.vals) - 1 + self.parent.value = len(self.parent.vals) - 1 + elif(self.parent.value > (len(self.parent.vals) - 1)): + self.parent.value = 0 def cancel(self): self.parent.reload() @@ -78,7 +77,7 @@ class configSelection: def __call__(self, selected): #needed by configlist self.checkValues() - return ("text", self.parent.vals[self.parent.value]) + return ("text", _(self.parent.vals[self.parent.value])) class configDateTime: def __init__(self, parent):