aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-03-03 02:00:18 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-03-03 02:00:18 +0000
commit13e74ce7d8fcccc12bed3ce65c4f35987f206799 (patch)
tree8e66040d566caf1fe177098af5aa8c0200b4f6e0 /lib/python
parent4cdb4528bbff583dc193f24508157e96a0d95c59 (diff)
downloadenigma2-13e74ce7d8fcccc12bed3ce65c4f35987f206799.tar.gz
enigma2-13e74ce7d8fcccc12bed3ce65c4f35987f206799.zip
delete characters in the InputBox with mute key
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Input.py4
-rw-r--r--lib/python/Screens/ChannelSelection.py2
-rw-r--r--lib/python/Screens/InputBox.py7
3 files changed, 10 insertions, 3 deletions
diff --git a/lib/python/Components/Input.py b/lib/python/Components/Input.py
index f1a17d90..a3ab764e 100644
--- a/lib/python/Components/Input.py
+++ b/lib/python/Components/Input.py
@@ -69,6 +69,10 @@ class Input(HTMLComponent, GUIComponent, VariableText):
self.text = self.text[0:self.currPos] + newNumber + self.text[self.currPos + 1:]
self.update()
+ def delete(self):
+ self.text = self.text[:self.currPos] + self.text[self.currPos + 1:]
+ self.update()
+
def number(self, number):
if self.type == self.TEXT:
newChar = self.numericalTextInput.getKey(number)
diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py
index 8b3fe93c..db279451 100644
--- a/lib/python/Screens/ChannelSelection.py
+++ b/lib/python/Screens/ChannelSelection.py
@@ -103,7 +103,7 @@ class ChannelContextMenu(Screen):
self.close(False)
def showBouquetInputBox(self):
- self.session.openWithCallback(self.bouquetInputCallback, InputBox, title=_("Please enter a name for the new bouquet"), text="neues_bouquet", maxSize=False, type=Input.TEXT)
+ 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:
diff --git a/lib/python/Screens/InputBox.py b/lib/python/Screens/InputBox.py
index 57745ca7..47b800df 100644
--- a/lib/python/Screens/InputBox.py
+++ b/lib/python/Screens/InputBox.py
@@ -15,12 +15,13 @@ class InputBox(Screen):
self["text"] = Label(title)
self["input"] = Input(**kwargs)
- self["actions"] = NumberActionMap(["WizardActions", "InputActions"],
+ self["actions"] = NumberActionMap(["WizardActions", "InputBoxActions"],
{
"ok": self.go,
"back": self.cancel,
"left": self.keyLeft,
"right": self.keyRight,
+ "delete": self.keyDelete,
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
"3": self.keyNumberGlobal,
@@ -40,9 +41,11 @@ class InputBox(Screen):
self["input"].right()
def keyNumberGlobal(self, number):
- print "pressed", number
self["input"].number(number)
+ def keyDelete(self):
+ self["input"].delete()
+
def go(self):
self.close(self["input"].getText())