X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/6a9b3e46a4aa575e671a93025726b30380428632..5be5939082cfcef843e668bc1cbfb67f5451ef55:/lib/python/Screens/ParentalControlSetup.py diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py index abe09af0..6ae12cae 100644 --- a/lib/python/Screens/ParentalControlSetup.py +++ b/lib/python/Screens/ParentalControlSetup.py @@ -148,7 +148,7 @@ class ParentalControlEditor(Screen): self.currentLetter = chr(SPECIAL_CHAR) self.readServiceList() self.chooseLetterTimer = eTimer() - self.chooseLetterTimer.timeout.get().append(self.chooseLetter) + self.chooseLetterTimer.callback.append(self.chooseLetter) self.onLayoutFinish.append(self.LayoutFinished) self["actions"] = NumberActionMap(["DirectionActions", "ColorActions", "OkCancelActions", "NumberActions"], @@ -230,6 +230,8 @@ class ParentalControlChangePin(Screen, ConfigListScreen, ProtectedScreen): self.list = [] self.pin1 = ConfigPIN(default = 1111, censor = "*") self.pin2 = ConfigPIN(default = 1112, censor = "*") + self.pin1.addEndNotifier(boundFunction(self.valueChanged, 1)) + self.pin2.addEndNotifier(boundFunction(self.valueChanged, 2)) self.list.append(getConfigListEntry(_("New pin"), NoSave(self.pin1))) self.list.append(getConfigListEntry(_("Reenter new pin"), NoSave(self.pin2))) ConfigListScreen.__init__(self, self.list) @@ -243,6 +245,12 @@ class ParentalControlChangePin(Screen, ConfigListScreen, ProtectedScreen): "cancel": self.cancel, }, -1) + def valueChanged(self, pin, value): + if pin == 1: + self["config"].setCurrentIndex(1) + elif pin == 2: + self.keyOK() + def getPinText(self): return _("Please enter the old pin code")