1 from Screen import Screen
2 from Components.ActionMap import NumberActionMap
3 from Components.Label import Label
4 from Components.Button import Button
5 from Components.Pixmap import Pixmap
6 from Components.MenuList import MenuList
7 from enigma import eSize, ePoint
9 class MinuteInput(Screen):
10 def __init__(self, session, basemins = 5):
11 Screen.__init__(self, session)
13 self["minutes"] = Label()
14 self.updateValue(basemins)
16 self["actions"] = NumberActionMap([ "NumberZapActions", "MinuteInputActions" ],
18 "1": self.keyNumberGlobal,
19 "2": self.keyNumberGlobal,
20 "3": self.keyNumberGlobal,
21 "4": self.keyNumberGlobal,
22 "5": self.keyNumberGlobal,
23 "6": self.keyNumberGlobal,
24 "7": self.keyNumberGlobal,
25 "8": self.keyNumberGlobal,
26 "9": self.keyNumberGlobal,
27 "0": self.keyNumberGlobal,
34 def updateValue(self, minutes):
35 self.minutes = minutes
36 self["minutes"].setText(str(self.minutes) + _(" mins"))
38 def keyNumberGlobal(self, number):
39 #self.updateValue(self.minutes * 10 + number)
43 self.updateValue(self.minutes + 1)
47 self.updateValue(self.minutes - 1)
50 self.close(self.minutes)