git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
data/countries/yu.png: update slovenian flag
[enigma2.git]
/
lib
/
python
/
Screens
/
MinuteInput.py
diff --git
a/lib/python/Screens/MinuteInput.py
b/lib/python/Screens/MinuteInput.py
index 68909b613b103d0bf2fb5e45361617baf14a8ea6..f01fbbecc16ddb4f05e7330117ad94e10c31cc47 100644
(file)
--- a/
lib/python/Screens/MinuteInput.py
+++ b/
lib/python/Screens/MinuteInput.py
@@
-1,19
+1,14
@@
from Screen import Screen
from Components.ActionMap import NumberActionMap
from Screen import Screen
from Components.ActionMap import NumberActionMap
-from Components.Label import Label
-from Components.Button import Button
-from Components.Pixmap import Pixmap
-from Components.MenuList import MenuList
-from enigma import eSize, ePoint
+from Components.Input import Input
class MinuteInput(Screen):
def __init__(self, session, basemins = 5):
Screen.__init__(self, session)
class MinuteInput(Screen):
def __init__(self, session, basemins = 5):
Screen.__init__(self, session)
- self["minutes"] = Label()
- self.updateValue(basemins)
+ self["minutes"] = Input(str(basemins), type=Input.NUMBER)
- self["actions"] = NumberActionMap([ "
NumberZapActions", "Minute
InputActions" ],
+ self["actions"] = NumberActionMap([ "
InputActions" , "MinuteInputActions", "TextEntryActions", "Keyboard
InputActions" ],
{
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
{
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
@@
-25,29
+20,48
@@
class MinuteInput(Screen):
"8": self.keyNumberGlobal,
"9": self.keyNumberGlobal,
"0": self.keyNumberGlobal,
"8": self.keyNumberGlobal,
"9": self.keyNumberGlobal,
"0": self.keyNumberGlobal,
+ "left": self.left,
+ "right": self.right,
+ "home": self.home,
+ "end": self.end,
+ "deleteForward": self.deleteForward,
+ "deleteBackward": self.deleteBackward,
"up": self.up,
"down": self.down,
"ok": self.ok,
"cancel": self.cancel
})
"up": self.up,
"down": self.down,
"ok": self.ok,
"cancel": self.cancel
})
- def updateValue(self, minutes):
- self.minutes = minutes
- self["minutes"].setText(str(self.minutes) + _(" mins"))
-
def keyNumberGlobal(self, number):
def keyNumberGlobal(self, number):
-
#self.updateValue(self.minutes * 10 +
number)
+
self["minutes"].number(
number)
pass
pass
+ def left(self):
+ self["minutes"].left()
+
+ def right(self):
+ self["minutes"].right()
+
+ def home(self):
+ self["minutes"].home()
+
+ def end(self):
+ self["minutes"].end()
+
+ def deleteForward(self):
+ self["minutes"].delete()
+
+ def deleteBackward(self):
+ self["minutes"].deleteBackward()
+
def up(self):
def up(self):
- self
.updateValue(self.minutes + 1
)
+ self
["minutes"].up(
)
def down(self):
def down(self):
- if self.minutes > 0:
- self.updateValue(self.minutes - 1)
+ self["minutes"].down()
def ok(self):
def ok(self):
- self.close(
self.minutes
)
+ self.close(
int(self["minutes"].getText())
)
def cancel(self):
self.close(0)
\ No newline at end of file
def cancel(self):
self.close(0)
\ No newline at end of file