aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-07 16:23:11 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-01-07 16:23:11 +0000
commit1c5637e71a4565181064cc0e00dac36fb113bf08 (patch)
treead2df684013673261f09a9954a929ee6bd9ac9ea /lib/python
parenta3bbc85871508cbf24edea513a5f69a14ee76e33 (diff)
downloadenigma2-1c5637e71a4565181064cc0e00dac36fb113bf08.tar.gz
enigma2-1c5637e71a4565181064cc0e00dac36fb113bf08.zip
do not let the user leave the parental control setup when setup protection
is enabled but no pin is set and the same for service protection..
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/ParentalControlSetup.py28
1 files changed, 25 insertions, 3 deletions
diff --git a/lib/python/Screens/ParentalControlSetup.py b/lib/python/Screens/ParentalControlSetup.py
index 045e8fb7..cde1f7c2 100644
--- a/lib/python/Screens/ParentalControlSetup.py
+++ b/lib/python/Screens/ParentalControlSetup.py
@@ -109,10 +109,32 @@ class ParentalControlSetup(Screen, ConfigListScreen, ProtectedScreen):
print "current selection:", self["config"].l.getCurrentSelection()
self.createSetup()
+ def SetupPinMessageCallback(self, value):
+ if value:
+ self.session.openWithCallback(self.cancelCB, ParentalControlChangePin, config.ParentalControl.setuppin, _("setup pin"))
+ else:
+ config.ParentalControl.setuppinactive.value = False
+ self.keyCancel()
+
+ def ServicePinMessageCallback(self, value):
+ if value:
+ self.session.openWithCallback(self.cancelCB, ParentalControlChangePin, config.ParentalControl.servicepin[0], _("service pin"))
+ else:
+ config.ParentalControl.servicepinactive.value = False
+ self.keyCancel()
+
+ def cancelCB(self,value):
+ self.keyCancel()
+
def keyCancel(self):
- for x in self["config"].list:
- x[1].save()
- self.close()
+ if config.ParentalControl.setuppinactive.value and config.ParentalControl.setuppin.value == 'aaaa':
+ self.session.openWithCallback(self.SetupPinMessageCallback, MessageBox, _("No valid setup PIN found!\nDo you like to change the setup PIN now?\nWhen you say 'No' here the setup protection stay disabled!"), MessageBox.TYPE_YESNO)
+ elif config.ParentalControl.servicepinactive.value and config.ParentalControl.servicepin[0].value == 'aaaa':
+ self.session.openWithCallback(self.ServicePinMessageCallback, MessageBox, _("No valid service PIN found!\nDo you like to change the service PIN now?\nWhen you say 'No' here the service protection stay disabled!"), MessageBox.TYPE_YESNO)
+ else:
+ for x in self["config"].list:
+ x[1].save()
+ self.close()
def keyNumberGlobal(self, number):
pass