aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/ParentalControlSetup.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-10-11 15:16:56 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-10-11 15:16:56 +0000
commit681c113336426914342cf68fb03e7cd399c29c9a (patch)
treeb0595ec9c407f8f28694c152756c516d83db3edb /lib/python/Screens/ParentalControlSetup.py
parent88078e7ac2ee289a0dfc321d71c7494657c4457c (diff)
downloadenigma2-681c113336426914342cf68fb03e7cd399c29c9a.tar.gz
enigma2-681c113336426914342cf68fb03e7cd399c29c9a.zip
improve parental control retry count
Diffstat (limited to 'lib/python/Screens/ParentalControlSetup.py')
-rw-r--r--lib/python/Screens/ParentalControlSetup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py
index c3c0cb0b..d4911953 100644
--- a/lib/python/Screens/ParentalControlSetup.py
+++ b/lib/python/Screens/ParentalControlSetup.py
@@ -19,7 +19,10 @@ import operator
class ProtectedScreen:
def __init__(self):
if self.isProtected():
- self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.protectedWithPin()], title = self.getPinText(), windowTitle = _("Change pin code")))
+ self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.pinEntered, PinInput, pinList = [self.protectedWithPin()], triesEntry = self.getTriesEntry(), title = self.getPinText(), windowTitle = _("Change pin code")))
+
+ def getTriesEntry(self):
+ return config.ParentalControl.retries.setuppin
def getPinText(self):
return _("Please enter the correct pin code")
@@ -31,10 +34,9 @@ class ProtectedScreen:
return config.ParentalControl.setuppin.value
def pinEntered(self, result):
- if result[0] is None:
+ if result is None:
self.close()
- if not result[0]:
- print result, "-", self.protectedWithPin()
+ elif not result:
self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR)
class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen):