+ def okbuttonClick(self):
+ self["menu"].getCurrent()[1]()
+
+ def cancelClick(self):
+ self.close(False)
+
+ def showBouquetInputBox(self):
+ self.session.openWithCallback(self.bouquetInputCallback, InputBox, title=_("Please enter a name for the new bouquet"), text="bouquetname", maxSize=False, type=Input.TEXT)
+
+ def bouquetInputCallback(self, bouquet):
+ if bouquet is not None:
+ self.csel.addBouquet(bouquet, None)
+ self.close()
+
+ def addParentalProtection(self, service):
+ parentalControl.protectService(service.toCompareString())
+ self.close()
+
+ def removeParentalProtection(self, service):
+ self.session.openWithCallback(boundFunction(self.pinEntered, service.toCompareString()), PinInput, pinList = [config.ParentalControl.servicepin[0].value], triesEntry = config.ParentalControl.retries.servicepin, title = _("Enter the service pin"), windowTitle = _("Change pin code"))
+
+ def pinEntered(self, service, result):
+ if result:
+ parentalControl.unProtectService(service)
+ self.close()
+ else:
+ self.session.openWithCallback(self.close, MessageBox, _("The pin code you entered is wrong."), MessageBox.TYPE_ERROR)
+